r62405 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62404‎ | r62405 | r62406 >
Date:00:36, 13 February 2010
Author:tparscal
Status:ok
Tags:
Comment:
Turned everything back on for testing. (don't deploy this revision until we know these fixes are ok)
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)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.dialogs.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toc.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -75,17 +75,17 @@
7676 array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 131 ),
7777 array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 30 ),
7878 array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 49 ),
79 - array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 14 ),
80 - array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 85 ),
 79+ array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 15 ),
 80+ array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 86 ),
8181 array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 10 ),
8282 array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 17 ),
8383 array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 2 ),
8484 ),
8585 'combined' => array(
86 - array( 'src' => 'js/plugins.combined.js', 'version' => 252 ),
 86+ array( 'src' => 'js/plugins.combined.js', 'version' => 253 ),
8787 ),
8888 'minified' => array(
89 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 252 ),
 89+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 253 ),
9090 ),
9191 ),
9292 );
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.dialogs.js
@@ -11,7 +11,6 @@
1212
1313 /**
1414 * Compatability map
15 - */
1615 'browsers': {
1716 // Left-to-right languages
1817 'ltr': {
@@ -30,6 +29,7 @@
3130 'chrome': [['==', 1000]] // Off for now
3231 }
3332 },
 33+ */
3434 /**
3535 * API accessible functions
3636 */
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toc.js
@@ -3,7 +3,6 @@
44
55 /**
66 * Compatability map
7 - */
87 'browsers': {
98 // Left-to-right languages
109 'ltr': {
@@ -22,6 +21,7 @@
2322 'chrome': [['==', 1000]] // Off for now
2423 }
2524 },
 25+ */
2626 /**
2727 * Configuration
2828 */
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -8055,7 +8055,6 @@
80568056
80578057 /**
80588058 * Compatability map
8059 - */
80608059 'browsers': {
80618060 // Left-to-right languages
80628061 'ltr': {
@@ -8074,6 +8073,7 @@
80758074 'chrome': [['==', 1000]] // Off for now
80768075 }
80778076 },
 8077+ */
80788078 /**
80798079 * API accessible functions
80808080 */
@@ -9473,7 +9473,6 @@
94749474
94759475 /**
94769476 * Compatability map
9477 - */
94789477 'browsers': {
94799478 // Left-to-right languages
94809479 'ltr': {
@@ -9492,6 +9491,7 @@
94939492 'chrome': [['==', 1000]] // Off for now
94949493 }
94959494 },
 9495+ */
94969496 /**
94979497 * Configuration
94989498 */
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -560,7 +560,7 @@
561561 var args=$.makeArray(arguments);if(typeof context.$iframe==='undefined'&&arguments[0]=='addModule'){var supported=false;for(module in arguments[1]){if($.wikiEditor.isSupported(module)&&module!=='toolbar'){supported=true;}}
562562 if(supported){context.fn.setupIframe();}}
563563 if(args.length>0){var call=args.shift();if(call in context.api){context.api[call](context,typeof args[0]=='undefined'?{}:args[0]);}}
564 -return $(this).data('wikiEditor-context',context);};})(jQuery);RegExp.escape=function(s){return s.replace(/([.*+?^${}()|\/\\[\]])/g,'\\$1');};(function($){$.wikiEditor.modules.dialogs={'browsers':{'ltr':{'msie':[['>=',1000]],'firefox':[['>=',1000]],'opera':[['>=',1000]],'safari':[['==',1000]],'chrome':[['==',1000]]},'rtl':{'msie':[['>=',1000]],'firefox':[['>=',1000]],'opera':[['>=',1000]],'safari':[['==',1000]],'chrome':[['==',1000]]}},api:{addDialog:function(context,data){$.wikiEditor.modules.dialogs.fn.create(context,data)},openDialog:function(context,module){if(module in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[module].id).dialog('open');}},closeDialog:function(context,data){if(module in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[module].id).dialog('close');}}},fn:{create:function(context,config){for(module in config){$.wikiEditor.modules.dialogs.modules[module]=config[module];}
 564+return $(this).data('wikiEditor-context',context);};})(jQuery);RegExp.escape=function(s){return s.replace(/([.*+?^${}()|\/\\[\]])/g,'\\$1');};(function($){$.wikiEditor.modules.dialogs={api:{addDialog:function(context,data){$.wikiEditor.modules.dialogs.fn.create(context,data)},openDialog:function(context,module){if(module in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[module].id).dialog('open');}},closeDialog:function(context,data){if(module in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[module].id).dialog('close');}}},fn:{create:function(context,config){for(module in config){$.wikiEditor.modules.dialogs.modules[module]=config[module];}
565565 mw.usability.load(['$j.ui','$j.ui.dialog','$j.ui.draggable','$j.ui.resizable'],function(){for(module in $.wikiEditor.modules.dialogs.modules){var module=$.wikiEditor.modules.dialogs.modules[module];if($('#'+module.id).size()==0){var configuration=module.dialog;configuration.bgiframe=true;configuration.autoOpen=false;configuration.modal=true;configuration.title=$.wikiEditor.autoMsg(module,'title');configuration.newButtons={};for(msg in configuration.buttons)
566566 configuration.newButtons[mw.usability.getMsg(msg)]=configuration.buttons[msg];configuration.buttons=configuration.newButtons;var dialogDiv=$('<div /> ').attr('id',module.id).html(module.html).data('context',context).appendTo($('body')).each(module.init).dialog(configuration);if(!('resizeme'in module)||module.resizeme){dialogDiv.bind('dialogopen',$.wikiEditor.modules.dialogs.fn.resize).find('.ui-tabs').bind('tabsshow',function(){$(this).closest('.ui-dialog-content').each($.wikiEditor.modules.dialogs.fn.resize);});}
567567 dialogDiv.bind('dialogclose',function(){context.fn.restoreSelection();});var maxTI=0;$j('[tabindex]').each(function(){var ti=parseInt($j(this).attr('tabindex'));if(ti>maxTI)
@@ -656,7 +656,7 @@
657657 nameEndIndex=nameEnd.index+oldDivider+2;ranges.push(new Range(ranges[ranges.length-1].end,nameBeginIndex));nameIndex=ranges.push(new Range(nameBeginIndex,nameEndIndex))-1;currentValue=currentField.substring(currentField.indexOf('=')+1);oldDivider+=currentField.indexOf('=')+1;valueBegin=currentValue.match(/\S+/);if(valueBegin==null){continue;}
658658 valueBeginIndex=valueBegin.index+oldDivider+1;valueEnd=currentValue.match(/[^\s]\s*$/);if(valueEnd==null){continue;}
659659 valueEndIndex=valueEnd.index+oldDivider+2;equalsIndex=ranges.push(new Range(ranges[ranges.length-1].end,valueBeginIndex))-1;valueIndex=ranges.push(new Range(valueBeginIndex,valueEndIndex))-1;params.push(new Param(wikitext.substring(nameBeginIndex,nameEndIndex),wikitext.substring(valueBeginIndex,valueEndIndex),currentParamNumber,nameIndex,equalsIndex,valueIndex));paramsByName[wikitext.substring(nameBeginIndex,nameEndIndex)]=currentParamNumber;}}
660 -ranges.push(new Range(valueEndIndex,wikitext.length));this.ranges=ranges;this.wikitext=wikitext;this.params=params;this.paramsByName=paramsByName;this.templateNameIndex=templateNameIndex;}}};})(jQuery);(function($){$.wikiEditor.modules.toc={'browsers':{'ltr':{'msie':[['>=',1000]],'firefox':[['>=',1000]],'opera':[['>=',1000]],'safari':[['==',1000]],'chrome':[['==',1000]]},'rtl':{'msie':[['>=',1000]],'firefox':[['>=',1000]],'opera':[['>=',1000]],'safari':[['==',1000]],'chrome':[['==',1000]]}},cfg:{defaultWidth:'166px',minimumWidth:'70px',textMinimumWidth:'450px',flexProperty:'marginRight',rtl:false},api:{},evt:{change:function(context,event){$.wikiEditor.modules.toc.fn.update(context);},ready:function(context,event){$.wikiEditor.modules.toc.fn.build(context);context.$content.parent().blur(function(){var context=event.data.context;$.wikiEditor.modules.toc.fn.unhighlight(context);});$.wikiEditor.modules.toc.evt.resize(context);},resize:function(context,event){var availableWidth=context.$wikitext.width()-parseFloat($.wikiEditor.modules.toc.cfg.textMinimumWidth),totalMinWidth=parseFloat($.wikiEditor.modules.toc.cfg.minimumWidth)+
 660+ranges.push(new Range(valueEndIndex,wikitext.length));this.ranges=ranges;this.wikitext=wikitext;this.params=params;this.paramsByName=paramsByName;this.templateNameIndex=templateNameIndex;}}};})(jQuery);(function($){$.wikiEditor.modules.toc={cfg:{defaultWidth:'166px',minimumWidth:'70px',textMinimumWidth:'450px',flexProperty:'marginRight',rtl:false},api:{},evt:{change:function(context,event){$.wikiEditor.modules.toc.fn.update(context);},ready:function(context,event){$.wikiEditor.modules.toc.fn.build(context);context.$content.parent().blur(function(){var context=event.data.context;$.wikiEditor.modules.toc.fn.unhighlight(context);});$.wikiEditor.modules.toc.evt.resize(context);},resize:function(context,event){var availableWidth=context.$wikitext.width()-parseFloat($.wikiEditor.modules.toc.cfg.textMinimumWidth),totalMinWidth=parseFloat($.wikiEditor.modules.toc.cfg.minimumWidth)+
661661 parseFloat($.wikiEditor.modules.toc.cfg.textMinimumWidth);context.$ui.find('.wikiEditor-ui-right').resizable('option','maxWidth',availableWidth);if(context.modules.toc.$toc.data('positionMode')!='disabled'&&context.$wikitext.width()<totalMinWidth){$.wikiEditor.modules.toc.fn.disable(context);}else if(context.modules.toc.$toc.data('positionMode')=='disabled'&&context.$wikitext.width()>totalMinWidth){$.wikiEditor.modules.toc.fn.enable(context);}else if(context.modules.toc.$toc.data('positionMode')=='regular'&&context.$ui.find('.wikiEditor-ui-right').width()>availableWidth){$.wikiEditor.modules.toc.fn.switchLayout(context);}else if(context.modules.toc.$toc.data('positionMode')=='goofy'&&context.modules.toc.$toc.data('previousWidth')<context.$wikitext.width()){$.wikiEditor.modules.toc.fn.switchLayout(context);}
662662 if(context.modules.toc.$toc.data('positionMode')=='goofy'){context.modules.toc.$toc.find('div').autoEllipsis({'position':'right','tooltip':true,'restoreText':true});}
663663 if(!context.modules.toc.$toc.data('collapsed')){context.modules.toc.$toc.height(context.$ui.find('.wikiEditor-ui-left').height()-

Status & tagging log