Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -73,7 +73,7 @@ |
74 | 74 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 21 ), |
75 | 75 | array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 34 ), |
76 | 76 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 1 ), |
77 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 38 ), |
| 77 | + array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 39 ), |
78 | 78 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 9 ), |
79 | 79 | array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 50 ), |
80 | 80 | array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 7 ), |
— | — | @@ -81,10 +81,10 @@ |
82 | 82 | array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 0 ), |
83 | 83 | ), |
84 | 84 | 'combined' => array( |
85 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 107 ), |
| 85 | + array( 'src' => 'js/plugins.combined.js', 'version' => 108 ), |
86 | 86 | ), |
87 | 87 | 'minified' => array( |
88 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 107 ), |
| 88 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 108 ), |
89 | 89 | ), |
90 | 90 | ), |
91 | 91 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -3811,23 +3811,19 @@ |
3812 | 3812 | if ( show ) { |
3813 | 3813 | $section.fadeIn( 'fast' ); |
3814 | 3814 | dH = $section.outerHeight() - dH; |
3815 | | - if ( 'toc' in context.modules ) { |
3816 | | - context.modules.toc.$toc.animate({'height': "+="+dH}, $section.outerHeight() * 2); |
3817 | | - } |
3818 | | - $sections.animate( { 'height': $section.outerHeight() }, $section.outerHeight() * 2, function() { |
3819 | | - $(this).css('overflow', 'visible').css('height', 'auto'); |
3820 | | - context.fn.trigger( 'resize' ); |
3821 | | - } ); |
| 3815 | + $sections |
| 3816 | + .animate( { 'height': $section.outerHeight() }, $section.outerHeight() * 2, function() { |
| 3817 | + $(this).css( 'overflow', 'visible' ).css( 'height', 'auto' ); |
| 3818 | + context.fn.trigger( 'resize' ); |
| 3819 | + } ); |
3822 | 3820 | $(this).addClass( 'current' ); |
3823 | 3821 | } else { |
3824 | | - $sections.css('height', $section.outerHeight() ) |
3825 | | - .animate( { 'height': 0 }, $section.outerHeight() * 2, function() { |
3826 | | - $(this).css('overflow', 'visible'); |
| 3822 | + $sections |
| 3823 | + .css( 'height', $section.outerHeight() ) |
| 3824 | + .animate( { 'height': 'hide' }, $section.outerHeight() * 2, function() { |
| 3825 | + $(this).css( 'overflow', 'visible' ); |
3827 | 3826 | context.fn.trigger( 'resize' ); |
3828 | 3827 | } ); |
3829 | | - if ( 'toc' in context.modules ) { |
3830 | | - context.modules.toc.$toc.animate({'height': "-="+$section.outerHeight()}, $section.outerHeight() * 2); |
3831 | | - } |
3832 | 3828 | } |
3833 | 3829 | // Click tracking |
3834 | 3830 | if($.trackAction != undefined){ |
— | — | @@ -3928,12 +3924,7 @@ |
3929 | 3925 | var $section = s.$sections.find( '.section:visible' ); |
3930 | 3926 | if ( $section.size() ) { |
3931 | 3927 | $sections.animate( { 'height': $section.outerHeight() }, $section.outerHeight() * 2, function( ) { |
3932 | | - if ( 'toc' in context.modules ) { |
3933 | | - context.modules.toc.$toc.height( |
3934 | | - context.$ui.find( '.wikiEditor-ui-left' ) |
3935 | | - .outerHeight() - context.$ui.find( '.tab-toc' ).outerHeight() |
3936 | | - ) |
3937 | | - } |
| 3928 | + context.fn.trigger( 'resize' ); |
3938 | 3929 | } ); |
3939 | 3930 | } |
3940 | 3931 | } |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -258,8 +258,7 @@ |
259 | 259 | return html;},buildRow:function(context,row){var html='<tr>';for(cell in row){html+='<td class="cell cell-'+cell+'" valign="top"><span>'+ |
260 | 260 | $.wikiEditor.autoMsg(row[cell],['html','text'])+'</span></td>';} |
261 | 261 | html+='</tr>';return html;},buildCharacter:function(character,actions){if(typeof character=='string'){character={'label':character,'action':{'type':'encapsulate','options':{'pre':character}}};}else if(0 in character&&1 in character){character={'label':character[0],'action':{'type':'encapsulate','options':{'pre':character[1]}}};} |
262 | | -if('action'in character&&'label'in character){actions[character.label]=character.action;return'<a rel="'+character.label+'" href="#">'+character.label+'</a>';}},buildTab:function(context,id,section){var selected=$.cookie('wikiEditor-'+context.instance+'-toolbar-section');return $('<span />').attr({'class':'tab tab-'+id,'rel':id}).append($('<a />').addClass(selected==id?'current':null).attr('href','#').text($.wikiEditor.autoMsg(section,'label')).data('context',context).bind('mouseup',function(e){$(this).blur();}).bind('click',function(e){var $sections=$(this).data('context').$ui.find('.sections');var $section=$(this).data('context').$ui.find('.section-'+$(this).parent().attr('rel'));var show=$section.css('display')=='none';$previousSections=$section.parent().find('.section:visible');var dH=$previousSections.outerHeight();$previousSections.css('position','absolute');$previousSections.fadeOut('fast',function(){$(this).css('position','relative');});$(this).parent().parent().find('a').removeClass('current');$sections.css('overflow','hidden');if(show){$section.fadeIn('fast');dH=$section.outerHeight()-dH;if('toc'in context.modules){context.modules.toc.$toc.animate({'height':"+="+dH},$section.outerHeight()*2);} |
263 | | -$sections.animate({'height':$section.outerHeight()},$section.outerHeight()*2,function(){$(this).css('overflow','visible').css('height','auto');context.fn.trigger('resize');});$(this).addClass('current');}else{$sections.css('height',$section.outerHeight()).animate({'height':0},$section.outerHeight()*2,function(){$(this).css('overflow','visible');context.fn.trigger('resize');});if('toc'in context.modules){context.modules.toc.$toc.animate({'height':"-="+$section.outerHeight()},$section.outerHeight()*2);}} |
| 262 | +if('action'in character&&'label'in character){actions[character.label]=character.action;return'<a rel="'+character.label+'" href="#">'+character.label+'</a>';}},buildTab:function(context,id,section){var selected=$.cookie('wikiEditor-'+context.instance+'-toolbar-section');return $('<span />').attr({'class':'tab tab-'+id,'rel':id}).append($('<a />').addClass(selected==id?'current':null).attr('href','#').text($.wikiEditor.autoMsg(section,'label')).data('context',context).bind('mouseup',function(e){$(this).blur();}).bind('click',function(e){var $sections=$(this).data('context').$ui.find('.sections');var $section=$(this).data('context').$ui.find('.section-'+$(this).parent().attr('rel'));var show=$section.css('display')=='none';$previousSections=$section.parent().find('.section:visible');var dH=$previousSections.outerHeight();$previousSections.css('position','absolute');$previousSections.fadeOut('fast',function(){$(this).css('position','relative');});$(this).parent().parent().find('a').removeClass('current');$sections.css('overflow','hidden');if(show){$section.fadeIn('fast');dH=$section.outerHeight()-dH;$sections.animate({'height':$section.outerHeight()},$section.outerHeight()*2,function(){$(this).css('overflow','visible').css('height','auto');context.fn.trigger('resize');});$(this).addClass('current');}else{$sections.css('height',$section.outerHeight()).animate({'height':'hide'},$section.outerHeight()*2,function(){$(this).css('overflow','visible');context.fn.trigger('resize');});} |
264 | 263 | if($.trackAction!=undefined){$.trackAction($section.attr('rel')+'.'+(show?'show':'hide'));} |
265 | 264 | $.cookie('wikiEditor-'+$(this).data('context').instance+'-toolbar-section',show?$section.attr('rel'):null);return false;}));},buildSection:function(context,id,section){context.$textarea.trigger('wikiEditor-toolbar-buildSection-'+id,[section]);var selected=$.cookie('wikiEditor-'+context.instance+'-toolbar-section');var $section;switch(section.type){case'toolbar':var $section=$('<div />').attr({'class':'toolbar section section-'+id,'rel':id});if('groups'in section){for(group in section.groups){$section.append($.wikiEditor.modules.toolbar.fn.buildGroup(context,group,section.groups[group]));}} |
266 | 265 | break;case'booklet':var $pages=$('<div />').addClass('pages');var $index=$('<div />').addClass('index');if('pages'in section){for(page in section.pages){$pages.append($.wikiEditor.modules.toolbar.fn.buildPage(context,page,section.pages[page]));$index.append($.wikiEditor.modules.toolbar.fn.buildBookmark(context,page,section.pages[page]));}} |
— | — | @@ -267,4 +266,4 @@ |
268 | 267 | if($section!==null&&id!=='main'){var show=selected==id;$section.css('display',show?'block':'none');} |
269 | 268 | return $section;},updateBookletSelection:function(context,id,$pages,$index){var cookie='wikiEditor-'+context.instance+'-booklet-'+id+'-page';var selected=$.cookie(cookie);var $selectedIndex=$index.find('*[rel='+selected+']');if($selectedIndex.size()==0){selected=$index.children().eq(0).attr('rel');$.cookie(cookie,selected);} |
270 | 269 | $pages.children().hide();$pages.find('*[rel='+selected+']').show();$index.children().removeClass('current');$selectedIndex.addClass('current');},build:function(context,config){var $tabs=$('<div />').addClass('tabs').appendTo(context.modules.toolbar.$toolbar);var $sections=$('<div />').addClass('sections').appendTo(context.modules.toolbar.$toolbar);context.modules.toolbar.$toolbar.append($('<div />').css('clear','both'));var sectionQueue=[];for(section in config){if(section=='main'){context.modules.toolbar.$toolbar.prepend($.wikiEditor.modules.toolbar.fn.buildSection(context,section,config[section]));}else{sectionQueue.push({'$sections':$sections,'context':context,'id':section,'config':config[section]});$tabs.append($.wikiEditor.modules.toolbar.fn.buildTab(context,section,config[section]));}} |
271 | | -$.eachAsync(sectionQueue,{'bulk':0,'end':function(){$('body').css('position','static');$('body').css('position','relative');},'loop':function(i,s){s.$sections.append($.wikiEditor.modules.toolbar.fn.buildSection(s.context,s.id,s.config));var $section=s.$sections.find('.section:visible');if($section.size()){$sections.animate({'height':$section.outerHeight()},$section.outerHeight()*2,function(){if('toc'in context.modules){context.modules.toc.$toc.height(context.$ui.find('.wikiEditor-ui-left').outerHeight()-context.$ui.find('.tab-toc').outerHeight())}});}}});}}};})(jQuery); |
\ No newline at end of file |
| 270 | +$.eachAsync(sectionQueue,{'bulk':0,'end':function(){$('body').css('position','static');$('body').css('position','relative');},'loop':function(i,s){s.$sections.append($.wikiEditor.modules.toolbar.fn.buildSection(s.context,s.id,s.config));var $section=s.$sections.find('.section:visible');if($section.size()){$sections.animate({'height':$section.outerHeight()},$section.outerHeight()*2,function(){context.fn.trigger('resize');});}}});}}};})(jQuery); |
\ No newline at end of file |