r60340 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60339‎ | r60340 | r60341 >
Date:20:59, 23 December 2009
Author:adam
Status:deferred
Tags:
Comment:
A few tweaks to the collapsible left nav stuff
Modified paths:
  • /trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Modules/CollapsibleLeftNav/CollapsibleLeftNav.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Vector.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Vector.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/collapsibleLeftNav.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/combined.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/combined.min.css (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/Vector/Modules/CollapsibleLeftNav/CollapsibleLeftNav.js
@@ -19,5 +19,6 @@
2020 .toggleClass( 'collapsed' )
2121 .find( 'div.body' )
2222 .slideToggle( 'fast' );
 23+ return false;
2324 } );
2425 } );
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php
@@ -12,16 +12,16 @@
1313
1414 static $scripts = array(
1515 'raw' => array(
16 - array( 'src' => 'Modules/CollapsibleLeftNav/CollapsibleLeftNav.js', 'version' => 2 ),
 16+ array( 'src' => 'Modules/CollapsibleLeftNav/CollapsibleLeftNav.js', 'version' => 3 ),
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' => 8 ),
 22+ array( 'src' => 'Vector.combined.js', 'version' => 9 ),
2323 ),
2424 'minified' => array(
25 - array( 'src' => 'Vector.combined.min.js', 'version' => 8 ),
 25+ array( 'src' => 'Vector.combined.min.js', 'version' => 9 ),
2626 ),
2727 );
2828 static $modules = array(
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.js
@@ -19,6 +19,7 @@
2020 .toggleClass( 'collapsed' )
2121 .find( 'div.body' )
2222 .slideToggle( 'fast' );
 23+ return false;
2324 } );
2425 } );
2526 mw.addOnloadHook( function() {
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.min.js
@@ -1,6 +1,6 @@
22
33 mw.addOnloadHook(function(){if(!wgVectorEnabledModules.collapsibleleftnav)
4 -return true;$j('#panel').addClass('collapsible-nav');$j('#panel > div.portal').toggleClass('collapsed');$j('#panel > div.portal:first').toggleClass('expanded').toggleClass('collapsed').find('div.body').slideToggle('fast');$j('#panel > div.portal > h5').click(function(){$j(this).parent().toggleClass('expanded').toggleClass('collapsed').find('div.body').slideToggle('fast');});});mw.addOnloadHook(function(){if(!wgVectorEnabledModules.collapsibletabs){return true;}
 4+return true;$j('#panel').addClass('collapsible-nav');$j('#panel > div.portal').toggleClass('collapsed');$j('#panel > div.portal:first').toggleClass('expanded').toggleClass('collapsed').find('div.body').slideToggle('fast');$j('#panel > div.portal > h5').click(function(){$j(this).parent().toggleClass('expanded').toggleClass('collapsed').find('div.body').slideToggle('fast');return false;});});mw.addOnloadHook(function(){if(!wgVectorEnabledModules.collapsibletabs){return true;}
55 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')
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;}}});});mw.addOnloadHook(function(){if(!wgVectorEnabledModules.editwarning){return true;}
Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -18,7 +18,7 @@
1919 private static $styleFiles = array(
2020 'base_sets' => array(
2121 'raw' => array(
22 - array( 'src' => 'css/collapsibleLeftNav.css', 'version' => 2 ),
 22+ array( 'src' => 'css/collapsibleLeftNav.css', 'version' => 3 ),
2323 array( 'src' => 'css/suggestions.css', 'version' => 6 ),
2424 array( 'src' => 'css/wikiEditor.css', 'version' => 7 ),
2525 array( 'src' => 'css/wikiEditor.toolbar.css', 'version' => 8 ),
@@ -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' => 43 ),
 32+ array( 'src' => 'css/combined.css', 'version' => 44 ),
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' => 43 ),
 36+ array( 'src' => 'css/combined.min.css', 'version' => 44 ),
3737 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
3838 ),
3939 )
Index: trunk/extensions/UsabilityInitiative/css/collapsibleLeftNav.css
@@ -10,6 +10,7 @@
1111 font-weight: normal;
1212 background: url(../images/vector/left-nav-arrow-down.png) 0 50% no-repeat;
1313 padding: 8px 0 8px 1.5em;
 14+ margin-bottom: 0;
1415 }
1516 #panel.collapsible-nav div.collapsed h5 {
1617 color: #ccc;
@@ -23,8 +24,16 @@
2425 background: url(../images/vector/left-nav-arrow-right-over.png) 0 50% no-repeat #e7e8e9;
2526 }
2627 #panel.collapsible-nav div.portal div.body {
 28+ padding-top: 4px;
2729 display: none;
2830 }
2931 #panel.collapsible-nav div.portal div.body {
3032 background: none !important;
3133 }
 34+#panel.collapsible-nav #p-navigation {
 35+ border-top: none;
 36+ margin-top: 0px;
 37+}
 38+#panel.collapsible-nav #p-navigation h5 {
 39+ display: none;
 40+}
Index: trunk/extensions/UsabilityInitiative/css/combined.css
@@ -10,6 +10,7 @@
1111 font-weight: normal;
1212 background: url(../images/vector/left-nav-arrow-down.png) 0 50% no-repeat;
1313 padding: 8px 0 8px 1.5em;
 14+ margin-bottom: 0;
1415 }
1516 #panel.collapsible-nav div.collapsed h5 {
1617 color: #ccc;
@@ -23,11 +24,19 @@
2425 background: url(../images/vector/left-nav-arrow-right-over.png) 0 50% no-repeat #e7e8e9;
2526 }
2627 #panel.collapsible-nav div.portal div.body {
 28+ padding-top: 4px;
2729 display: none;
2830 }
2931 #panel.collapsible-nav div.portal div.body {
3032 background: none !important;
3133 }
 34+#panel.collapsible-nav #p-navigation {
 35+ border-top: none;
 36+ margin-top: 0px;
 37+}
 38+#panel.collapsible-nav #p-navigation h5 {
 39+ display: none;
 40+}
3241 /* suggestions plugin */
3342
3443 .suggestions {
Index: trunk/extensions/UsabilityInitiative/css/combined.min.css
@@ -9,6 +9,7 @@
1010 font-weight:normal;
1111 background:url(../images/vector/left-nav-arrow-down.png) 0 50% no-repeat;
1212 padding:8px 0 8px 1.5em;
 13+margin-bottom:0;
1314 }
1415 #panel.collapsible-nav div.collapsed h5{
1516 color:#ccc;
@@ -22,11 +23,19 @@
2324 background:url(../images/vector/left-nav-arrow-right-over.png) 0 50% no-repeat #e7e8e9;
2425 }
2526 #panel.collapsible-nav div.portal div.body{
 27+padding-top:4px;
2628 display:none;
2729 }
2830 #panel.collapsible-nav div.portal div.body{
2931 background:none !important;
3032 }
 33+#panel.collapsible-nav #p-navigation{
 34+border-top:none;
 35+margin-top:0px;
 36+}
 37+#panel.collapsible-nav #p-navigation h5{
 38+display:none;
 39+}
3140 .suggestions{
3241 overflow:hidden;
3342 position:absolute;

Status & tagging log