r62716 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62715‎ | r62716 | r62717 >
Date:20:05, 19 February 2010
Author:tparscal
Status:ok
Tags:
Comment:
Pushed Opera support to version 10 for TOC and Dialogs.
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' => 144 ),
7777 array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 34 ),
7878 array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 49 ),
79 - array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 17 ),
80 - array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 92 ),
 79+ array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 18 ),
 80+ array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 93 ),
8181 array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 11 ),
8282 array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 21 ),
8383 array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 3 ),
8484 ),
8585 'combined' => array(
86 - array( 'src' => 'js/plugins.combined.js', 'version' => 271 ),
 86+ array( 'src' => 'js/plugins.combined.js', 'version' => 272 ),
8787 ),
8888 'minified' => array(
89 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 271 ),
 89+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 272 ),
9090 ),
9191 ),
9292 );
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.dialogs.js
@@ -17,7 +17,7 @@
1818 'ltr': {
1919 'msie': [['>=', 7]],
2020 'firefox': [['>=', 3]],
21 - 'opera': [['>=', 9.6]],
 21+ 'opera': [['>=', 10]],
2222 'safari': [['>=', 4]],
2323 'chrome': [['>=', 4]]
2424 },
@@ -25,7 +25,7 @@
2626 'rtl': {
2727 'msie': [['>=', 8]],
2828 'firefox': [['>=', 3]],
29 - 'opera': [['>=', 9.6]],
 29+ 'opera': [['>=', 10]],
3030 'safari': [['>=', 4]],
3131 'chrome': [['>=', 4]]
3232 }
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toc.js
@@ -9,7 +9,7 @@
1010 'ltr': {
1111 'msie': [['>=', 7]],
1212 'firefox': [['>=', 3]],
13 - 'opera': [['>=', 9.6]],
 13+ 'opera': [['>=', 10]],
1414 'safari': [['>=', 4]],
1515 'chrome': [['>=', 4]]
1616 },
@@ -17,7 +17,7 @@
1818 'rtl': {
1919 'msie': [['>=', 8]],
2020 'firefox': [['>=', 3]],
21 - 'opera': [['>=', 9.6]],
 21+ 'opera': [['>=', 10]],
2222 'safari': [['>=', 4]],
2323 'chrome': [['>=', 4]]
2424 }
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -8120,7 +8120,7 @@
81218121 'ltr': {
81228122 'msie': [['>=', 7]],
81238123 'firefox': [['>=', 3]],
8124 - 'opera': [['>=', 9.6]],
 8124+ 'opera': [['>=', 10]],
81258125 'safari': [['>=', 4]],
81268126 'chrome': [['>=', 4]]
81278127 },
@@ -8128,7 +8128,7 @@
81298129 'rtl': {
81308130 'msie': [['>=', 8]],
81318131 'firefox': [['>=', 3]],
8132 - 'opera': [['>=', 9.6]],
 8132+ 'opera': [['>=', 10]],
81338133 'safari': [['>=', 4]],
81348134 'chrome': [['>=', 4]]
81358135 }
@@ -9623,7 +9623,7 @@
96249624 'ltr': {
96259625 'msie': [['>=', 7]],
96269626 'firefox': [['>=', 3]],
9627 - 'opera': [['>=', 9.6]],
 9627+ 'opera': [['>=', 10]],
96289628 'safari': [['>=', 4]],
96299629 'chrome': [['>=', 4]]
96309630 },
@@ -9631,7 +9631,7 @@
96329632 'rtl': {
96339633 'msie': [['>=', 8]],
96349634 'firefox': [['>=', 3]],
9635 - 'opera': [['>=', 9.6]],
 9635+ 'opera': [['>=', 10]],
96369636 'safari': [['>=', 4]],
96379637 'chrome': [['>=', 4]]
96389638 }
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -562,7 +562,7 @@
563563 $element.trigger('scrollToTop');}};context.$textarea.wrapAll($('<div></div>').addClass('wikiEditor-ui')).wrapAll($('<div></div>').addClass('wikiEditor-ui-view wikiEditor-ui-view-wikitext')).wrapAll($('<div></div>').addClass('wikiEditor-ui-left')).wrapAll($('<div></div>').addClass('wikiEditor-ui-bottom')).wrapAll($('<div></div>').addClass('wikiEditor-ui-text'));context.$ui=context.$textarea.parent().parent().parent().parent().parent();context.$wikitext=context.$textarea.parent().parent().parent().parent();context.$wikitext.before($('<div></div>').addClass('wikiEditor-ui-controls').append($('<div></div>').addClass('wikiEditor-ui-tabs').hide()).append($('<div></div>').addClass('wikiEditor-ui-buttons'))).before($('<div style="clear:both;"></div>'));context.$controls=context.$ui.find('.wikiEditor-ui-buttons').hide();context.$buttons=context.$ui.find('.wikiEditor-ui-buttons');context.$tabs=context.$ui.find('.wikiEditor-ui-tabs');context.$ui.after($('<div style="clear:both;"></div>'));context.$wikitext.append($('<div></div>').addClass('wikiEditor-ui-right'));context.$wikitext.find('.wikiEditor-ui-left').prepend($('<div></div>').addClass('wikiEditor-ui-top'));context.view='wikitext';$(window).resize(function(event){context.fn.trigger('resize',event);});}
564564 var args=$.makeArray(arguments);if(typeof context.$iframe==='undefined'&&arguments[0]=='addModule'&&typeof arguments[1]=='object'){for(module in arguments[1]){if($.wikiEditor.isSupported(module)&&$.wikiEditor.isRequired(module,'iframe')){context.fn.setupIframe();break;}}}
565565 if(args.length>0){var call=args.shift();if(call in context.api){context.api[call](context,typeof args[0]=='undefined'?{}:args[0]);}}
566 -return $(this).data('wikiEditor-context',context);};})(jQuery);RegExp.escape=function(s){return s.replace(/([.*+?^${}()|\/\\[\]])/g,'\\$1');};(function($){$.wikiEditor.modules.dialogs={'browsers':{'ltr':{'msie':[['>=',7]],'firefox':[['>=',3]],'opera':[['>=',9.6]],'safari':[['>=',4]],'chrome':[['>=',4]]},'rtl':{'msie':[['>=',8]],'firefox':[['>=',3]],'opera':[['>=',9.6]],'safari':[['>=',4]],'chrome':[['>=',4]]}},'req':['iframe'],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];}
 566+return $(this).data('wikiEditor-context',context);};})(jQuery);RegExp.escape=function(s){return s.replace(/([.*+?^${}()|\/\\[\]])/g,'\\$1');};(function($){$.wikiEditor.modules.dialogs={'browsers':{'ltr':{'msie':[['>=',7]],'firefox':[['>=',3]],'opera':[['>=',10]],'safari':[['>=',4]],'chrome':[['>=',4]]},'rtl':{'msie':[['>=',8]],'firefox':[['>=',3]],'opera':[['>=',10]],'safari':[['>=',4]],'chrome':[['>=',4]]}},'req':['iframe'],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];}
567567 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)
568568 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);});}
569569 dialogDiv.bind('dialogclose',function(){context.fn.restoreSelection();});var maxTI=0;$j('[tabindex]').each(function(){var ti=parseInt($j(this).attr('tabindex'));if(ti>maxTI)
@@ -663,7 +663,7 @@
664664 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;}
665665 valueBeginIndex=valueBegin.index+oldDivider+1;valueEnd=currentValue.match(/[^\s]\s*$/);if(valueEnd==null){continue;}
666666 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;}}
667 -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':[['>=',7]],'firefox':[['>=',3]],'opera':[['>=',9.6]],'safari':[['>=',4]],'chrome':[['>=',4]]},'rtl':{'msie':[['>=',8]],'firefox':[['>=',3]],'opera':[['>=',9.6]],'safari':[['>=',4]],'chrome':[['>=',4]]}},'req':['iframe'],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)+
 667+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':[['>=',7]],'firefox':[['>=',3]],'opera':[['>=',10]],'safari':[['>=',4]],'chrome':[['>=',4]]},'rtl':{'msie':[['>=',8]],'firefox':[['>=',3]],'opera':[['>=',10]],'safari':[['>=',4]],'chrome':[['>=',4]]}},'req':['iframe'],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)+
668668 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);}
669669 if(context.modules.toc.$toc.data('positionMode')=='goofy'){context.modules.toc.$toc.find('div').autoEllipsis({'position':'right','tooltip':true,'restoreText':true});}
670670 if(!context.modules.toc.$toc.data('collapsed')){context.modules.toc.$toc.height(context.$ui.find('.wikiEditor-ui-left').height()-

Status & tagging log