Index: trunk/extensions/UsabilityInitiative/Vector/Modules/SimpleSearch/SimpleSearch.js |
— | — | @@ -1,7 +1,8 @@ |
2 | 2 | /* JavaScript for SimpleSearch extension */ |
3 | 3 | |
4 | 4 | // Disable mwsuggest.js on searchInput |
5 | | -if ( typeof os_autoload_inputs !== 'undefined' && os_autoload_forms !== 'undefined' ) { |
| 5 | +if ( wgVectorEnabledModules.simplesearch && skin == 'vector' && typeof os_autoload_inputs !== 'undefined' && |
| 6 | + os_autoload_forms !== 'undefined' ) { |
6 | 7 | os_autoload_inputs = []; |
7 | 8 | os_autoload_forms = []; |
8 | 9 | } |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php |
— | — | @@ -16,13 +16,13 @@ |
17 | 17 | array( 'src' => 'Modules/CollapsibleTabs/CollapsibleTabs.js', 'version' => 6 ), |
18 | 18 | array( 'src' => 'Modules/EditWarning/EditWarning.js', 'version' => 5 ), |
19 | 19 | array( 'src' => 'Modules/FooterCleanup/FooterCleanup.js', 'version' => 3 ), |
20 | | - array( 'src' => 'Modules/SimpleSearch/SimpleSearch.js', 'version' => 5 ), |
| 20 | + array( 'src' => 'Modules/SimpleSearch/SimpleSearch.js', 'version' => 6 ), |
21 | 21 | ), |
22 | 22 | 'combined' => array( |
23 | | - array( 'src' => 'Vector.combined.js', 'version' => 16 ), |
| 23 | + array( 'src' => 'Vector.combined.js', 'version' => 17 ), |
24 | 24 | ), |
25 | 25 | 'minified' => array( |
26 | | - array( 'src' => 'Vector.combined.min.js', 'version' => 16 ), |
| 26 | + array( 'src' => 'Vector.combined.min.js', 'version' => 17 ), |
27 | 27 | ), |
28 | 28 | ); |
29 | 29 | static $modules = array( |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.js |
— | — | @@ -235,7 +235,8 @@ |
236 | 236 | /* JavaScript for SimpleSearch extension */ |
237 | 237 | |
238 | 238 | // Disable mwsuggest.js on searchInput |
239 | | -if ( typeof os_autoload_inputs !== 'undefined' && os_autoload_forms !== 'undefined' ) { |
| 239 | +if ( wgVectorEnabledModules.simplesearch && skin == 'vector' && typeof os_autoload_inputs !== 'undefined' && |
| 240 | + os_autoload_forms !== 'undefined' ) { |
240 | 241 | os_autoload_inputs = []; |
241 | 242 | os_autoload_forms = []; |
242 | 243 | } |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.min.js |
— | — | @@ -10,6 +10,6 @@ |
11 | 11 | $j('form').submit(function(){window.onbeforeunload=fallbackWindowOnBeforeUnload;});});var fallbackWindowOnBeforeUnload=null;mw.ready(function(){if(!wgVectorEnabledModules.footercleanup){return true;} |
12 | 12 | $j('#editpage-copywarn').add('.editOptions').wrapAll('<div id="editpage-bottom"></div>');$j('#wpSummary').data('hint',$j('#wpSummaryLabel span small').remove().text().replace(/\)|\(/g,'')).change(function(){if($j(this).val().length==0){$j(this).addClass('inline-hint').val($j(this).data('hint'));}else{$j(this).removeClass('inline-hint');}}).focus(function(){if($j(this).val()==$j(this).data('hint')){$j(this).removeClass('inline-hint').val("");}}).blur(function(){$j(this).trigger('change');}).trigger('change');$j('#wpSummary').add('.editCheckboxes').wrapAll('<div id="editpage-summary-fields"></div>');$j('#editpage-specialchars').remove();var transclusionCount=$j('.templatesUsed ul li').size();$j('.templatesUsed ul').wrap('<div id="transclusions-list" class="collapsible-list collapsed"></div>').parent().prepend('<label>This page contains <a href="http://en.wikipedia.org/wiki/transclusion">transclusions</a> of <strong>' |
13 | 13 | +transclusionCount |
14 | | -+'</strong> other pages.</label>');$j('.mw-templatesUsedExplanation').remove();$j('.collapsible-list label').click(function(){$j(this).parent().toggleClass('expanded').toggleClass('collapsed').find('ul').slideToggle('fast');return false;}).trigger('click');$j('#wpPreview, #wpDiff, .editHelp, #editpage-specialchars').remove();$j('#mw-editform-cancel').remove().appendTo('.editButtons');});if(typeof os_autoload_inputs!=='undefined'&&os_autoload_forms!=='undefined'){os_autoload_inputs=[];os_autoload_forms=[];} |
| 14 | ++'</strong> other pages.</label>');$j('.mw-templatesUsedExplanation').remove();$j('.collapsible-list label').click(function(){$j(this).parent().toggleClass('expanded').toggleClass('collapsed').find('ul').slideToggle('fast');return false;}).trigger('click');$j('#wpPreview, #wpDiff, .editHelp, #editpage-specialchars').remove();$j('#mw-editform-cancel').remove().appendTo('.editButtons');});if(wgVectorEnabledModules.simplesearch&&skin=='vector'&&typeof os_autoload_inputs!=='undefined'&&os_autoload_forms!=='undefined'){os_autoload_inputs=[];os_autoload_forms=[];} |
15 | 15 | mw.ready(function(){if(!wgVectorEnabledModules.simplesearch||skin!='vector'){return true;} |
16 | 16 | $j('div#simpleSearch > input#searchInput').each(function(){$j('<label />').text(gM('vector-simplesearch-search')).css({'display':'none','position':'absolute','bottom':0,'padding':'0.25em','color':'#999999','cursor':'text'}).css(($j('body').is('.rtl')?'right':'left'),0).click(function(){$j(this).parent().find('input#searchInput').focus();}).appendTo($j(this).parent());if($j(this).val()==''){$j(this).parent().find('label').show();}}).focus(function(){$j(this).parent().find('label').hide();}).blur(function(){if($j(this).val()==''){$j(this).parent().find('label').show();}});$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});$j('#searchInput').suggestions({result:{select:function($textbox){$textbox.closest('form').submit();}},special:{render:function(query){var perfectMatch=false;$j(this).closest('.suggestions').find('.suggestions-results div').each(function(){if($j(this).data('text')==query){perfectMatch=true;}});if(perfectMatch){if($j(this).children().size()==0){$j(this).show();$label=$j('<div />').addClass('special-label').text(gM('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();}}else{$j(this).hide();$j(this).empty();}},select:function($textbox){$textbox.closest('form').append($j('<input />').attr({'type':'hidden','name':'fulltext','value':1}));$textbox.closest('form').submit();}},$region:$j('#simpleSearch')});}); |
\ No newline at end of file |