Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -71,16 +71,16 @@ |
72 | 72 | array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 6 ), |
73 | 73 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 20 ), |
74 | 74 | array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 16 ), |
75 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 28 ), |
| 75 | + array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 29 ), |
76 | 76 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 9 ), |
77 | 77 | array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 36 ), |
78 | 78 | array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 3 ), |
79 | 79 | ), |
80 | 80 | 'combined' => array( |
81 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 76 ), |
| 81 | + array( 'src' => 'js/plugins.combined.js', 'version' => 77 ), |
82 | 82 | ), |
83 | 83 | 'minified' => array( |
84 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 76 ), |
| 84 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 77 ), |
85 | 85 | ), |
86 | 86 | ), |
87 | 87 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -2474,11 +2474,11 @@ |
2475 | 2475 | }, |
2476 | 2476 | build : function( context, config ) { |
2477 | 2477 | var $tabs = $( '<div />' ).addClass( 'tabs' ).appendTo( context.modules.$toolbar ); |
| 2478 | + /* |
2478 | 2479 | if( wgNavigableTOCCollapseEnable ) { |
2479 | 2480 | // FIXME: This code is duplicated from the TOC plugin and doesn't belong here; |
2480 | 2481 | // the TOC drag thingy should be in the TOC plugin instead |
2481 | 2482 | // placeholder for drag control creation code |
2482 | | - /* |
2483 | 2483 | $dragControl = $( '<div />' ).addClass( 'tab' ).attr( 'id', 'wikiEditor-ui-toc-resize-grip' ) |
2484 | 2484 | .append( '<a href="#" title="Drag to resize"></a>' ) |
2485 | 2485 | .mousedown( function() { |
— | — | @@ -2499,8 +2499,8 @@ |
2500 | 2500 | return false; |
2501 | 2501 | }) |
2502 | 2502 | context.modules.$toolbar.append( $dragControl ); |
2503 | | - */ |
2504 | 2503 | } |
| 2504 | + */ |
2505 | 2505 | var $sections = $( '<div />' ).addClass( 'sections' ).appendTo( context.modules.$toolbar ); |
2506 | 2506 | context.modules.$toolbar.append( $( '<div />' ).css( 'clear', 'both' ) ); |
2507 | 2507 | var sectionQueue = []; |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -153,8 +153,7 @@ |
154 | 154 | $section=$('<div />').attr({'class':'booklet section section-'+id,'rel':id}).append($index).append($pages);$.wikiEditor.modules.toolbar.fn.updateBookletSelection(context,page,$pages,$index);break;} |
155 | 155 | if($section!==null&&id!=='main'){var show=selected==id;$section.css('display',show?'block':'none');} |
156 | 156 | 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);} |
157 | | -$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);if(wgNavigableTOCCollapseEnable){} |
158 | | -var $sections=$('<div />').addClass('sections').appendTo(context.modules.$toolbar);context.modules.$toolbar.append($('<div />').css('clear','both'));var sectionQueue=[];for(section in config){if(section=='main'){context.modules.$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]));}} |
| 157 | +$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);var $sections=$('<div />').addClass('sections').appendTo(context.modules.$toolbar);context.modules.$toolbar.append($('<div />').css('clear','both'));var sectionQueue=[];for(section in config){if(section=='main'){context.modules.$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]));}} |
159 | 158 | $.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);}}});}}};})(jQuery);(function($){$.wikiEditor.modules.toc={api:{},defaultWidth:'13em',fn:{create:function(context,config){if('$toc'in context.modules){return;} |
160 | 159 | context.initialWidth=$.wikiEditor.modules.toc.defaultWidth;if(wgNavigableTOCResizable){if(!$.cookie('wikiEditor-'+context.instance+'-toc-width')){$.cookie('wikiEditor-'+context.instance+'-toc-width',$.wikiEditor.modules.toc.defaultWidth);}else{context.initialWidth=$.cookie('wikiEditor-'+context.instance+'-toc-width');}} |
161 | 160 | var height=context.$ui.find('.wikiEditor-ui-left').height();context.modules.$toc=$('<div />').addClass('wikiEditor-ui-toc').data('context',context);context.$ui.find('.wikiEditor-ui-right').css('width',$.wikiEditor.modules.toc.defaultWidth).append(context.modules.$toc);context.modules.$toc.height(context.$ui.find('.wikiEditor-ui-left').height());context.$ui.find('.wikiEditor-ui-left').css('marginRight',"-"+$.wikiEditor.modules.toc.defaultWidth).children().css('marginRight',$.wikiEditor.modules.toc.defaultWidth);$.wikiEditor.modules.toc.fn.build(context,config);context.$textarea.delayedBind(250,'mouseup scrollToPosition focus keyup encapsulateSelection change',function(event){var context=$(this).data('wikiEditor-context');$(this).eachAsync({bulk:0,loop:function(){$.wikiEditor.modules.toc.fn.build(context);$.wikiEditor.modules.toc.fn.update(context);}});}).blur(function(){var context=$(this).data('wikiEditor-context');context.$textarea.delayedBindCancel(250,'mouseup scrollToPosition focus keyup encapsulateSelection change');$.wikiEditor.modules.toc.fn.unhighlight(context);});},unhighlight:function(context){context.modules.$toc.find('div').removeClass('current');},update:function(context){$.wikiEditor.modules.toc.fn.unhighlight(context);var position=context.$textarea.textSelection('getCaretPosition');var section=0;if(context.data.outline.length>0){if(!(position<context.data.outline[0].position-1)){while(section<context.data.outline.length&&context.data.outline[section].position-1<position){section++;} |