Index: trunk/extensions/UsabilityInitiative/Vector/Modules/SimpleSearch/SimpleSearch.js |
— | — | @@ -18,6 +18,7 @@ |
19 | 19 | 'ltr': { |
20 | 20 | // SimpleSearch is broken in Opera < 9.6 |
21 | 21 | 'opera': [['>=', 9.6]], |
| 22 | + 'docomo': false, |
22 | 23 | 'blackberry': false, |
23 | 24 | 'ipod': false, |
24 | 25 | 'iphone': false |
— | — | @@ -25,6 +26,7 @@ |
26 | 27 | // Right-to-left languages |
27 | 28 | 'rtl': { |
28 | 29 | 'opera': [['>=', 9.6]], |
| 30 | + 'docomo': false, |
29 | 31 | 'blackberry': false, |
30 | 32 | 'ipod': false, |
31 | 33 | 'iphone': false |
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' => 10 ), |
20 | 20 | array( 'src' => 'Modules/FooterCleanup/FooterCleanup.js', 'version' => 5 ), |
21 | | - array( 'src' => 'Modules/SimpleSearch/SimpleSearch.js', 'version' => 21 ), |
| 21 | + array( 'src' => 'Modules/SimpleSearch/SimpleSearch.js', 'version' => 22 ), |
22 | 22 | ), |
23 | 23 | 'combined' => array( |
24 | | - array( 'src' => 'Vector.combined.js', 'version' => 64 ), |
| 24 | + array( 'src' => 'Vector.combined.js', 'version' => 65 ), |
25 | 25 | ), |
26 | 26 | 'minified' => array( |
27 | | - array( 'src' => 'Vector.combined.min.js', 'version' => 65 ), |
| 27 | + array( 'src' => 'Vector.combined.min.js', 'version' => 66 ), |
28 | 28 | ), |
29 | 29 | ); |
30 | 30 | static $modules = array( |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.js |
— | — | @@ -528,6 +528,7 @@ |
529 | 529 | 'ltr': { |
530 | 530 | // SimpleSearch is broken in Opera < 9.6 |
531 | 531 | 'opera': [['>=', 9.6]], |
| 532 | + 'docomo': false, |
532 | 533 | 'blackberry': false, |
533 | 534 | 'ipod': false, |
534 | 535 | 'iphone': false |
— | — | @@ -535,6 +536,7 @@ |
536 | 537 | // Right-to-left languages |
537 | 538 | 'rtl': { |
538 | 539 | 'opera': [['>=', 9.6]], |
| 540 | + 'docomo': false, |
539 | 541 | 'blackberry': false, |
540 | 542 | 'ipod': false, |
541 | 543 | 'iphone': false |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.min.js |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | +transclusionCount |
27 | 27 | +'</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=[];} |
28 | 28 | $j(document).ready(function(){if(!wgVectorEnabledModules.simplesearch||wgVectorPreferences.simplesearch.disablesuggest||skin!='vector'){return true;} |
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;} |
| 29 | +var mod={'browsers':{'ltr':{'opera':[['>=',9.6]],'docomo':false,'blackberry':false,'ipod':false,'iphone':false},'rtl':{'opera':[['>=',9.6]],'docomo':false,'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 | 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(e){$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() |
Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -54,20 +54,20 @@ |
55 | 55 | 'base_sets' => array( |
56 | 56 | 'raw' => array( |
57 | 57 | // Common UsabilityInitiative funtions |
58 | | - array( 'src' => 'js/usability.js', 'version' => 3 ), |
| 58 | + array( 'src' => 'js/usability.js', 'version' => 4 ), |
59 | 59 | |
60 | 60 | // Core functionality of extension scripts |
61 | 61 | array( 'src' => 'js/plugins/jquery.async.js', 'version' => 3 ), |
62 | | - array( 'src' => 'js/plugins/jquery.autoEllipsis.js', 'version' => 15 ), |
63 | | - array( 'src' => 'js/plugins/jquery.browser.js', 'version' => 8 ), |
| 62 | + array( 'src' => 'js/plugins/jquery.autoEllipsis.js', 'version' => 16 ), |
| 63 | + array( 'src' => 'js/plugins/jquery.browser.js', 'version' => 9 ), |
64 | 64 | array( 'src' => 'js/plugins/jquery.collapsibleTabs.js', 'version' => 6 ), |
65 | 65 | array( 'src' => 'js/plugins/jquery.color.js', 'version' => 1 ), |
66 | 66 | array( 'src' => 'js/plugins/jquery.cookie.js', 'version' => 4 ), |
67 | 67 | array( 'src' => 'js/plugins/jquery.delayedBind.js', 'version' => 1 ), |
68 | 68 | array( 'src' => 'js/plugins/jquery.expandableField.js', 'version' => 17 ), |
69 | | - array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 31 ), |
| 69 | + array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 32 ), |
70 | 70 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 36 ), |
71 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 195 ), |
| 71 | + array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 196 ), |
72 | 72 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 53 ), |
73 | 73 | array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 71 ), |
74 | 74 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 28 ), |
— | — | @@ -82,10 +82,10 @@ |
83 | 83 | array( 'src' => 'js/thirdparty/contentCollector.js', 'version' => 2 ), |
84 | 84 | ), |
85 | 85 | 'combined' => array( |
86 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 447 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 448 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 457 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 458 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Index: trunk/extensions/UsabilityInitiative/js/usability.js |
— | — | @@ -92,6 +92,10 @@ |
93 | 93 | mw.usability.testBrowser = function( map ) { |
94 | 94 | // Check over each browser condition to determine if we are running in a compatible client |
95 | 95 | var browser = map[$j( 'body' ).is( '.rtl' ) ? 'rtl' : 'ltr'][$j.browser.name]; |
| 96 | + // if the browser is set to a boolean value, return that value |
| 97 | + if ( typeof browser == 'boolean' ) { |
| 98 | + return browser; |
| 99 | + } |
96 | 100 | if ( typeof browser !== 'object' ) { |
97 | 101 | // Unknown, so we assume it's working |
98 | 102 | return true; |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.browser.js |
— | — | @@ -65,7 +65,7 @@ |
66 | 66 | ['PLAYSTATION 3', 'PS3'] |
67 | 67 | ]) : a).toLowerCase(); |
68 | 68 | |
69 | | - $.browser = $.extend((!z) ? $.browser : {}, c(a, /(camino|chrome|firefox|netscape|konqueror|lynx|msie|opera|safari|ipod|iphone|blackberry|ps3)/, [], /(camino|chrome|firefox|netscape|netscape6|opera|version|konqueror|lynx|msie|safari|ps3)(\/|\;?\s|)([a-z0-9\.\+]*?)(\;|dev|rel|\)|\s|$)/)); |
| 69 | + $.browser = $.extend((!z) ? $.browser : {}, c(a, /(camino|chrome|firefox|netscape|konqueror|lynx|msie|opera|safari|ipod|iphone|blackberry|ps3|docomo)/, [], /(camino|chrome|firefox|netscape|netscape6|opera|version|konqueror|lynx|msie|safari|ps3)(\/|\;?\s|)([a-z0-9\.\+]*?)(\;|dev|rel|\)|\s|$)/)); |
70 | 70 | |
71 | 71 | $.layout = c(a, /(gecko|konqueror|msie|opera|webkit)/, [ |
72 | 72 | ['konqueror', 'khtml'], |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -92,6 +92,10 @@ |
93 | 93 | mw.usability.testBrowser = function( map ) { |
94 | 94 | // Check over each browser condition to determine if we are running in a compatible client |
95 | 95 | var browser = map[$j( 'body' ).is( '.rtl' ) ? 'rtl' : 'ltr'][$j.browser.name]; |
| 96 | + // if the browser is set to a boolean value, return that value |
| 97 | + if ( typeof browser == 'boolean' ) { |
| 98 | + return browser; |
| 99 | + } |
96 | 100 | if ( typeof browser !== 'object' ) { |
97 | 101 | // Unknown, so we assume it's working |
98 | 102 | return true; |
— | — | @@ -420,7 +424,7 @@ |
421 | 425 | ['PLAYSTATION 3', 'PS3'] |
422 | 426 | ]) : a).toLowerCase(); |
423 | 427 | |
424 | | - $.browser = $.extend((!z) ? $.browser : {}, c(a, /(camino|chrome|firefox|netscape|konqueror|lynx|msie|opera|safari|ipod|iphone|blackberry|ps3)/, [], /(camino|chrome|firefox|netscape|netscape6|opera|version|konqueror|lynx|msie|safari|ps3)(\/|\;?\s|)([a-z0-9\.\+]*?)(\;|dev|rel|\)|\s|$)/)); |
| 428 | + $.browser = $.extend((!z) ? $.browser : {}, c(a, /(camino|chrome|firefox|netscape|konqueror|lynx|msie|opera|safari|ipod|iphone|blackberry|ps3|docomo)/, [], /(camino|chrome|firefox|netscape|netscape6|opera|version|konqueror|lynx|msie|safari|ps3)(\/|\;?\s|)([a-z0-9\.\+]*?)(\;|dev|rel|\)|\s|$)/)); |
425 | 429 | |
426 | 430 | $.layout = c(a, /(gecko|konqueror|msie|opera|webkit)/, [ |
427 | 431 | ['konqueror', 'khtml'], |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -4,7 +4,8 @@ |
5 | 5 | mw.usability.load=function(deps,callback){var needJUI=false;for(var i=0;i<deps.length&&!needJUI;i++){if(deps[i]=='$j.ui'){needJUI=true;}} |
6 | 6 | if(needJUI&&typeof $j.ui=='undefined'){$j.getScript(wgScriptPath+'/extensions/UsabilityInitiative/js/js2stopgap/jui.combined.min.js',callback);}else{callback();}};mw.usability.addMessages=function(messages){for(var key in messages){this.messages[key]=messages[key];}};mw.usability.getMsg=function(key,args){if(!(key in this.messages)){return'['+key+']';} |
7 | 7 | var msg=this.messages[key];if(typeof args=='object'||typeof args=='array'){for(var argKey in args){msg=msg.replace('\$'+(parseInt(argKey)+1),args[argKey]);}}else if(typeof args=='string'||typeof args=='number'){msg=msg.replace('$1',args);} |
8 | | -return msg;};mw.usability.testBrowser=function(map){var browser=map[$j('body').is('.rtl')?'rtl':'ltr'][$j.browser.name];if(typeof browser!=='object'){return true;} |
| 8 | +return msg;};mw.usability.testBrowser=function(map){var browser=map[$j('body').is('.rtl')?'rtl':'ltr'][$j.browser.name];if(typeof browser=='boolean'){return browser;} |
| 9 | +if(typeof browser!=='object'){return true;} |
9 | 10 | for(var condition in browser){var op=browser[condition][0];var val=browser[condition][1];if(val===false){return false;}else if(typeof val=='string'){if(!(eval('$j.browser.version'+op+'"'+val+'"'))){return false;}}else if(typeof val=='number'){if(!(eval('$j.browser.versionNumber'+op+val))){return false;}}} |
10 | 11 | return true;};mw.usability.getMaxTabIndex=function(){var maxTI=0;$j('[tabindex]').each(function(){var ti=parseInt($j(this).attr('tabindex'));if(ti>maxTI){maxTI=ti;}});return maxTI;};(function($){$.whileAsync=function(opts) |
11 | 12 | {var delay=Math.abs(opts.delay)||10,bulk=isNaN(opts.bulk)?500:Math.abs(opts.bulk),test=opts.test||function(){return true;},loop=opts.loop||function(){},end=opts.end||function(){};(function(){var t=false,begin=new Date();while(t=test()) |
— | — | @@ -35,7 +36,7 @@ |
36 | 37 | return r;},c=function(i,a,b,c){var r={name:m((a.exec(i)||[u,u])[1],b)};r[r.name]=true;r.version=(c.exec(i)||[x,x,x,x])[3];if(r.name.match(/safari/)&&r.version>400){r.version='2.0';} |
37 | 38 | if(r.name==='presto'){r.version=($.browser.version>9.27)?'futhark':'linear_b';} |
38 | 39 | if(r.name==='opera'&&$.browser.version>=9.8){r.version=i.match(/version\/([0-9\.]*)/i)[1]||10;} |
39 | | -r.versionNumber=parseFloat(r.version,10)||0;r.versionX=(r.version!==x)?(r.version+'').substr(0,1):x;r.className=r.name+r.versionX;return r;};a=(a.match(/Opera|Navigator|Minefield|KHTML|Chrome|PLAYSTATION 3/)?m(a,[[/(Firefox|MSIE|KHTML,\slike\sGecko|Konqueror)/,''],['Chrome Safari','Chrome'],['KHTML','Konqueror'],['Minefield','Firefox'],['Navigator','Netscape'],['PLAYSTATION 3','PS3']]):a).toLowerCase();$.browser=$.extend((!z)?$.browser:{},c(a,/(camino|chrome|firefox|netscape|konqueror|lynx|msie|opera|safari|ipod|iphone|blackberry|ps3)/,[],/(camino|chrome|firefox|netscape|netscape6|opera|version|konqueror|lynx|msie|safari|ps3)(\/|\;?\s|)([a-z0-9\.\+]*?)(\;|dev|rel|\)|\s|$)/));$.layout=c(a,/(gecko|konqueror|msie|opera|webkit)/,[['konqueror','khtml'],['msie','trident'],['opera','presto']],/(applewebkit|rv|konqueror|msie)(\:|\/|\s)([a-z0-9\.]*?)(\;|\)|\s)/);$.os={name:(/(win|mac|linux|sunos|solaris|iphone)/.exec(navigator.platform.toLowerCase())||[u])[0].replace('sunos','solaris')};if(!z){$('html').addClass([$.os.name,$.browser.name,$.browser.className,$.layout.name,$.layout.className].join(' '));}};$.browserTest(navigator.userAgent);})(jQuery);(function($){$.fn.collapsibleTabs=function($$options){if(!this.length)return this;var $settings=$.extend({},$.collapsibleTabs.defaults,$$options);this.each(function(){var $this=$(this);$.collapsibleTabs.instances=($.collapsibleTabs.instances.length==0?$this:$.collapsibleTabs.instances.add($this));$this.data('collapsibleTabsSettings',$settings);$this.children($settings.collapsible).each(function(){$.collapsibleTabs.addData($(this));});});if(!$.collapsibleTabs.boundEvent){$(window).delayedBind('500','resize',function(){$.collapsibleTabs.handleResize();});} |
| 40 | +r.versionNumber=parseFloat(r.version,10)||0;r.versionX=(r.version!==x)?(r.version+'').substr(0,1):x;r.className=r.name+r.versionX;return r;};a=(a.match(/Opera|Navigator|Minefield|KHTML|Chrome|PLAYSTATION 3/)?m(a,[[/(Firefox|MSIE|KHTML,\slike\sGecko|Konqueror)/,''],['Chrome Safari','Chrome'],['KHTML','Konqueror'],['Minefield','Firefox'],['Navigator','Netscape'],['PLAYSTATION 3','PS3']]):a).toLowerCase();$.browser=$.extend((!z)?$.browser:{},c(a,/(camino|chrome|firefox|netscape|konqueror|lynx|msie|opera|safari|ipod|iphone|blackberry|ps3|docomo)/,[],/(camino|chrome|firefox|netscape|netscape6|opera|version|konqueror|lynx|msie|safari|ps3)(\/|\;?\s|)([a-z0-9\.\+]*?)(\;|dev|rel|\)|\s|$)/));$.layout=c(a,/(gecko|konqueror|msie|opera|webkit)/,[['konqueror','khtml'],['msie','trident'],['opera','presto']],/(applewebkit|rv|konqueror|msie)(\:|\/|\s)([a-z0-9\.]*?)(\;|\)|\s)/);$.os={name:(/(win|mac|linux|sunos|solaris|iphone)/.exec(navigator.platform.toLowerCase())||[u])[0].replace('sunos','solaris')};if(!z){$('html').addClass([$.os.name,$.browser.name,$.browser.className,$.layout.name,$.layout.className].join(' '));}};$.browserTest(navigator.userAgent);})(jQuery);(function($){$.fn.collapsibleTabs=function($$options){if(!this.length)return this;var $settings=$.extend({},$.collapsibleTabs.defaults,$$options);this.each(function(){var $this=$(this);$.collapsibleTabs.instances=($.collapsibleTabs.instances.length==0?$this:$.collapsibleTabs.instances.add($this));$this.data('collapsibleTabsSettings',$settings);$this.children($settings.collapsible).each(function(){$.collapsibleTabs.addData($(this));});});if(!$.collapsibleTabs.boundEvent){$(window).delayedBind('500','resize',function(){$.collapsibleTabs.handleResize();});} |
40 | 41 | $.collapsibleTabs.handleResize();return this;};$.collapsibleTabs={instances:[],boundEvent:null,defaults:{expandedContainer:'#p-views ul',collapsedContainer:'#p-cactions ul',collapsible:'li.collapsible',shifting:false,expandCondition:function(eleWidth){return($('#left-navigation').position().left+$('#left-navigation').width())<($('#right-navigation').position().left-eleWidth);},collapseCondition:function(){return($('#left-navigation').position().left+$('#left-navigation').width())>$('#right-navigation').position().left;}},addData:function($collapsible){var $settings=$collapsible.parent().data('collapsibleTabsSettings');$collapsible.data('collapsibleTabsSettings',{'expandedContainer':$settings.expandedContainer,'collapsedContainer':$settings.collapsedContainer,'expandedWidth':$collapsible.width(),'prevElement':$collapsible.prev()});},getSettings:function($collapsible){var $settings=$collapsible.data('collapsibleTabsSettings');if(typeof $settings=='undefined'){$.collapsibleTabs.addData($collapsible);$settings=$collapsible.data('collapsibleTabsSettings');} |
41 | 42 | return $settings;},handleResize:function(e){$.collapsibleTabs.instances.each(function(){var $this=$(this),data=$.collapsibleTabs.getSettings($this);if(data.shifting)return;if($this.children(data.collapsible).length>0&&data.collapseCondition()){$this.trigger("beforeTabCollapse");$.collapsibleTabs.moveToCollapsed($this.children(data.collapsible+':last'));} |
42 | 43 | if($(data.collapsedContainer+' '+data.collapsible).length>0&&data.expandCondition($.collapsibleTabs.getSettings($(data.collapsedContainer).children(data.collapsible+":first")).expandedWidth)){$this.trigger("beforeTabExpand");$.collapsibleTabs.moveToExpanded(data.collapsedContainer+" "+data.collapsible+':first');}});},moveToCollapsed:function(ele){var $moving=$(ele);var data=$.collapsibleTabs.getSettings($moving);var dataExp=$.collapsibleTabs.getSettings(data.expandedContainer);dataExp.shifting=true;$moving.remove().prependTo(data.collapsedContainer).data('collapsibleTabsSettings',data);dataExp.shifting=false;$.collapsibleTabs.handleResize();},moveToExpanded:function(ele){var $moving=$(ele);var data=$.collapsibleTabs.getSettings($moving);var dataExp=$.collapsibleTabs.getSettings(data.expandedContainer);dataExp.shifting=true;$moving.remove().insertAfter(data.prevElement).data('collapsibleTabsSettings',data);dataExp.shifting=false;$.collapsibleTabs.handleResize();}};})(jQuery);(function(jQuery){jQuery.each(['backgroundColor','borderBottomColor','borderLeftColor','borderRightColor','borderTopColor','color','outlineColor'],function(i,attr){jQuery.fx.step[attr]=function(fx){if(fx.state==0){fx.start=getColor(fx.elem,attr);fx.end=getRGB(fx.end);} |