r57442 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57441‎ | r57442 | r57443 >
Date:22:18, 6 October 2009
Author:tparscal
Status:ok
Tags:
Comment:
Fixed bug that cause sections added via the API not to be properly displayed on-load - specifically when a cookie exists that indicates they were open on last view.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js
@@ -34,6 +34,11 @@
3535 $tabs.append(
3636 $.wikiEditor.modules.toolbar.fn.buildTab( context, section, data[type][section] )
3737 );
 38+ // Update visibility of section
 39+ $section = $sections.find( '.section:visible' );
 40+ if ( $section.size() ) {
 41+ $sections.animate( { 'height': $section.outerHeight() }, 'fast' );
 42+ }
3843 }
3944 break;
4045 case 'groups':
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -1554,6 +1554,11 @@
15551555 $tabs.append(
15561556 $.wikiEditor.modules.toolbar.fn.buildTab( context, section, data[type][section] )
15571557 );
 1558+ // Update visibility of section
 1559+ $section = $sections.find( '.section:visible' );
 1560+ if ( $section.size() ) {
 1561+ $sections.animate( { 'height': $section.outerHeight() }, 'fast' );
 1562+ }
15581563 }
15591564 break;
15601565 case 'groups':
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -95,7 +95,7 @@
9696 maxTI=ti;});var tabIndex=maxTI+1;$j('.ui-dialog input, .ui-dialog button').not('[tabindex]').each(function(){$j(this).attr('tabindex',tabIndex++);});}}},resize:function(){var wrapper=$(this).closest('.ui-dialog');var oldWidth=wrapper.width();var oldHidden=$(this).find('*').not(':visible');oldHidden.each(function(){$(this).data('oldstyle',$(this).attr('style'));});oldHidden.show();var oldWS=$(this).css('white-space');$(this).css('white-space','nowrap');if(wrapper.width()<=$(this).get(0).scrollWidth){$(this).width($(this).get(0).scrollWidth);wrapper.width(wrapper.get(0).scrollWidth);$(this).dialog({'width':wrapper.width()});wrapper.css('left',parseInt(wrapper.css('left'))-
9797 (wrapper.width()-oldWidth)/2);}
9898 $(this).css('white-space',oldWS);oldHidden.each(function(){$(this).attr('style',$(this).data('oldstyle'));});}},'modules':{}};})(jQuery);(function($){$.wikiEditor.modules.toolbar={api:{addToToolbar:function(context,data){for(type in data){switch(type){case'sections':var $sections=context.modules.$toolbar.find('div.sections');var $tabs=context.modules.$toolbar.find('div.tabs');for(section in data[type]){if(section=='main'){context.modules.$toolbar.prepend($.wikiEditor.modules.toolbar.fn.buildSection(context,section,data[type][section]));continue;}
99 -$sections.append($.wikiEditor.modules.toolbar.fn.buildSection(context,section,data[type][section]));$tabs.append($.wikiEditor.modules.toolbar.fn.buildTab(context,section,data[type][section]));}
 99+$sections.append($.wikiEditor.modules.toolbar.fn.buildSection(context,section,data[type][section]));$tabs.append($.wikiEditor.modules.toolbar.fn.buildTab(context,section,data[type][section]));$section=$sections.find('.section:visible');if($section.size()){$sections.animate({'height':$section.outerHeight()},'fast');}}
100100 break;case'groups':if(!('section'in data)){continue;}
101101 var $section=context.modules.$toolbar.find('div[rel='+data.section+'].section');for(group in data[type]){$section.append($.wikiEditor.modules.toolbar.fn.buildGroup(context,group,data[type][group]));}
102102 break;case'tools':if(!('section'in data&&'group'in data)){continue;}

Follow-up revisions

RevisionCommit summaryAuthorDate
r57446Updated version numbers for r57440, r57442 and r57443tparscal23:13, 6 October 2009
r57719wmf-deployment: Merge babaco fixes from trunk...catrope20:20, 14 October 2009

Status & tagging log