Index: trunk/extensions/UsabilityInitiative/Vector/Modules/SimpleSearch/SimpleSearch.js |
— | — | @@ -115,7 +115,7 @@ |
116 | 116 | positionFromLeft: $j( 'body' ).is( '.rtl' ), |
117 | 117 | highlightInput: true |
118 | 118 | } ) |
119 | | - .bind( 'paste cut click', function() { |
| 119 | + .bind( 'paste cut', function() { |
120 | 120 | $j( this ).trigger( 'keypress' ); |
121 | 121 | } ); |
122 | 122 | $j( '#searchInput' ).suggestions( { |
— | — | @@ -153,7 +153,7 @@ |
154 | 154 | }, |
155 | 155 | $region: $j( '#simpleSearch' ) |
156 | 156 | } ) |
157 | | - .bind( 'paste cut click', function() { |
| 157 | + .bind( 'paste cut', function() { |
158 | 158 | $j( this ).trigger( 'keypress' ); |
159 | 159 | } ); |
160 | 160 | }); |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php |
— | — | @@ -17,13 +17,13 @@ |
18 | 18 | array( 'src' => 'Modules/ExpandableSearch/ExpandableSearch.js', 'version' => 5 ), |
19 | 19 | array( 'src' => 'Modules/EditWarning/EditWarning.js', 'version' => 9 ), |
20 | 20 | array( 'src' => 'Modules/FooterCleanup/FooterCleanup.js', 'version' => 5 ), |
21 | | - array( 'src' => 'Modules/SimpleSearch/SimpleSearch.js', 'version' => 19 ), |
| 21 | + array( 'src' => 'Modules/SimpleSearch/SimpleSearch.js', 'version' => 20 ), |
22 | 22 | ), |
23 | 23 | 'combined' => array( |
24 | | - array( 'src' => 'Vector.combined.js', 'version' => 57 ), |
| 24 | + array( 'src' => 'Vector.combined.js', 'version' => 59 ), |
25 | 25 | ), |
26 | 26 | 'minified' => array( |
27 | | - array( 'src' => 'Vector.combined.min.js', 'version' => 58 ), |
| 27 | + array( 'src' => 'Vector.combined.min.js', 'version' => 60 ), |
28 | 28 | ), |
29 | 29 | ); |
30 | 30 | static $modules = array( |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.js |
— | — | @@ -620,7 +620,7 @@ |
621 | 621 | positionFromLeft: $j( 'body' ).is( '.rtl' ), |
622 | 622 | highlightInput: true |
623 | 623 | } ) |
624 | | - .bind( 'paste cut click', function() { |
| 624 | + .bind( 'paste cut', function() { |
625 | 625 | $j( this ).trigger( 'keypress' ); |
626 | 626 | } ); |
627 | 627 | $j( '#searchInput' ).suggestions( { |
— | — | @@ -658,7 +658,7 @@ |
659 | 659 | }, |
660 | 660 | $region: $j( '#simpleSearch' ) |
661 | 661 | } ) |
662 | | - .bind( 'paste cut click', function() { |
| 662 | + .bind( 'paste cut', function() { |
663 | 663 | $j( this ).trigger( 'keypress' ); |
664 | 664 | } ); |
665 | 665 | }); |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.min.js |
— | — | @@ -28,5 +28,5 @@ |
29 | 29 | var mod={'browsers':{'ltr':{'opera':[['>=',9.6]],'blackberry':false,'ipod':false,'iphone':false},'rtl':{'opera':[['>=',9.6]],'blackberry':false,'ipod':false,'iphone':false}}};if(!$j.wikiEditor.isSupported(mod)){return true;} |
30 | 30 | $j('div#simpleSearch > input#searchInput').each(function(){$j('<label />').text(mw.usability.getMsg('vector-simplesearch-search')).css({'display':'none','position':'absolute','color':'#999999','cursor':'text','margin':'0 4px','top':'6px','line-height':'13px'}).css(($j('body').is('.rtl')?'right':'left'),0).mousedown(function(){$j(this).parent().find('input#searchInput').focus();return false;}).appendTo($j(this).parent());if($j(this).val()==''){$j(this).parent().find('label').fadeIn(100);}}).bind('keypress',function(){if($j(this).parent().find('label:visible').size()>0) |
31 | 31 | $j(this).parent().find('label').fadeOut(100);}).focus(function(){$j(this).parent().find('label').fadeOut(100);}).blur(function(){if($j(this).val()==''){$j(this).parent().find('label').fadeIn(100);}});$j(document).bind('dragend',function(event){if($j('div#simpleSearch > label:visible').size()>0&&$j('div#simpleSearch > input#searchInput').val().length>0) |
32 | | -$j('div#simpleSearch > label').fadeOut(100);});$j('#searchInput, #searchInput2, #powerSearchText, #searchText').suggestions({fetch:function(query){var $this=$j(this);var request=$j.ajax({url:wgScriptPath+'/api.php',data:{'action':'opensearch','search':query,'namespace':0,'suggest':''},dataType:'json',success:function(data){$this.suggestions('suggestions',data[1]);}});$j(this).data('request',request);},cancel:function(){var request=$j(this).data('request');if(request&&typeof request.abort=='function'){request.abort();$j(this).removeData('request');}},result:{select:function($textbox){$textbox.closest('form').submit();}},delay:120,positionFromLeft:$j('body').is('.rtl'),highlightInput:true}).bind('paste cut click',function(){$j(this).trigger('keypress');});$j('#searchInput').suggestions({result:{select:function($textbox){$textbox.closest('form').submit();}},special:{render:function(query){if($j(this).children().size()==0){$j(this).show() |
33 | | -$label=$j('<div />').addClass('special-label').text(mw.usability.getMsg('vector-simplesearch-containing')).appendTo($j(this));$query=$j('<div />').addClass('special-query').text(query).appendTo($j(this));$query.autoEllipsis();}else{$j(this).find('.special-query').empty().text(query).autoEllipsis();}},select:function($textbox){$textbox.closest('form').append($j('<input />').attr({'type':'hidden','name':'fulltext','value':1}));$textbox.closest('form').submit();}},$region:$j('#simpleSearch')}).bind('paste cut click',function(){$j(this).trigger('keypress');});}); |
\ No newline at end of file |
| 32 | +$j('div#simpleSearch > label').fadeOut(100);});$j('#searchInput, #searchInput2, #powerSearchText, #searchText').suggestions({fetch:function(query){var $this=$j(this);var request=$j.ajax({url:wgScriptPath+'/api.php',data:{'action':'opensearch','search':query,'namespace':0,'suggest':''},dataType:'json',success:function(data){$this.suggestions('suggestions',data[1]);}});$j(this).data('request',request);},cancel:function(){var request=$j(this).data('request');if(request&&typeof request.abort=='function'){request.abort();$j(this).removeData('request');}},result:{select:function($textbox){$textbox.closest('form').submit();}},delay:120,positionFromLeft:$j('body').is('.rtl'),highlightInput:true}).bind('paste cut',function(){$j(this).trigger('keypress');});$j('#searchInput').suggestions({result:{select:function($textbox){$textbox.closest('form').submit();}},special:{render:function(query){if($j(this).children().size()==0){$j(this).show() |
| 33 | +$label=$j('<div />').addClass('special-label').text(mw.usability.getMsg('vector-simplesearch-containing')).appendTo($j(this));$query=$j('<div />').addClass('special-query').text(query).appendTo($j(this));$query.autoEllipsis();}else{$j(this).find('.special-query').empty().text(query).autoEllipsis();}},select:function($textbox){$textbox.closest('form').append($j('<input />').attr({'type':'hidden','name':'fulltext','value':1}));$textbox.closest('form').submit();}},$region:$j('#simpleSearch')}).bind('paste cut',function(){$j(this).trigger('keypress');});}); |
\ No newline at end of file |
Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -30,11 +30,11 @@ |
31 | 31 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
32 | 32 | ), |
33 | 33 | 'combined' => array( |
34 | | - array( 'src' => 'css/combined.css', 'version' => 107 ), |
| 34 | + array( 'src' => 'css/combined.css', 'version' => 108 ), |
35 | 35 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
36 | 36 | ), |
37 | 37 | 'minified' => array( |
38 | | - array( 'src' => 'css/combined.min.css', 'version' => 107 ), |
| 38 | + array( 'src' => 'css/combined.min.css', 'version' => 108 ), |
39 | 39 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
40 | 40 | ), |
41 | 41 | ) |
— | — | @@ -71,7 +71,7 @@ |
72 | 72 | array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 70 ), |
73 | 73 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 26 ), |
74 | 74 | array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 98 ), |
75 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 11 ), |
| 75 | + array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 12 ), |
76 | 76 | array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 77 ), |
77 | 77 | array( 'src' => 'js/plugins/jquery.wikiEditor.templates.js', 'version' => 1 ), |
78 | 78 | array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 5 ), |
— | — | @@ -80,10 +80,10 @@ |
81 | 81 | array( 'src' => 'js/thirdparty/contentCollector.js', 'version' => 2 ), |
82 | 82 | ), |
83 | 83 | 'combined' => array( |
84 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 440 ), |
| 84 | + array( 'src' => 'js/plugins.combined.js', 'version' => 442 ), |
85 | 85 | ), |
86 | 86 | 'minified' => array( |
87 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 445 ), |
| 87 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 448 ), |
88 | 88 | ), |
89 | 89 | ), |
90 | 90 | ); |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -13,7 +13,7 @@ |
14 | 14 | static $scripts = array( |
15 | 15 | 'raw' => array( |
16 | 16 | array( 'src' => 'Modules/Highlight/Highlight.js', 'version' => 5 ), |
17 | | - array( 'src' => 'Modules/Preview/Preview.js', 'version' => 7 ), |
| 17 | + array( 'src' => 'Modules/Preview/Preview.js', 'version' => 8 ), |
18 | 18 | array( 'src' => 'Modules/Publish/Publish.js', 'version' => 6 ), |
19 | 19 | array( 'src' => 'Modules/Toc/Toc.js', 'version' => 7 ), |
20 | 20 | array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 96 ), |
— | — | @@ -22,10 +22,10 @@ |
23 | 23 | array( 'src' => 'Modules/AddMediaWizard/AddMediaWizard.js', 'version' => 6 ), |
24 | 24 | ), |
25 | 25 | 'combined' => array( |
26 | | - array( 'src' => 'WikiEditor.combined.js', 'version' => 104 ), |
| 26 | + array( 'src' => 'WikiEditor.combined.js', 'version' => 106 ), |
27 | 27 | ), |
28 | 28 | 'minified' => array( |
29 | | - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 104 ), |
| 29 | + array( 'src' => 'WikiEditor.combined.min.js', 'version' => 106 ), |
30 | 30 | ), |
31 | 31 | ); |
32 | 32 | static $messages = array( |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -277,7 +277,7 @@ |
278 | 278 | if ( !( text in cache ) ) { |
279 | 279 | cache[text] = {}; |
280 | 280 | } |
281 | | - if ( !( text in matchTextCache ) ) { |
| 281 | + if ( options.matchText && !( text in matchTextCache ) ) { |
282 | 282 | matchTextCache[text] = {}; |
283 | 283 | } |
284 | 284 | if ( options.matchText && !( options.matchText in matchTextCache[text] ) ) { |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | {$.eachAsync(this,opts);return this;}})(jQuery);(function($){var cache={};var matchTextCache={};$.fn.autoEllipsis=function(options){options=$.extend({'position':'center','tooltip':false,'restoreText':false,'hasSpan':false,'matchText':null},options);$(this).each(function(){var $this=$(this);if(options.restoreText){if(!$this.data('autoEllipsis.originalText')){$this.data('autoEllipsis.originalText',$this.text());}else{$this.text($this.data('autoEllipsis.originalText'));}} |
23 | 23 | var $container=$this;var $trimmableText=null;var $protectedText=null;if(options.matchText){var text=$this.text();var matchedText=options.matchText;$trimmableText=$('<span />').css('whiteSpace','nowrap').addClass('autoellipsis-trimmed').text($this.text().substr(matchedText.length,$this.text().length));$protectedText=$('<span />').addClass('autoellipsis-matched').css('whiteSpace','nowrap').text(options.matchText);$container.empty().append($protectedText).append($trimmableText);}else{if(options.hasSpan){$trimmableText=$this.children(options.selector);}else{$trimmableText=$('<span />').css('whiteSpace','nowrap').text($this.text());$this.empty().append($trimmableText);}} |
24 | 24 | var text=$container.text();var trimmableText=$trimmableText.text();var w=$container.width();var pw=$protectedText?$protectedText.width():0;if(!(text in cache)){cache[text]={};} |
25 | | -if(!(text in matchTextCache)){matchTextCache[text]={};} |
| 25 | +if(options.matchText&&!(text in matchTextCache)){matchTextCache[text]={};} |
26 | 26 | if(options.matchText&&!(options.matchText in matchTextCache[text])){matchTextCache[text][options.matchText]={};} |
27 | 27 | if(!options.matchText&&w in cache[text]){$container.html(cache[text][w]);if(options.tooltip) |
28 | 28 | $container.attr('title',text);return;} |