r66149 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66148‎ | r66149 | r66150 >
Date:18:10, 10 May 2010
Author:catrope
Status:deferred
Tags:
Comment:
1.16wmf4: MFT r66034, r66144, r66145, r66147, r66148
Modified paths:
  • /branches/wmf/1.16wmf4/extensions/UsabilityInitiative (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/UsabilityInitiative/ClickTracking/ClickTracking.js (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/UsabilityInitiative/OptIn (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/UsabilityInitiative/PrefSwitch (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/UsabilityInitiative/Vector (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/UsabilityInitiative/Vector/Modules/CollapsibleNav/CollapsibleNav.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/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/CollapsibleNav/CollapsibleNav.js
@@ -24,24 +24,42 @@
2525 $j(this).addClass( 'collapsed' );
2626 }
2727 } );
 28+ // Use the same function for all navigation headings - don't repeat yourself
 29+ function toggle( $element ) {
 30+ $j.cookie( 'vector-nav-' + $element.parent().attr( 'id' ), $element.parent().is( '.collapsed' ) );
 31+ $element
 32+ .parent()
 33+ .toggleClass( 'expanded' )
 34+ .toggleClass( 'collapsed' )
 35+ .find( 'div.body' )
 36+ .slideToggle( 'fast' );
 37+ }
 38+ var $headings = $j( '#panel > div.portal > h5' );
 39+ /** Copy-pasted from jquery.wikiEditor.dialogs - :( */
 40+ // Find the highest tabindex in use
 41+ var maxTI = 0;
 42+ $j( '[tabindex]' ).each( function() {
 43+ var ti = parseInt( $j(this).attr( 'tabindex' ) );
 44+ if ( ti > maxTI )
 45+ maxTI = ti;
 46+ });
 47+ var tabIndex = maxTI + 1;
 48+ // Make it keyboard accessible
 49+ $headings.each( function() {
 50+ $j(this).attr( 'tabindex', tabIndex++ );
 51+ } );
 52+ /** End of copy-pasted section */
2853 // Toggle the selected menu's class and expand or collapse the menu
29 - $j( '#panel > div.portal > h5' )
30 - // Make it keyboard accessible
31 - .attr( 'tabindex', 1 )
 54+ $headings
3255 // Make the space and enter keys act as a click
3356 .keydown( function( event ) {
3457 if ( event.which == 13 /* Enter */ || event.which == 32 /* Space */ ) {
35 - $j(this).click();
 58+ toggle( $j(this) );
3659 }
3760 } )
38 - .click( function() {
39 - $j.cookie( 'vector-nav-' + $j(this).parent().attr( 'id' ), $j(this).parent().is( '.collapsed' ) );
40 - $j(this)
41 - .parent()
42 - .toggleClass( 'expanded' )
43 - .toggleClass( 'collapsed' )
44 - .find( 'div.body' )
45 - .slideToggle( 'fast' );
 61+ .mousedown( function() {
 62+ toggle( $j(this) );
 63+ $j(this).blur();
4664 return false;
4765 } );
4866 } );
Index: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/Vector/Vector.hooks.php
@@ -12,17 +12,17 @@
1313
1414 static $scripts = array(
1515 'raw' => array(
16 - array( 'src' => 'Modules/CollapsibleNav/CollapsibleNav.js', 'version' => 9 ),
 16+ array( 'src' => 'Modules/CollapsibleNav/CollapsibleNav.js', 'version' => 11 ),
1717 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' => 25 ),
 23+ array( 'src' => 'Vector.combined.js', 'version' => 28 ),
2424 ),
2525 'minified' => array(
26 - array( 'src' => 'Vector.combined.min.js', 'version' => 25 ),
 26+ array( 'src' => 'Vector.combined.min.js', 'version' => 28 ),
2727 ),
2828 );
2929 static $modules = array(
Index: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/Vector/Vector.combined.js
@@ -24,24 +24,42 @@
2525 $j(this).addClass( 'collapsed' );
2626 }
2727 } );
 28+ // Use the same function for all navigation headings - don't repeat yourself
 29+ function toggle( $element ) {
 30+ $j.cookie( 'vector-nav-' + $element.parent().attr( 'id' ), $element.parent().is( '.collapsed' ) );
 31+ $element
 32+ .parent()
 33+ .toggleClass( 'expanded' )
 34+ .toggleClass( 'collapsed' )
 35+ .find( 'div.body' )
 36+ .slideToggle( 'fast' );
 37+ }
 38+ var $headings = $j( '#panel > div.portal > h5' );
 39+ /** Copy-pasted from jquery.wikiEditor.dialogs - :( */
 40+ // Find the highest tabindex in use
 41+ var maxTI = 0;
 42+ $j( '[tabindex]' ).each( function() {
 43+ var ti = parseInt( $j(this).attr( 'tabindex' ) );
 44+ if ( ti > maxTI )
 45+ maxTI = ti;
 46+ });
 47+ var tabIndex = maxTI + 1;
 48+ // Make it keyboard accessible
 49+ $headings.each( function() {
 50+ $j(this).attr( 'tabindex', tabIndex++ );
 51+ } );
 52+ /** End of copy-pasted section */
2853 // Toggle the selected menu's class and expand or collapse the menu
29 - $j( '#panel > div.portal > h5' )
30 - // Make it keyboard accessible
31 - .attr( 'tabindex', 1 )
 54+ $headings
3255 // Make the space and enter keys act as a click
3356 .keydown( function( event ) {
3457 if ( event.which == 13 /* Enter */ || event.which == 32 /* Space */ ) {
35 - $j(this).click();
 58+ toggle( $j(this) );
3659 }
3760 } )
38 - .click( function() {
39 - $j.cookie( 'vector-nav-' + $j(this).parent().attr( 'id' ), $j(this).parent().is( '.collapsed' ) );
40 - $j(this)
41 - .parent()
42 - .toggleClass( 'expanded' )
43 - .toggleClass( 'collapsed' )
44 - .find( 'div.body' )
45 - .slideToggle( 'fast' );
 61+ .mousedown( function() {
 62+ toggle( $j(this) );
 63+ $j(this).blur();
4664 return false;
4765 } );
4866 } );
Index: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/Vector/Vector.combined.min.js
@@ -1,6 +1,8 @@
22
33 $j(document).ready(function(){if(!wgVectorEnabledModules.collapsiblenav){return true;}
4 -$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').attr('tabindex',1).keydown(function(event){if(event.which==13||event.which==32){$j(this).click();}}).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;}
 4+$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');}});function toggle($element){$j.cookie('vector-nav-'+$element.parent().attr('id'),$element.parent().is('.collapsed'));$element.parent().toggleClass('expanded').toggleClass('collapsed').find('div.body').slideToggle('fast');}
 5+var $headings=$j('#panel > div.portal > h5');var maxTI=0;$j('[tabindex]').each(function(){var ti=parseInt($j(this).attr('tabindex'));if(ti>maxTI)
 6+maxTI=ti;});var tabIndex=maxTI+1;$headings.each(function(){$j(this).attr('tabindex',tabIndex++);});$headings.keydown(function(event){if(event.which==13||event.which==32){toggle($j(this));}}).mousedown(function(){toggle($j(this));$j(this).blur();return false;});});$j(document).ready(function(){if(!wgVectorEnabledModules.collapsibletabs){return true;}
57 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')
68 $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)
79 $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;}
Property changes on: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/Vector
___________________________________________________________________
Name: svn:mergeinfo
810 - /branches/REL1_15/phase3/extensions/UsabilityInitiative/Vector:51646
/branches/wmf-deployment/extensions/UsabilityInitiative/Vector:60970
/trunk/extensions/UsabilityInitiative/Vector: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,64724,64864,65064,65556,65558,65633,66029
/trunk/phase3/extensions/UsabilityInitiative/Vector:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816,65387,65391,65555,65590
911 + /branches/REL1_15/phase3/extensions/UsabilityInitiative/Vector:51646
/branches/wmf-deployment/extensions/UsabilityInitiative/Vector:60970
/trunk/extensions/UsabilityInitiative/Vector: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,64724,64864,65064,65556,65558,65633,66029,66034,66144-66148
/trunk/phase3/extensions/UsabilityInitiative/Vector:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816,65387,65391,65555,65590
Index: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -19,7 +19,7 @@
2020 'base_sets' => array(
2121 'raw' => array(
2222 array( 'src' => 'css/suggestions.css', 'version' => 10 ),
23 - array( 'src' => 'css/vector.collapsibleNav.css', 'version' => 7 ),
 23+ array( 'src' => 'css/vector.collapsibleNav.css', 'version' => 8 ),
2424 array( 'src' => 'css/vector.footerCleanup.css', 'version' => 1 ),
2525 array( 'src' => 'css/wikiEditor.css', 'version' => 12 ),
2626 array( 'src' => 'css/wikiEditor.dialogs.css', 'version' => 28 ),
Property changes on: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/ClickTracking/ClickTracking.js
___________________________________________________________________
Name: svn:mergeinfo
2727 - /branches/REL1_15/phase3/extensions/UsabilityInitiative/ClickTracking/ClickTracking.js:51646
/branches/wmf-deployment/extensions/UsabilityInitiative/ClickTracking/ClickTracking.js:60970
/trunk/extensions/UsabilityInitiative/ClickTracking/ClickTracking.js: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,64724,64864,65064,65379,65556,65558,65633
/trunk/phase3/extensions/UsabilityInitiative/ClickTracking/ClickTracking.js:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816,65387,65391,65555,65590
2828 + /branches/REL1_15/phase3/extensions/UsabilityInitiative/ClickTracking/ClickTracking.js:51646
/branches/wmf-deployment/extensions/UsabilityInitiative/ClickTracking/ClickTracking.js:60970
/trunk/extensions/UsabilityInitiative/ClickTracking/ClickTracking.js: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,64724,64864,65064,65379,65556,65558,65633,66034,66144-66148
/trunk/phase3/extensions/UsabilityInitiative/ClickTracking/ClickTracking.js:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816,65387,65391,65555,65590
Property changes on: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/OptIn
___________________________________________________________________
Name: svn:mergeinfo
2929 - /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
3030 + /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,66034,66144-66148
/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
3131 - /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
3232 + /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,66034,66144-66148
Property changes on: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js
___________________________________________________________________
Name: svn:mergeinfo
3333 - /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
3434 + /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,66034,66144-66148
Property changes on: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/PrefSwitch
___________________________________________________________________
Name: svn:mergeinfo
3535 - /branches/REL1_15/phase3/extensions/UsabilityInitiative/PrefSwitch:51646
/branches/wmf-deployment/extensions/UsabilityInitiative/PrefSwitch:60970
/trunk/extensions/UsabilityInitiative/PrefSwitch: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,64832
/trunk/phase3/extensions/UsabilityInitiative/PrefSwitch:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816
3636 + /branches/REL1_15/phase3/extensions/UsabilityInitiative/PrefSwitch:51646
/branches/wmf-deployment/extensions/UsabilityInitiative/PrefSwitch:60970
/trunk/extensions/UsabilityInitiative/PrefSwitch: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,64832,66034,66144-66148
/trunk/phase3/extensions/UsabilityInitiative/PrefSwitch: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
___________________________________________________________________
Name: svn:mergeinfo
3737 - /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,64724,64864,65064,65556,65558,65633
/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,65387,65391,65555,65590
3838 + /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,64724,64864,65064,65556,65558,65633,66034,66144-66148
/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,65387,65391,65555,65590

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r66034Improves CollapsiblNav by not leaving focus rectangles behind, while still al...tparscal18:22, 7 May 2010
r66144Resolves issues presented in r66029 as a response to bug #23428.tparscal17:03, 10 May 2010
r66145Version bump for r66144.tparscal17:04, 10 May 2010
r66147Version bump for r66144.tparscal17:49, 10 May 2010
r66148Better solution to bug #23428.tparscal17:57, 10 May 2010

Status & tagging log