r64865 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64864‎ | r64865 | r64866 >
Date:11:30, 10 April 2010
Author:catrope
Status:deferred
Tags:
Comment:
1.16wmf4: MFT r64864
Modified paths:
  • /branches/wmf/1.16wmf4/extensions/UsabilityInitiative (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/UsabilityInitiative/OptIn (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/UsabilityInitiative/Vector/Modules/CollapsibleTabs/CollapsibleTabs.js (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/UsabilityInitiative/Vector/Vector.combined.js (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/UsabilityInitiative/Vector/Vector.combined.min.js (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/UsabilityInitiative/Vector/Vector.hooks.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/UsabilityInitiative/js/plugins.combined.js (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/UsabilityInitiative/js/plugins.combined.min.js (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/UsabilityInitiative/js/plugins/jquery.collapsibleTabs.js (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js (modified) (history)

Diff [purge]

Index: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/Vector/Modules/CollapsibleTabs/CollapsibleTabs.js
@@ -9,11 +9,10 @@
1010 // Overloading the moveToCollapsed function to animate the transition
1111 $j.collapsibleTabs.moveToCollapsed = function( ele ) {
1212 var $moving = $j( ele );
13 - $j( $moving.data( 'collapsibleTabsSettings' ).expandedContainer )
14 - .data( 'collapsibleTabsSettings' ).shifting = true;
15 - var data = $moving.data( 'collapsibleTabsSettings' );
 13+ $j.collapsibleTabs.getSettings( $j( $j.collapsibleTabs.getSettings( $moving ).expandedContainer ) ).shifting = true;
 14+ var data = $j.collapsibleTabs.getSettings( $moving );
1615 // Remove the element from where it's at and put it in the dropdown menu
17 - var target = $moving.data( 'collapsibleTabsSettings' ).collapsedContainer;
 16+ var target = data.collapsedContainer;
1817 $moving.css( "position", "relative" )
1918 .css( ( rtl ? 'left' : 'right' ), 0 )
2019 .animate( { width: '1px' }, "normal", function() {
@@ -22,8 +21,8 @@
2322 $j( '<span class="placeholder" style="display:none;"></span>' ).insertAfter( this );
2423 $j( this ).remove().prependTo( target ).data( 'collapsibleTabsSettings', data );
2524 $j( this ).attr( 'style', 'display:list-item;' );
26 - $j( $j( ele ).data( 'collapsibleTabsSettings' ).expandedContainer )
27 - .data( 'collapsibleTabsSettings' ).shifting = false;
 25+ $j.collapsibleTabs.getSettings( $j( $j.collapsibleTabs.getSettings( $j( ele ) ).expandedContainer ) )
 26+ .shifting = false;
2827 $j.collapsibleTabs.handleResize();
2928 } );
3029 };
@@ -31,19 +30,17 @@
3231 // Overloading the moveToExpanded function to animate the transition
3332 $j.collapsibleTabs.moveToExpanded = function( ele ) {
3433 var $moving = $j( ele );
35 - $j( $moving.data( 'collapsibleTabsSettings' ).expandedContainer )
36 - .data( 'collapsibleTabsSettings' ).shifting = true;
37 - var data = $moving.data( 'collapsibleTabsSettings' );
 34+ $j.collapsibleTabs.getSettings( $j( $j.collapsibleTabs.getSettings( $moving ).expandedContainer ) ).shifting = true;
 35+ var data = $j.collapsibleTabs.getSettings( $moving );
3836 // grab the next appearing placeholder so we can use it for replacing
39 - var $target = $j( $moving.data( 'collapsibleTabsSettings' ).expandedContainer )
40 - .find( 'span.placeholder:first' );
41 - var expandedWidth = $moving.data( 'collapsibleTabsSettings' ).expandedWidth;
 37+ var $target = $j( data.expandedContainer ).find( 'span.placeholder:first' );
 38+ var expandedWidth = data.expandedWidth;
4239 $moving.css( "position", "relative" ).css( ( rtl ? 'right' : 'left' ), 0 ).css( 'width', '1px' );
4340 $target.replaceWith( $moving.remove().css( 'width', '1px' ).data( 'collapsibleTabsSettings', data )
4441 .animate( { width: expandedWidth+"px" }, "normal", function() {
4542 $j( this ).attr( 'style', 'display:block;' );
46 - $j( $moving.data( 'collapsibleTabsSettings' ).expandedContainer )
47 - .data( 'collapsibleTabsSettings' ).shifting = false;
 43+ $j.collapsibleTabs.getSettings( $j( $j.collapsibleTabs.getSettings( $moving ).expandedContainer ) )
 44+ .shifting = false;
4845 $j.collapsibleTabs.handleResize();
4946 } ) );
5047 };
Index: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/Vector/Vector.hooks.php
@@ -13,16 +13,16 @@
1414 static $scripts = array(
1515 'raw' => array(
1616 array( 'src' => 'Modules/CollapsibleNav/CollapsibleNav.js', 'version' => 8 ),
17 - array( 'src' => 'Modules/CollapsibleTabs/CollapsibleTabs.js', 'version' => 7 ),
 17+ array( 'src' => 'Modules/CollapsibleTabs/CollapsibleTabs.js', 'version' => 8 ),
1818 array( 'src' => 'Modules/EditWarning/EditWarning.js', 'version' => 8 ),
1919 array( 'src' => 'Modules/FooterCleanup/FooterCleanup.js', 'version' => 5 ),
2020 array( 'src' => 'Modules/SimpleSearch/SimpleSearch.js', 'version' => 8 ),
2121 ),
2222 'combined' => array(
23 - array( 'src' => 'Vector.combined.js', 'version' => 24 ),
 23+ array( 'src' => 'Vector.combined.js', 'version' => 25 ),
2424 ),
2525 'minified' => array(
26 - array( 'src' => 'Vector.combined.min.js', 'version' => 24 ),
 26+ array( 'src' => 'Vector.combined.min.js', 'version' => 25 ),
2727 ),
2828 );
2929 static $modules = array(
Index: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/Vector/Vector.combined.js
@@ -47,11 +47,10 @@
4848 // Overloading the moveToCollapsed function to animate the transition
4949 $j.collapsibleTabs.moveToCollapsed = function( ele ) {
5050 var $moving = $j( ele );
51 - $j( $moving.data( 'collapsibleTabsSettings' ).expandedContainer )
52 - .data( 'collapsibleTabsSettings' ).shifting = true;
53 - var data = $moving.data( 'collapsibleTabsSettings' );
 51+ $j.collapsibleTabs.getSettings( $j( $j.collapsibleTabs.getSettings( $moving ).expandedContainer ) ).shifting = true;
 52+ var data = $j.collapsibleTabs.getSettings( $moving );
5453 // Remove the element from where it's at and put it in the dropdown menu
55 - var target = $moving.data( 'collapsibleTabsSettings' ).collapsedContainer;
 54+ var target = data.collapsedContainer;
5655 $moving.css( "position", "relative" )
5756 .css( ( rtl ? 'left' : 'right' ), 0 )
5857 .animate( { width: '1px' }, "normal", function() {
@@ -60,8 +59,8 @@
6160 $j( '<span class="placeholder" style="display:none;"></span>' ).insertAfter( this );
6261 $j( this ).remove().prependTo( target ).data( 'collapsibleTabsSettings', data );
6362 $j( this ).attr( 'style', 'display:list-item;' );
64 - $j( $j( ele ).data( 'collapsibleTabsSettings' ).expandedContainer )
65 - .data( 'collapsibleTabsSettings' ).shifting = false;
 63+ $j.collapsibleTabs.getSettings( $j( $j.collapsibleTabs.getSettings( $j( ele ) ).expandedContainer ) )
 64+ .shifting = false;
6665 $j.collapsibleTabs.handleResize();
6766 } );
6867 };
@@ -69,19 +68,17 @@
7069 // Overloading the moveToExpanded function to animate the transition
7170 $j.collapsibleTabs.moveToExpanded = function( ele ) {
7271 var $moving = $j( ele );
73 - $j( $moving.data( 'collapsibleTabsSettings' ).expandedContainer )
74 - .data( 'collapsibleTabsSettings' ).shifting = true;
75 - var data = $moving.data( 'collapsibleTabsSettings' );
 72+ $j.collapsibleTabs.getSettings( $j( $j.collapsibleTabs.getSettings( $moving ).expandedContainer ) ).shifting = true;
 73+ var data = $j.collapsibleTabs.getSettings( $moving );
7674 // grab the next appearing placeholder so we can use it for replacing
77 - var $target = $j( $moving.data( 'collapsibleTabsSettings' ).expandedContainer )
78 - .find( 'span.placeholder:first' );
79 - var expandedWidth = $moving.data( 'collapsibleTabsSettings' ).expandedWidth;
 75+ var $target = $j( data.expandedContainer ).find( 'span.placeholder:first' );
 76+ var expandedWidth = data.expandedWidth;
8077 $moving.css( "position", "relative" ).css( ( rtl ? 'right' : 'left' ), 0 ).css( 'width', '1px' );
8178 $target.replaceWith( $moving.remove().css( 'width', '1px' ).data( 'collapsibleTabsSettings', data )
8279 .animate( { width: expandedWidth+"px" }, "normal", function() {
8380 $j( this ).attr( 'style', 'display:block;' );
84 - $j( $moving.data( 'collapsibleTabsSettings' ).expandedContainer )
85 - .data( 'collapsibleTabsSettings' ).shifting = false;
 81+ $j.collapsibleTabs.getSettings( $j( $j.collapsibleTabs.getSettings( $moving ).expandedContainer ) )
 82+ .shifting = false;
8683 $j.collapsibleTabs.handleResize();
8784 } ) );
8885 };
Index: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/Vector/Vector.combined.min.js
@@ -1,7 +1,7 @@
22
33 $j(document).ready(function(){if(!wgVectorEnabledModules.collapsiblenav){return true;}
44 $j('#panel').addClass('collapsible-nav');$j('#panel > div.portal:first').addClass('expanded').find('div.body').show();$j('#panel > div.portal:not(:first)').each(function(i){var state=$j.cookie('vector-nav-'+$j(this).attr('id'));if(state=='true'||(state==null&&i<1)){$j(this).addClass('expanded').find('div.body').show();}else{$j(this).addClass('collapsed');}});$j('#panel > div.portal > h5').click(function(){$j.cookie('vector-nav-'+$j(this).parent().attr('id'),$j(this).parent().is('.collapsed'));$j(this).parent().toggleClass('expanded').toggleClass('collapsed').find('div.body').slideToggle('fast');return false;});});$j(document).ready(function(){if(!wgVectorEnabledModules.collapsibletabs){return true;}
5 -var rtl=$j('body').is('.rtl');$j.collapsibleTabs.moveToCollapsed=function(ele){var $moving=$j(ele);$j($moving.data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=true;var data=$moving.data('collapsibleTabsSettings');var target=$moving.data('collapsibleTabsSettings').collapsedContainer;$moving.css("position","relative").css((rtl?'left':'right'),0).animate({width:'1px'},"normal",function(){$j(this).hide();$j('<span class="placeholder" style="display:none;"></span>').insertAfter(this);$j(this).remove().prependTo(target).data('collapsibleTabsSettings',data);$j(this).attr('style','display:list-item;');$j($j(ele).data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=false;$j.collapsibleTabs.handleResize();});};$j.collapsibleTabs.moveToExpanded=function(ele){var $moving=$j(ele);$j($moving.data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=true;var data=$moving.data('collapsibleTabsSettings');var $target=$j($moving.data('collapsibleTabsSettings').expandedContainer).find('span.placeholder:first');var expandedWidth=$moving.data('collapsibleTabsSettings').expandedWidth;$moving.css("position","relative").css((rtl?'right':'left'),0).css('width','1px');$target.replaceWith($moving.remove().css('width','1px').data('collapsibleTabsSettings',data).animate({width:expandedWidth+"px"},"normal",function(){$j(this).attr('style','display:block;');$j($moving.data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=false;$j.collapsibleTabs.handleResize();}));};$j('#p-views ul').bind("beforeTabCollapse",function(){if($j('#p-cactions').css('display')=='none')
 5+var rtl=$j('body').is('.rtl');$j.collapsibleTabs.moveToCollapsed=function(ele){var $moving=$j(ele);$j.collapsibleTabs.getSettings($j($j.collapsibleTabs.getSettings($moving).expandedContainer)).shifting=true;var data=$j.collapsibleTabs.getSettings($moving);var target=data.collapsedContainer;$moving.css("position","relative").css((rtl?'left':'right'),0).animate({width:'1px'},"normal",function(){$j(this).hide();$j('<span class="placeholder" style="display:none;"></span>').insertAfter(this);$j(this).remove().prependTo(target).data('collapsibleTabsSettings',data);$j(this).attr('style','display:list-item;');$j.collapsibleTabs.getSettings($j($j.collapsibleTabs.getSettings($j(ele)).expandedContainer)).shifting=false;$j.collapsibleTabs.handleResize();});};$j.collapsibleTabs.moveToExpanded=function(ele){var $moving=$j(ele);$j.collapsibleTabs.getSettings($j($j.collapsibleTabs.getSettings($moving).expandedContainer)).shifting=true;var data=$j.collapsibleTabs.getSettings($moving);var $target=$j(data.expandedContainer).find('span.placeholder:first');var expandedWidth=data.expandedWidth;$moving.css("position","relative").css((rtl?'right':'left'),0).css('width','1px');$target.replaceWith($moving.remove().css('width','1px').data('collapsibleTabsSettings',data).animate({width:expandedWidth+"px"},"normal",function(){$j(this).attr('style','display:block;');$j.collapsibleTabs.getSettings($j($j.collapsibleTabs.getSettings($moving).expandedContainer)).shifting=false;$j.collapsibleTabs.handleResize();}));};$j('#p-views ul').bind("beforeTabCollapse",function(){if($j('#p-cactions').css('display')=='none')
66 $j("#p-cactions").addClass("filledPortlet").removeClass("emptyPortlet").find('h5').css('width','1px').animate({'width':'26px'},390);}).bind("beforeTabExpand",function(){if($j('#p-cactions li').length==1)
77 $j("#p-cactions h5").animate({'width':'1px'},370,function(){$j(this).attr('style','').parent().addClass("emptyPortlet").removeClass("filledPortlet");});}).collapsibleTabs({expandCondition:function(eleWidth){if(rtl){return($j('#right-navigation').position().left+$j('#right-navigation').width()+1)<($j('#left-navigation').position().left-eleWidth);}else{return($j('#left-navigation').position().left+$j('#left-navigation').width()+1)<($j('#right-navigation').position().left-eleWidth);}},collapseCondition:function(){if(rtl){return($j('#right-navigation').position().left+$j('#right-navigation').width())>$j('#left-navigation').position().left;}else{return($j('#left-navigation').position().left+$j('#left-navigation').width())>$j('#right-navigation').position().left;}}});});$j(document).ready(function(){if(!wgVectorEnabledModules.editwarning||$j('#wpTextbox1').size()==0){return true;}
88 $j('#wpTextbox1, #wpSummary').each(function(){$j(this).data('origtext',$j(this).val());});fallbackWindowOnBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){var fallbackResult=undefined;if(fallbackWindowOnBeforeUnload){fallbackResult=fallbackWindowOnBeforeUnload();}
Index: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -66,7 +66,7 @@
6767 array( 'src' => 'js/plugins/jquery.async.js', 'version' => 3 ),
6868 array( 'src' => 'js/plugins/jquery.autoEllipsis.js', 'version' => 7 ),
6969 array( 'src' => 'js/plugins/jquery.browser.js', 'version' => 6 ),
70 - array( 'src' => 'js/plugins/jquery.collapsibleTabs.js', 'version' => 5 ),
 70+ array( 'src' => 'js/plugins/jquery.collapsibleTabs.js', 'version' => 6 ),
7171 array( 'src' => 'js/plugins/jquery.color.js', 'version' => 1 ),
7272 array( 'src' => 'js/plugins/jquery.cookie.js', 'version' => 4 ),
7373 array( 'src' => 'js/plugins/jquery.delayedBind.js', 'version' => 1 ),
@@ -82,10 +82,10 @@
8383 array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 5 ),
8484 ),
8585 'combined' => array(
86 - array( 'src' => 'js/plugins.combined.js', 'version' => 377 ),
 86+ array( 'src' => 'js/plugins.combined.js', 'version' => 380 ),
8787 ),
8888 'minified' => array(
89 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 377 ),
 89+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 380 ),
9090 ),
9191 ),
9292 );
Property changes on: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/OptIn
___________________________________________________________________
Name: svn:mergeinfo
9393 - /branches/REL1_15/phase3/extensions/UsabilityInitiative/OptIn:51646
/branches/wmf-deployment/extensions/UsabilityInitiative/OptIn:60970
/trunk/extensions/UsabilityInitiative/OptIn:56207,56209,56296,56333,56355,62041,62043,62127,62139-62140,62142-62143,62145-62146,62256,62263,62266-63865,63867-63877,63879-64124,64129-64645,64647-64648,64651
/trunk/phase3/extensions/UsabilityInitiative/OptIn:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816
9494 + /branches/REL1_15/phase3/extensions/UsabilityInitiative/OptIn:51646
/branches/wmf-deployment/extensions/UsabilityInitiative/OptIn:60970
/trunk/extensions/UsabilityInitiative/OptIn:56207,56209,56296,56333,56355,62041,62043,62127,62139-62140,62142-62143,62145-62146,62256,62263,62266-63865,63867-63877,63879-64124,64129-64645,64647-64648,64651,64864
/trunk/phase3/extensions/UsabilityInitiative/OptIn:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816
Property changes on: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js
___________________________________________________________________
Name: svn:mergeinfo
9595 - /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js:60970
/trunk/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js:62041,62043,62127,62139,62142-62143,62145-62146,62256,62263,62274,62341,62371,62380,62384,62392-62396,62458,62552,63864-63865,63867-63877,63879-64124,64129-64645,64647-64648,64651
9696 + /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js:60970
/trunk/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js:62041,62043,62127,62139,62142-62143,62145-62146,62256,62263,62274,62341,62371,62380,62384,62392-62396,62458,62552,63864-63865,63867-63877,63879-64124,64129-64645,64647-64648,64651,64864
Index: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/js/plugins/jquery.collapsibleTabs.js
@@ -15,13 +15,7 @@
1616 $this.data( 'collapsibleTabsSettings', $settings );
1717 // attach data to our collapsible elements
1818 $this.children( $settings.collapsible ).each( function() {
19 - var $collapsible = $( this );
20 - $collapsible.data( 'collapsibleTabsSettings', {
21 - 'expandedContainer': $settings.expandedContainer,
22 - 'collapsedContainer': $settings.collapsedContainer,
23 - 'expandedWidth': $collapsible.width(),
24 - 'prevElement': $collapsible.prev()
25 - } );
 19+ $.collapsibleTabs.addData( $( this ) );
2620 } );
2721 } );
2822
@@ -52,9 +46,26 @@
5347 > $( '#right-navigation' ).position().left;
5448 }
5549 },
 50+ addData: function( $collapsible ) {
 51+ var $settings = $collapsible.parent().data( 'collapsibleTabsSettings' );
 52+ $collapsible.data( 'collapsibleTabsSettings', {
 53+ 'expandedContainer': $settings.expandedContainer,
 54+ 'collapsedContainer': $settings.collapsedContainer,
 55+ 'expandedWidth': $collapsible.width(),
 56+ 'prevElement': $collapsible.prev()
 57+ } );
 58+ },
 59+ getSettings: function( $collapsible ) {
 60+ var $settings = $collapsible.data( 'collapsibleTabsSettings' );
 61+ if ( typeof $settings == 'undefined' ) {
 62+ $.collapsibleTabs.addData( $collapsible );
 63+ $settings = $collapsible.data( 'collapsibleTabsSettings' );
 64+ }
 65+ return $settings;
 66+ },
5667 handleResize: function( e ){
5768 $.collapsibleTabs.instances.each( function() {
58 - var $this = $( this ), data = $this.data( 'collapsibleTabsSettings' );
 69+ var $this = $( this ), data = $.collapsibleTabs.getSettings( $this );
5970 if( data.shifting ) return;
6071
6172 // if the two navigations are colliding
@@ -68,8 +79,8 @@
6980 // if there are still moveable items in the dropdown menu,
7081 // and there is sufficient space to place them in the tab container
7182 if( $( data.collapsedContainer + ' ' + data.collapsible ).length > 0
72 - && data.expandCondition( $( data.collapsedContainer ).children(
73 - data.collapsible+":first" ).data( 'collapsibleTabsSettings' ).expandedWidth ) ) {
 83+ && data.expandCondition( $.collapsibleTabs.getSettings( $( data.collapsedContainer ).children(
 84+ data.collapsible+":first" ) ).expandedWidth ) ) {
7485 //move the element from the dropdown to the tab
7586 $this.trigger( "beforeTabExpand" );
7687 $.collapsibleTabs
@@ -79,22 +90,24 @@
8091 },
8192 moveToCollapsed: function( ele ) {
8293 var $moving = $( ele );
83 - var data = $moving.data( 'collapsibleTabsSettings' );
84 - $( data.expandedContainer ).data( 'collapsibleTabsSettings' ).shifting = true;
 94+ var data = $.collapsibleTabs.getSettings( $moving );
 95+ var dataExp = $.collapsibleTabs.getSettings( data.expandedContainer );
 96+ dataExp.shifting = true;
8597 $moving
8698 .remove()
8799 .prependTo( data.collapsedContainer )
88100 .data( 'collapsibleTabsSettings', data );
89 - $( data.expandedContainer ).data( 'collapsibleTabsSettings' ).shifting = false;
 101+ dataExp.shifting = false;
90102 $.collapsibleTabs.handleResize();
91103 },
92104 moveToExpanded: function( ele ) {
93105 var $moving = $( ele );
94 - var data = $moving.data( 'collapsibleTabsSettings' );
95 - $( data.expandedContainer ).data( 'collapsibleTabsSettings' ).shifting = true;
 106+ var data = $.collapsibleTabs.getSettings( $moving );
 107+ var dataExp = $.collapsibleTabs.getSettings( data.expandedContainer );
 108+ dataExp.shifting = true;
96109 // remove this element from where it's at and put it in the dropdown menu
97110 $moving.remove().insertAfter( data.prevElement ).data( 'collapsibleTabsSettings', data );
98 - $( data.expandedContainer ).data( 'collapsibleTabsSettings' ).shifting = false;
 111+ dataExp.shifting = false;
99112 $.collapsibleTabs.handleResize();
100113 }
101114 };
Property changes on: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js
___________________________________________________________________
Name: svn:mergeinfo
102115 - /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js:60970
/trunk/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js:62041,62043,62127,62139,62142-62143,62145-62146,62256,62263,62274,62341,62371,62380,62384,62392-62396,62458,62552,63864-63865,63867-63877,63879-64124,64129-64645,64647-64648,64651
103116 + /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js:60970
/trunk/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js:62041,62043,62127,62139,62142-62143,62145-62146,62256,62263,62274,62341,62371,62380,62384,62392-62396,62458,62552,63864-63865,63867-63877,63879-64124,64129-64645,64647-64648,64651,64864
Index: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -5363,13 +5363,7 @@
53645364 $this.data( 'collapsibleTabsSettings', $settings );
53655365 // attach data to our collapsible elements
53665366 $this.children( $settings.collapsible ).each( function() {
5367 - var $collapsible = $( this );
5368 - $collapsible.data( 'collapsibleTabsSettings', {
5369 - 'expandedContainer': $settings.expandedContainer,
5370 - 'collapsedContainer': $settings.collapsedContainer,
5371 - 'expandedWidth': $collapsible.width(),
5372 - 'prevElement': $collapsible.prev()
5373 - } );
 5367+ $.collapsibleTabs.addData( $( this ) );
53745368 } );
53755369 } );
53765370
@@ -5400,9 +5394,26 @@
54015395 > $( '#right-navigation' ).position().left;
54025396 }
54035397 },
 5398+ addData: function( $collapsible ) {
 5399+ var $settings = $collapsible.parent().data( 'collapsibleTabsSettings' );
 5400+ $collapsible.data( 'collapsibleTabsSettings', {
 5401+ 'expandedContainer': $settings.expandedContainer,
 5402+ 'collapsedContainer': $settings.collapsedContainer,
 5403+ 'expandedWidth': $collapsible.width(),
 5404+ 'prevElement': $collapsible.prev()
 5405+ } );
 5406+ },
 5407+ getSettings: function( $collapsible ) {
 5408+ var $settings = $collapsible.data( 'collapsibleTabsSettings' );
 5409+ if ( typeof $settings == 'undefined' ) {
 5410+ $.collapsibleTabs.addData( $collapsible );
 5411+ $settings = $collapsible.data( 'collapsibleTabsSettings' );
 5412+ }
 5413+ return $settings;
 5414+ },
54045415 handleResize: function( e ){
54055416 $.collapsibleTabs.instances.each( function() {
5406 - var $this = $( this ), data = $this.data( 'collapsibleTabsSettings' );
 5417+ var $this = $( this ), data = $.collapsibleTabs.getSettings( $this );
54075418 if( data.shifting ) return;
54085419
54095420 // if the two navigations are colliding
@@ -5416,8 +5427,8 @@
54175428 // if there are still moveable items in the dropdown menu,
54185429 // and there is sufficient space to place them in the tab container
54195430 if( $( data.collapsedContainer + ' ' + data.collapsible ).length > 0
5420 - && data.expandCondition( $( data.collapsedContainer ).children(
5421 - data.collapsible+":first" ).data( 'collapsibleTabsSettings' ).expandedWidth ) ) {
 5431+ && data.expandCondition( $.collapsibleTabs.getSettings( $( data.collapsedContainer ).children(
 5432+ data.collapsible+":first" ) ).expandedWidth ) ) {
54225433 //move the element from the dropdown to the tab
54235434 $this.trigger( "beforeTabExpand" );
54245435 $.collapsibleTabs
@@ -5427,22 +5438,24 @@
54285439 },
54295440 moveToCollapsed: function( ele ) {
54305441 var $moving = $( ele );
5431 - var data = $moving.data( 'collapsibleTabsSettings' );
5432 - $( data.expandedContainer ).data( 'collapsibleTabsSettings' ).shifting = true;
 5442+ var data = $.collapsibleTabs.getSettings( $moving );
 5443+ var dataExp = $.collapsibleTabs.getSettings( data.expandedContainer );
 5444+ dataExp.shifting = true;
54335445 $moving
54345446 .remove()
54355447 .prependTo( data.collapsedContainer )
54365448 .data( 'collapsibleTabsSettings', data );
5437 - $( data.expandedContainer ).data( 'collapsibleTabsSettings' ).shifting = false;
 5449+ dataExp.shifting = false;
54385450 $.collapsibleTabs.handleResize();
54395451 },
54405452 moveToExpanded: function( ele ) {
54415453 var $moving = $( ele );
5442 - var data = $moving.data( 'collapsibleTabsSettings' );
5443 - $( data.expandedContainer ).data( 'collapsibleTabsSettings' ).shifting = true;
 5454+ var data = $.collapsibleTabs.getSettings( $moving );
 5455+ var dataExp = $.collapsibleTabs.getSettings( data.expandedContainer );
 5456+ dataExp.shifting = true;
54445457 // remove this element from where it's at and put it in the dropdown menu
54455458 $moving.remove().insertAfter( data.prevElement ).data( 'collapsibleTabsSettings', data );
5446 - $( data.expandedContainer ).data( 'collapsibleTabsSettings' ).shifting = false;
 5459+ dataExp.shifting = false;
54475460 $.collapsibleTabs.handleResize();
54485461 }
54495462 };
Index: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -371,9 +371,10 @@
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';}
374374 if(r.name==='opera'&&$.browser.version>=9.8){r.version=i.match(/version\/([0-9\.]*)/i)[1]||10;}
375 -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|ipod|iphone|blackberry)/,[],/(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();});}
376 -$.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'));}
377 -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);(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);}
 375+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|ipod|iphone|blackberry)/,[],/(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(){$.collapsibleTabs.addData($(this));});});if(!$.collapsibleTabs.boundEvent){$(window).delayedBind('500','resize',function(){$.collapsibleTabs.handleResize();});}
 376+$.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');}
 377+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'));}
 378+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);}
378379 fx.elem.style[attr]="rgb("+[Math.max(Math.min(parseInt((fx.pos*(fx.end[0]-fx.start[0]))+fx.start[0]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[1]-fx.start[1]))+fx.start[1]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[2]-fx.start[2]))+fx.start[2]),255),0)].join(",")+")";}});function getRGB(color){var result;if(color&&color.constructor==Array&&color.length==3)
379380 return color;if(result=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
380381 return[parseInt(result[1]),parseInt(result[2]),parseInt(result[3])];if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
Property changes on: branches/wmf/1.16wmf4/extensions/UsabilityInitiative
___________________________________________________________________
Name: svn:mergeinfo
381382 - /branches/REL1_15/phase3/extensions/UsabilityInitiative:51646
/branches/wmf-deployment/extensions/UsabilityInitiative:60970
/trunk/extensions/UsabilityInitiative:56207,56209,56296,56333,56355,62041,62043,62127,62139,62142-62143,62145-62146,62256,62263,62266-63865,63867-63877,63879-64124,64129-64645,64647-64648,64651
/trunk/phase3/extensions/UsabilityInitiative:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816
382383 + /branches/REL1_15/phase3/extensions/UsabilityInitiative:51646
/branches/wmf-deployment/extensions/UsabilityInitiative:60970
/trunk/extensions/UsabilityInitiative:56207,56209,56296,56333,56355,62041,62043,62127,62139,62142-62143,62145-62146,62256,62263,62266-63865,63867-63877,63879-64124,64129-64645,64647-64648,64651,64864
/trunk/phase3/extensions/UsabilityInitiative:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r64864UsabilityInitiative: Fix JS errors in CollapsibleTabs when tabs are dynamical...catrope11:29, 10 April 2010

Status & tagging log