Index: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/Vector/Modules/CollapsibleNav/CollapsibleNav.js |
— | — | @@ -24,24 +24,42 @@ |
25 | 25 | $j(this).addClass( 'collapsed' ); |
26 | 26 | } |
27 | 27 | } ); |
| 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 */ |
28 | 53 | // 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 |
32 | 55 | // Make the space and enter keys act as a click |
33 | 56 | .keydown( function( event ) { |
34 | 57 | if ( event.which == 13 /* Enter */ || event.which == 32 /* Space */ ) { |
35 | | - $j(this).click(); |
| 58 | + toggle( $j(this) ); |
36 | 59 | } |
37 | 60 | } ) |
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(); |
46 | 64 | return false; |
47 | 65 | } ); |
48 | 66 | } ); |
Index: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/Vector/Vector.hooks.php |
— | — | @@ -12,17 +12,17 @@ |
13 | 13 | |
14 | 14 | static $scripts = array( |
15 | 15 | 'raw' => array( |
16 | | - array( 'src' => 'Modules/CollapsibleNav/CollapsibleNav.js', 'version' => 9 ), |
| 16 | + array( 'src' => 'Modules/CollapsibleNav/CollapsibleNav.js', 'version' => 11 ), |
17 | 17 | array( 'src' => 'Modules/CollapsibleTabs/CollapsibleTabs.js', 'version' => 8 ), |
18 | 18 | array( 'src' => 'Modules/EditWarning/EditWarning.js', 'version' => 8 ), |
19 | 19 | array( 'src' => 'Modules/FooterCleanup/FooterCleanup.js', 'version' => 5 ), |
20 | 20 | array( 'src' => 'Modules/SimpleSearch/SimpleSearch.js', 'version' => 8 ), |
21 | 21 | ), |
22 | 22 | 'combined' => array( |
23 | | - array( 'src' => 'Vector.combined.js', 'version' => 25 ), |
| 23 | + array( 'src' => 'Vector.combined.js', 'version' => 28 ), |
24 | 24 | ), |
25 | 25 | 'minified' => array( |
26 | | - array( 'src' => 'Vector.combined.min.js', 'version' => 25 ), |
| 26 | + array( 'src' => 'Vector.combined.min.js', 'version' => 28 ), |
27 | 27 | ), |
28 | 28 | ); |
29 | 29 | static $modules = array( |
Index: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/Vector/Vector.combined.js |
— | — | @@ -24,24 +24,42 @@ |
25 | 25 | $j(this).addClass( 'collapsed' ); |
26 | 26 | } |
27 | 27 | } ); |
| 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 */ |
28 | 53 | // 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 |
32 | 55 | // Make the space and enter keys act as a click |
33 | 56 | .keydown( function( event ) { |
34 | 57 | if ( event.which == 13 /* Enter */ || event.which == 32 /* Space */ ) { |
35 | | - $j(this).click(); |
| 58 | + toggle( $j(this) ); |
36 | 59 | } |
37 | 60 | } ) |
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(); |
46 | 64 | return false; |
47 | 65 | } ); |
48 | 66 | } ); |
Index: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/Vector/Vector.combined.min.js |
— | — | @@ -1,6 +1,8 @@ |
2 | 2 | |
3 | 3 | $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;} |
5 | 7 | 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') |
6 | 8 | $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) |
7 | 9 | $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 |
8 | 10 | - /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 |
9 | 11 | + /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 @@ |
20 | 20 | 'base_sets' => array( |
21 | 21 | 'raw' => array( |
22 | 22 | 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 ), |
24 | 24 | array( 'src' => 'css/vector.footerCleanup.css', 'version' => 1 ), |
25 | 25 | array( 'src' => 'css/wikiEditor.css', 'version' => 12 ), |
26 | 26 | array( 'src' => 'css/wikiEditor.dialogs.css', 'version' => 28 ), |
Property changes on: branches/wmf/1.16wmf4/extensions/UsabilityInitiative/ClickTracking/ClickTracking.js |
___________________________________________________________________ |
Name: svn:mergeinfo |
27 | 27 | - /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 |
28 | 28 | + /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 |
29 | 29 | - /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 |
30 | 30 | + /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 |
31 | 31 | - /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 |
32 | 32 | + /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 |
33 | 33 | - /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 |
34 | 34 | + /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 |
35 | 35 | - /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 |
36 | 36 | + /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 |
37 | 37 | - /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 |
38 | 38 | + /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 |