r58992 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58991‎ | r58992 | r58993 >
Date:00:02, 13 November 2009
Author:catrope
Status:deferred
Tags:
Comment:
Update style versions and recombine for r58991
Modified paths:
  • /trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -71,16 +71,16 @@
7272 array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 6 ),
7373 array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 20 ),
7474 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 ),
7676 array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 9 ),
7777 array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 36 ),
7878 array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 3 ),
7979 ),
8080 'combined' => array(
81 - array( 'src' => 'js/plugins.combined.js', 'version' => 76 ),
 81+ array( 'src' => 'js/plugins.combined.js', 'version' => 77 ),
8282 ),
8383 'minified' => array(
84 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 76 ),
 84+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 77 ),
8585 ),
8686 ),
8787 );
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -2474,11 +2474,11 @@
24752475 },
24762476 build : function( context, config ) {
24772477 var $tabs = $( '<div />' ).addClass( 'tabs' ).appendTo( context.modules.$toolbar );
 2478+ /*
24782479 if( wgNavigableTOCCollapseEnable ) {
24792480 // FIXME: This code is duplicated from the TOC plugin and doesn't belong here;
24802481 // the TOC drag thingy should be in the TOC plugin instead
24812482 // placeholder for drag control creation code
2482 - /*
24832483 $dragControl = $( '<div />' ).addClass( 'tab' ).attr( 'id', 'wikiEditor-ui-toc-resize-grip' )
24842484 .append( '<a href="#" title="Drag to resize"></a>' )
24852485 .mousedown( function() {
@@ -2499,8 +2499,8 @@
25002500 return false;
25012501 })
25022502 context.modules.$toolbar.append( $dragControl );
2503 - */
25042503 }
 2504+ */
25052505 var $sections = $( '<div />' ).addClass( 'sections' ).appendTo( context.modules.$toolbar );
25062506 context.modules.$toolbar.append( $( '<div />' ).css( 'clear', 'both' ) );
25072507 var sectionQueue = [];
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -153,8 +153,7 @@
154154 $section=$('<div />').attr({'class':'booklet section section-'+id,'rel':id}).append($index).append($pages);$.wikiEditor.modules.toolbar.fn.updateBookletSelection(context,page,$pages,$index);break;}
155155 if($section!==null&&id!=='main'){var show=selected==id;$section.css('display',show?'block':'none');}
156156 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]));}}
159158 $.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;}
160159 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');}}
161160 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++;}

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r58991UsabilityInitiative: (bug 21459) WikiEditor breaks when NTOC disabled. This i...catrope00:01, 13 November 2009

Status & tagging log