r62938 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62937‎ | r62938 | r62939 >
Date:21:08, 24 February 2010
Author:tparscal
Status:ok
Tags:
Comment:
Fixes typo in r62903 that used | instead of ||.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.browser.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -65,7 +65,7 @@
6666 // Core functionality of extension scripts
6767 array( 'src' => 'js/plugins/jquery.async.js', 'version' => 3 ),
6868 array( 'src' => 'js/plugins/jquery.autoEllipsis.js', 'version' => 7 ),
69 - array( 'src' => 'js/plugins/jquery.browser.js', 'version' => 4 ),
 69+ array( 'src' => 'js/plugins/jquery.browser.js', 'version' => 5 ),
7070 array( 'src' => 'js/plugins/jquery.collapsibleTabs.js', 'version' => 5 ),
7171 array( 'src' => 'js/plugins/jquery.cookie.js', 'version' => 4 ),
7272 array( 'src' => 'js/plugins/jquery.delayedBind.js', 'version' => 1 ),
@@ -82,10 +82,10 @@
8383 array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 3 ),
8484 ),
8585 'combined' => array(
86 - array( 'src' => 'js/plugins.combined.js', 'version' => 285 ),
 86+ array( 'src' => 'js/plugins.combined.js', 'version' => 286 ),
8787 ),
8888 'minified' => array(
89 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 285 ),
 89+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 286 ),
9090 ),
9191 ),
9292 );
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.browser.js
@@ -47,7 +47,7 @@
4848 }
4949
5050 if (r.name === 'opera' && $.browser.version >= 9.8) {
51 - r.version = i.match( /version\/([0-9\.]*)/i )[1] | 10;
 51+ r.version = i.match( /version\/([0-9\.]*)/i )[1] || 10;
5252 }
5353 r.versionNumber = parseFloat(r.version, 10) || 0;
5454 r.versionX = (r.version !== x) ? (r.version + '').substr(0, 1) : x;
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -5308,7 +5308,7 @@
53095309 }
53105310
53115311 if (r.name === 'opera' && $.browser.version >= 9.8) {
5312 - r.version = i.match( /version\/([0-9\.]*)/i )[1] | 10;
 5312+ r.version = i.match( /version\/([0-9\.]*)/i )[1] || 10;
53135313 }
53145314 r.versionNumber = parseFloat(r.version, 10) || 0;
53155315 r.versionX = (r.version !== x) ? (r.version + '').substr(0, 1) : x;
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -370,7 +370,7 @@
371371 cache[text][w]=$text.text();});};})(jQuery);(function($){$.browserTest=function(a,z){var u='unknown',x='X',m=function(r,h){for(var i=0;i<h.length;i=i+1){r=r.replace(h[i][0],h[i][1]);}
372372 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';}
373373 if(r.name==='presto'){r.version=($.browser.version>9.27)?'futhark':'linear_b';}
374 -if(r.name==='opera'&&$.browser.version>=9.8){r.version=i.match(/version\/([0-9\.]*)/i)[1]|10;}
 374+if(r.name==='opera'&&$.browser.version>=9.8){r.version=i.match(/version\/([0-9\.]*)/i)[1]||10;}
375375 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/)?m(a,[[/(Firefox|MSIE|KHTML,\slike\sGecko|Konqueror)/,''],['Chrome Safari','Chrome'],['KHTML','Konqueror'],['Minefield','Firefox'],['Navigator','Netscape']]):a).toLowerCase();$.browser=$.extend((!z)?$.browser:{},c(a,/(camino|chrome|firefox|netscape|konqueror|lynx|msie|opera|safari)/,[],/(camino|chrome|firefox|netscape|netscape6|opera|version|konqueror|lynx|msie|safari)(\/|\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(){var $collapsible=$(this);$collapsible.data('collapsibleTabsSettings',{'expandedContainer':$settings.expandedContainer,'collapsedContainer':$settings.collapsedContainer,'expandedWidth':$collapsible.width(),'prevElement':$collapsible.prev()});});});if(!$.collapsibleTabs.boundEvent){$(window).delayedBind('500','resize',function(){$.collapsibleTabs.handleResize();});}
376376 $.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;}},handleResize:function(e){$.collapsibleTabs.instances.each(function(){var $this=$(this),data=$this.data('collapsibleTabsSettings');if(data.shifting)return;if($this.children(data.collapsible).length>0&&data.collapseCondition()){$this.trigger("beforeTabCollapse");$.collapsibleTabs.moveToCollapsed($this.children(data.collapsible+':last'));}
377377 if($(data.collapsedContainer+' '+data.collapsible).length>0&&data.expandCondition($(data.collapsedContainer).children(data.collapsible+":first").data('collapsibleTabsSettings').expandedWidth)){$this.trigger("beforeTabExpand");$.collapsibleTabs.moveToExpanded(data.collapsedContainer+" "+data.collapsible+':first');}});},moveToCollapsed:function(ele){var $moving=$(ele);var data=$moving.data('collapsibleTabsSettings');$(data.expandedContainer).data('collapsibleTabsSettings').shifting=true;$moving.remove().prependTo(data.collapsedContainer).data('collapsibleTabsSettings',data);$(data.expandedContainer).data('collapsibleTabsSettings').shifting=false;$.collapsibleTabs.handleResize();},moveToExpanded:function(ele){var $moving=$(ele);var data=$moving.data('collapsibleTabsSettings');$(data.expandedContainer).data('collapsibleTabsSettings').shifting=true;$moving.remove().insertAfter(data.prevElement).data('collapsibleTabsSettings',data);$(data.expandedContainer).data('collapsibleTabsSettings').shifting=false;$.collapsibleTabs.handleResize();}};})(jQuery);jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r62903Fixed bug in browser plugin that seeks out Opera 10's horrible user agent str...tparscal01:31, 24 February 2010

Status & tagging log