r60681 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60680‎ | r60681 | r60682 >
Date:19:03, 5 January 2010
Author:tparscal
Status:ok
Tags:
Comment:
Made some tweaks to the collapsibleNav code to simplify the DOM manipulations and avoid animation on page load. Bumped combined script versions.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Modules/CollapsibleNav/CollapsibleNav.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/Vector/Modules/CollapsibleNav/CollapsibleNav.js
@@ -2,18 +2,19 @@
33 /* First draft and will be changing greatly */
44
55 mw.addOnloadHook( function() {
6 - if( !wgVectorEnabledModules.collapsibleleftnav )
 6+ if( !wgVectorEnabledModules.collapsibleleftnav ) {
77 return true;
 8+ }
89 $j( '#panel' ).addClass( 'collapsible-nav' );
9 - $j( '#panel > div.portal' ).toggleClass( 'collapsed' );
1010 $j( '#panel > div.portal:first' )
11 - .toggleClass( 'expanded' )
12 - .toggleClass( 'collapsed' )
 11+ .addClass( 'expanded' )
1312 .find( 'div.body' )
14 - .slideToggle( 'fast' );
 13+ .show();
 14+ $j( '#panel > div.portal:not(:first)' )
 15+ .addClass( 'collapsed' );
1516 // Toggle the selected menu's class and expand or collapse the menu
1617 $j( '#panel > div.portal > h5' ).click( function() {
17 - $j( this )
 18+ $j(this)
1819 .parent()
1920 .toggleClass( 'expanded' )
2021 .toggleClass( 'collapsed' )
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php
@@ -12,16 +12,16 @@
1313
1414 static $scripts = array(
1515 'raw' => array(
16 - array( 'src' => 'Modules/CollapsibleNav/CollapsibleNav.js', 'version' => 3 ),
 16+ array( 'src' => 'Modules/CollapsibleNav/CollapsibleNav.js', 'version' => 4 ),
1717 array( 'src' => 'Modules/CollapsibleTabs/CollapsibleTabs.js', 'version' => 6 ),
1818 array( 'src' => 'Modules/EditWarning/EditWarning.js', 'version' => 4 ),
1919 array( 'src' => 'Modules/SimpleSearch/SimpleSearch.js', 'version' => 4 ),
2020 ),
2121 'combined' => array(
22 - array( 'src' => 'Vector.combined.js', 'version' => 9 ),
 22+ array( 'src' => 'Vector.combined.js', 'version' => 10 ),
2323 ),
2424 'minified' => array(
25 - array( 'src' => 'Vector.combined.min.js', 'version' => 9 ),
 25+ array( 'src' => 'Vector.combined.min.js', 'version' => 10 ),
2626 ),
2727 );
2828 static $modules = array(
Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -28,11 +28,11 @@
2929 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
3030 ),
3131 'combined' => array(
32 - array( 'src' => 'css/combined.css', 'version' => 46 ),
 32+ array( 'src' => 'css/combined.css', 'version' => 47 ),
3333 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
3434 ),
3535 'minified' => array(
36 - array( 'src' => 'css/combined.min.css', 'version' => 46 ),
 36+ array( 'src' => 'css/combined.min.css', 'version' => 47 ),
3737 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
3838 ),
3939 )

Status & tagging log