r68755 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68754‎ | r68755 | r68756 >
Date:23:07, 29 June 2010
Author:adam
Status:ok
Tags:
Comment:
Followup to r68754 - Adding a necessary extra condition
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.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Vector.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/Vector/Modules/CollapsibleNav/CollapsibleNav.js
@@ -164,7 +164,7 @@
165165 var id = $j(this).attr( 'id' );
166166 var state = $j.cookie( 'vector-nav-' + id );
167167 // In the case that we are not showing the new version, let's show the languages by default
168 - if ( state == 'true' || ( state == null && i < 1 ) || ( version == 1 && id == 'p-lang' ) ) {
 168+ if ( state == 'true' || ( state == null && i < 1 ) || ( state == null && version == 1 && id == 'p-lang' ) ) {
169169 $j(this)
170170 .addClass( 'expanded' )
171171 .find( 'div.body' )
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php
@@ -12,7 +12,7 @@
1313
1414 static $scripts = array(
1515 'raw' => array(
16 - array( 'src' => 'Modules/CollapsibleNav/CollapsibleNav.js', 'version' => 27 ),
 16+ array( 'src' => 'Modules/CollapsibleNav/CollapsibleNav.js', 'version' => 28 ),
1717 array( 'src' => 'Modules/CollapsibleTabs/CollapsibleTabs.js', 'version' => 8 ),
1818 array( 'src' => 'Modules/ExpandableSearch/ExpandableSearch.js', 'version' => 5 ),
1919 array( 'src' => 'Modules/EditWarning/EditWarning.js', 'version' => 9 ),
@@ -20,10 +20,10 @@
2121 array( 'src' => 'Modules/SimpleSearch/SimpleSearch.js', 'version' => 21 ),
2222 ),
2323 'combined' => array(
24 - array( 'src' => 'Vector.combined.js', 'version' => 62 ),
 24+ array( 'src' => 'Vector.combined.js', 'version' => 63 ),
2525 ),
2626 'minified' => array(
27 - array( 'src' => 'Vector.combined.min.js', 'version' => 63 ),
 27+ array( 'src' => 'Vector.combined.min.js', 'version' => 64 ),
2828 ),
2929 );
3030 static $modules = array(
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.js
@@ -164,7 +164,7 @@
165165 var id = $j(this).attr( 'id' );
166166 var state = $j.cookie( 'vector-nav-' + id );
167167 // In the case that we are not showing the new version, let's show the languages by default
168 - if ( state == 'true' || ( state == null && i < 1 ) || ( version == 1 && id == 'p-lang' ) ) {
 168+ if ( state == 'true' || ( state == null && i < 1 ) || ( state == null && version == 1 && id == 'p-lang' ) ) {
169169 $j(this)
170170 .addClass( 'expanded' )
171171 .find( 'div.body' )
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.min.js
@@ -9,7 +9,7 @@
1010 if(count<limit){$secondary.children().each(function(){if(count++<limit){$j(this).appendTo($primary);}else{return false;}});}
1111 if($secondary.children().length==0){$secondary.remove();}else{$j('#p-lang').after('<div id="p-lang-more" class="portal"><h5></h5><div class="body"></div></div>');$j('#p-lang-more h5').text(mw.usability.getMsg('vector-collapsiblenav-more'));$secondary.appendTo($j('#p-lang-more div.body'));}
1212 $j('#p-lang').addClass('persistent');}
13 -$j('#mw-panel > div.portal:first').addClass('first persistent');$j('#mw-panel').addClass('collapsible-nav');$j('#mw-panel > div.portal:not(.persistent)').each(function(i){var id=$j(this).attr('id');var state=$j.cookie('vector-nav-'+id);if(state=='true'||(state==null&&i<1)||(version==1&&id=='p-lang')){$j(this).addClass('expanded').find('div.body').show();}else{$j(this).addClass('collapsed');}
 13+$j('#mw-panel > div.portal:first').addClass('first persistent');$j('#mw-panel').addClass('collapsible-nav');$j('#mw-panel > div.portal:not(.persistent)').each(function(i){var id=$j(this).attr('id');var state=$j.cookie('vector-nav-'+id);if(state=='true'||(state==null&&i<1)||(state==null&&version==1&&id=='p-lang')){$j(this).addClass('expanded').find('div.body').show();}else{$j(this).addClass('collapsed');}
1414 if(state!=null){$j.cookie('vector-nav-'+$j(this).attr('id'),state,{'expires':30,'path':'/'});}});function toggle($element){$j.cookie('vector-nav-'+$element.parent().attr('id'),$element.parent().is('.collapsed'),{'expires':30,'path':'/'});$element.parent().toggleClass('expanded').toggleClass('collapsed').find('div.body').slideToggle('fast');}
1515 var $headings=$j('#mw-panel > div.portal:not(.persistent) > h5');var tabIndex=mw.usability.getMaxTabIndex()+1;$j('#searchInput').attr('tabindex',tabIndex++);$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;}
1616 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')
Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -85,7 +85,7 @@
8686 array( 'src' => 'js/plugins.combined.js', 'version' => 445 ),
8787 ),
8888 'minified' => array(
89 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 454 ),
 89+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 455 ),
9090 ),
9191 ),
9292 );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r68754CollapsibleLeftNav - adding some parentheses to fix bug 24140adam22:53, 29 June 2010

Status & tagging log