Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js |
— | — | @@ -34,6 +34,11 @@ |
35 | 35 | $tabs.append( |
36 | 36 | $.wikiEditor.modules.toolbar.fn.buildTab( context, section, data[type][section] ) |
37 | 37 | ); |
| 38 | + // Update visibility of section |
| 39 | + $section = $sections.find( '.section:visible' ); |
| 40 | + if ( $section.size() ) { |
| 41 | + $sections.animate( { 'height': $section.outerHeight() }, 'fast' ); |
| 42 | + } |
38 | 43 | } |
39 | 44 | break; |
40 | 45 | case 'groups': |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -1554,6 +1554,11 @@ |
1555 | 1555 | $tabs.append( |
1556 | 1556 | $.wikiEditor.modules.toolbar.fn.buildTab( context, section, data[type][section] ) |
1557 | 1557 | ); |
| 1558 | + // Update visibility of section |
| 1559 | + $section = $sections.find( '.section:visible' ); |
| 1560 | + if ( $section.size() ) { |
| 1561 | + $sections.animate( { 'height': $section.outerHeight() }, 'fast' ); |
| 1562 | + } |
1558 | 1563 | } |
1559 | 1564 | break; |
1560 | 1565 | case 'groups': |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -95,7 +95,7 @@ |
96 | 96 | 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'))- |
97 | 97 | (wrapper.width()-oldWidth)/2);} |
98 | 98 | $(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');}} |
100 | 100 | break;case'groups':if(!('section'in data)){continue;} |
101 | 101 | 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]));} |
102 | 102 | break;case'tools':if(!('section'in data&&'group'in data)){continue;} |