Index: trunk/extensions/UsabilityInitiative/Vector/Modules/ExpandableSearch/ExpandableSearch.js |
— | — | @@ -5,6 +5,32 @@ |
6 | 6 | if( !wgVectorEnabledModules.expandablesearch || skin != 'vector' ) { |
7 | 7 | return true; |
8 | 8 | } |
| 9 | + |
| 10 | + /* Browser Support */ |
| 11 | + |
| 12 | + var map = { |
| 13 | + // Left-to-right languages |
| 14 | + 'ltr': { |
| 15 | + // Collapsible Nav is broken in Opera < 9.6 and Konqueror < 4 |
| 16 | + 'msie': [['>=', 8]], |
| 17 | + 'blackberry': false, |
| 18 | + 'ipod': false, |
| 19 | + 'iphone': false, |
| 20 | + 'ps3': false |
| 21 | + }, |
| 22 | + // Right-to-left languages |
| 23 | + 'rtl': { |
| 24 | + 'msie': [['>=', 8]], |
| 25 | + 'blackberry': false, |
| 26 | + 'ipod': false, |
| 27 | + 'iphone': false, |
| 28 | + 'ps3': false |
| 29 | + } |
| 30 | + }; |
| 31 | + if ( !mw.usability.testBrowser( map ) ) { |
| 32 | + return true; |
| 33 | + } |
| 34 | + |
9 | 35 | $j( '#searchInput' ) |
10 | 36 | .expandableField( { |
11 | 37 | 'beforeExpand': function( context ) { |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php |
— | — | @@ -14,16 +14,16 @@ |
15 | 15 | 'raw' => array( |
16 | 16 | array( 'src' => 'Modules/CollapsibleNav/CollapsibleNav.js', 'version' => 25 ), |
17 | 17 | array( 'src' => 'Modules/CollapsibleTabs/CollapsibleTabs.js', 'version' => 8 ), |
18 | | - array( 'src' => 'Modules/ExpandableSearch/ExpandableSearch.js', 'version' => 4 ), |
| 18 | + array( 'src' => 'Modules/ExpandableSearch/ExpandableSearch.js', 'version' => 5 ), |
19 | 19 | array( 'src' => 'Modules/EditWarning/EditWarning.js', 'version' => 8 ), |
20 | 20 | array( 'src' => 'Modules/FooterCleanup/FooterCleanup.js', 'version' => 5 ), |
21 | 21 | array( 'src' => 'Modules/SimpleSearch/SimpleSearch.js', 'version' => 17 ), |
22 | 22 | ), |
23 | 23 | 'combined' => array( |
24 | | - array( 'src' => 'Vector.combined.js', 'version' => 52 ), |
| 24 | + array( 'src' => 'Vector.combined.js', 'version' => 53 ), |
25 | 25 | ), |
26 | 26 | 'minified' => array( |
27 | | - array( 'src' => 'Vector.combined.min.js', 'version' => 53 ), |
| 27 | + array( 'src' => 'Vector.combined.min.js', 'version' => 54 ), |
28 | 28 | ), |
29 | 29 | ); |
30 | 30 | static $modules = array( |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.js |
— | — | @@ -347,6 +347,32 @@ |
348 | 348 | if( !wgVectorEnabledModules.expandablesearch || skin != 'vector' ) { |
349 | 349 | return true; |
350 | 350 | } |
| 351 | + |
| 352 | + /* Browser Support */ |
| 353 | + |
| 354 | + var map = { |
| 355 | + // Left-to-right languages |
| 356 | + 'ltr': { |
| 357 | + // Collapsible Nav is broken in Opera < 9.6 and Konqueror < 4 |
| 358 | + 'msie': [['>=', 8]], |
| 359 | + 'blackberry': false, |
| 360 | + 'ipod': false, |
| 361 | + 'iphone': false, |
| 362 | + 'ps3': false |
| 363 | + }, |
| 364 | + // Right-to-left languages |
| 365 | + 'rtl': { |
| 366 | + 'msie': [['>=', 8]], |
| 367 | + 'blackberry': false, |
| 368 | + 'ipod': false, |
| 369 | + 'iphone': false, |
| 370 | + 'ps3': false |
| 371 | + } |
| 372 | + }; |
| 373 | + if ( !mw.usability.testBrowser( map ) ) { |
| 374 | + return true; |
| 375 | + } |
| 376 | + |
351 | 377 | $j( '#searchInput' ) |
352 | 378 | .expandableField( { |
353 | 379 | 'beforeExpand': function( context ) { |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.min.js |
— | — | @@ -19,6 +19,7 @@ |
20 | 20 | if(fallbackResult!==undefined){return fallbackResult;} |
21 | 21 | if(wgAction=='submit'||$j('#wpTextbox1').data('origtext')!=$j('#wpTextbox1').val()||$j('#wpSummary').data('origtext')!=$j('#wpSummary').val()){return mw.usability.getMsg('vector-editwarning-warning');}} |
22 | 22 | $j('form').submit(function(){window.onbeforeunload=fallbackWindowOnBeforeUnload;});});var fallbackWindowOnBeforeUnload=null;$j(document).ready(function(){if(!wgVectorEnabledModules.expandablesearch||skin!='vector'){return true;} |
| 23 | +var map={'ltr':{'msie':[['>=',8]],'blackberry':false,'ipod':false,'iphone':false,'ps3':false},'rtl':{'msie':[['>=',8]],'blackberry':false,'ipod':false,'iphone':false,'ps3':false}};if(!mw.usability.testBrowser(map)){return true;} |
23 | 24 | $j('#searchInput').expandableField({'beforeExpand':function(context){$j(this).parent().animate({'borderTopColor':'#a0d8ff','borderLeftColor':'#a0d8ff','borderRightColor':'#a0d8ff','borderBottomColor':'#a0d8ff'},'fast');},'beforeCondense':function(context){$j(this).parent().animate({'borderTopColor':'#aaaaaa','borderLeftColor':'#aaaaaa','borderRightColor':'#aaaaaa','borderBottomColor':'#aaaaaa'},'fast');},'afterExpand':function(context){if(typeof $j.collapsibleTabs!='undefined'){$j.collapsibleTabs.handleResize();}},'afterCondense':function(context){if(typeof $j.collapsibleTabs!='undefined'){$j.collapsibleTabs.handleResize();}},'expandToLeft':!$j('body').is('.rtl')}).css('float',$j('body').is('.rtl')?'right':'left').siblings('button').css('float',$j('body').is('.rtl')?'left':'right');});$j(document).ready(function(){if(!wgVectorEnabledModules.footercleanup){return true;} |
24 | 25 | $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>' |
25 | 26 | +transclusionCount |