r62397 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62396‎ | r62397 | r62398 >
Date:23:41, 12 February 2010
Author:catrope
Status:ok
Tags:
Comment:
wmf-deployment: Merge r62392, r62393, r62394, r62395 and r62396 from trunk
Modified paths:
  • /branches/wmf-deployment/extensions/UsabilityInitiative (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/OptIn (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/css/combined.css (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/css/combined.min.css (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/css/wikiEditor.css (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.js (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.min.js (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.dialogs.js (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toc.js (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -21,7 +21,7 @@
2222 array( 'src' => 'css/suggestions.css', 'version' => 6 ),
2323 array( 'src' => 'css/vector.collapsibleNav.css', 'version' => 7 ),
2424 array( 'src' => 'css/vector.footerCleanup.css', 'version' => 1 ),
25 - array( 'src' => 'css/wikiEditor.css', 'version' => 11 ),
 25+ array( 'src' => 'css/wikiEditor.css', 'version' => 12 ),
2626 array( 'src' => 'css/wikiEditor.dialogs.css', 'version' => 19 ),
2727 array( 'src' => 'css/wikiEditor.preview.css', 'version' => 1 ),
2828 array( 'src' => 'css/wikiEditor.toc.css', 'version' => 28 ),
@@ -29,11 +29,11 @@
3030 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
3131 ),
3232 'combined' => array(
33 - array( 'src' => 'css/combined.css', 'version' => 66 ),
 33+ array( 'src' => 'css/combined.css', 'version' => 67 ),
3434 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
3535 ),
3636 'minified' => array(
37 - array( 'src' => 'css/combined.min.css', 'version' => 66 ),
 37+ array( 'src' => 'css/combined.min.css', 'version' => 67 ),
3838 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
3939 ),
4040 )
@@ -72,20 +72,20 @@
7373 array( 'src' => 'js/plugins/jquery.namespaceSelect.js', 'version' => 1 ),
7474 array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 7 ),
7575 array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 27 ),
76 - array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 130 ),
 76+ array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 131 ),
7777 array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 30 ),
78 - array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 48 ),
79 - array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 12 ),
80 - array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 81 ),
 78+ 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 ),
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' => 250 ),
 86+ array( 'src' => 'js/plugins.combined.js', 'version' => 252 ),
8787 ),
8888 'minified' => array(
89 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 250 ),
 89+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 252 ),
9090 ),
9191 ),
9292 );
Index: branches/wmf-deployment/extensions/UsabilityInitiative/css/wikiEditor.css
@@ -15,6 +15,7 @@
1616 padding: 0;
1717 width: 100%;
1818 margin: -1px;
 19+ line-height: 1.5em;
1920 }
2021 .wikiEditor-ui .wikiEditor-ui-text > textarea#wpTextbox1 {
2122 margin: 0;
Index: branches/wmf-deployment/extensions/UsabilityInitiative/css/combined.css
@@ -128,6 +128,7 @@
129129 padding: 0;
130130 width: 100%;
131131 margin: -1px;
 132+ line-height: 1.5em;
132133 }
133134 .wikiEditor-ui .wikiEditor-ui-text > textarea#wpTextbox1 {
134135 margin: 0;
Index: branches/wmf-deployment/extensions/UsabilityInitiative/css/combined.min.css
@@ -120,6 +120,7 @@
121121 padding:0;
122122 width:100%;
123123 margin:-1px;
 124+line-height:1.5em;
124125 }
125126 .wikiEditor-ui .wikiEditor-ui-text > textarea#wpTextbox1{
126127 margin:0;
Property changes on: branches/wmf-deployment/extensions/UsabilityInitiative/OptIn
___________________________________________________________________
Name: svn:mergeinfo
127128 - /branches/REL1_15/phase3/extensions/UsabilityInitiative/OptIn:51646
/trunk/extensions/UsabilityInitiative/OptIn:56207,56209,56296,56333,56355,62041,62043,62127,62139-62140,62142-62143,62145-62146,62256,62263,62274,62380,62384
/trunk/phase3/extensions/UsabilityInitiative/OptIn:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816
128129 + /branches/REL1_15/phase3/extensions/UsabilityInitiative/OptIn:51646
/trunk/extensions/UsabilityInitiative/OptIn:56207,56209,56296,56333,56355,62041,62043,62127,62139-62140,62142-62143,62145-62146,62256,62263,62274,62380,62384,62393-62396
/trunk/phase3/extensions/UsabilityInitiative/OptIn:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816
Property changes on: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js
___________________________________________________________________
Name: svn:mergeinfo
129130 - /trunk/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js:62041,62043,62127,62139,62142-62143,62145-62146,62256,62263,62274,62380,62384
130131 + /trunk/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js:62041,62043,62127,62139,62142-62143,62145-62146,62256,62263,62274,62380,62384,62393-62396
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.dialogs.js
@@ -10,6 +10,27 @@
1111 ( function( $ ) { $.wikiEditor.modules.dialogs = {
1212
1313 /**
 14+ * Compatability map
 15+ */
 16+'browsers': {
 17+ // Left-to-right languages
 18+ 'ltr': {
 19+ 'msie': [['>=', 1000]], // Off for now
 20+ 'firefox': [['>=', 1000]], // Off for now
 21+ 'opera': [['>=', 1000]], // Off for now
 22+ 'safari': [['==', 1000]], // Off for now
 23+ 'chrome': [['==', 1000]] // Off for now
 24+ },
 25+ // Right-to-left languages
 26+ 'rtl': {
 27+ 'msie': [['>=', 1000]], // Off for now
 28+ 'firefox': [['>=', 1000]], // Off for now
 29+ 'opera': [['>=', 1000]], // Off for now
 30+ 'safari': [['==', 1000]], // Off for now
 31+ 'chrome': [['==', 1000]] // Off for now
 32+ }
 33+},
 34+/**
1435 * API accessible functions
1536 */
1637 api: {
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toc.js
@@ -2,6 +2,27 @@
33 ( function( $ ) { $.wikiEditor.modules.toc = {
44
55 /**
 6+ * Compatability map
 7+ */
 8+'browsers': {
 9+ // Left-to-right languages
 10+ 'ltr': {
 11+ 'msie': [['>=', 1000]], // Off for now
 12+ 'firefox': [['>=', 1000]], // Off for now
 13+ 'opera': [['>=', 1000]], // Off for now
 14+ 'safari': [['==', 1000]], // Off for now
 15+ 'chrome': [['==', 1000]] // Off for now
 16+ },
 17+ // Right-to-left languages
 18+ 'rtl': {
 19+ 'msie': [['>=', 1000]], // Off for now
 20+ 'firefox': [['>=', 1000]], // Off for now
 21+ 'opera': [['>=', 1000]], // Off for now
 22+ 'safari': [['==', 1000]], // Off for now
 23+ 'chrome': [['==', 1000]] // Off for now
 24+ }
 25+},
 26+/**
627 * Configuration
728 */
829 cfg: {
Property changes on: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js
___________________________________________________________________
Name: svn:mergeinfo
930 - /trunk/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js:62041,62043,62127,62139,62142-62143,62145-62146,62256,62263,62274,62380,62384
1031 + /trunk/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js:62041,62043,62127,62139,62142-62143,62145-62146,62256,62263,62274,62380,62384,62393-62396
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js
@@ -1398,15 +1398,27 @@
13991399 };
14001400 };
14011401 }
1402 -// FAT UGLY HACK PART 2: Don't do the iframe when only the toolbar is enabled
1403 -if ( typeof context.$iframe === 'undefined' && ( arguments[0] !== 'addModule' || typeof arguments[1].toolbar === 'undefined' ) ) {
1404 - context.fn.setupIframe();
1405 -}
14061402
14071403 /* API Execution */
14081404
14091405 // Since javascript gives arguments as an object, we need to convert them so they can be used more easily
14101406 var args = $.makeArray( arguments );
 1407+
 1408+// FAT UGLY HACK PART 2: Don't do the iframe when only the toolbar is enabled
 1409+if ( typeof context.$iframe === 'undefined' && arguments[0] == 'addModule' ) {
 1410+ // Check that at least one of the modules being added is indeed supported
 1411+ var supported = false;
 1412+ for ( module in arguments[1] ) {
 1413+ // Let the toolbar slip through
 1414+ if ( $.wikiEditor.isSupported( module ) && module !== 'toolbar' ) {
 1415+ supported = true;
 1416+ }
 1417+ }
 1418+ if ( supported ) {
 1419+ context.fn.setupIframe();
 1420+ }
 1421+}
 1422+
14111423 // There would need to be some arguments if the API is being called
14121424 if ( args.length > 0 ) {
14131425 // Handle API calls
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js
@@ -249,7 +249,9 @@
250250 'encapsulateSelection',
251251 $.extend( {}, action.options, parts, { 'replace': action.type == 'replace' } )
252252 );
253 - context.$iframe[0].contentWindow.focus();
 253+ if ( typeof context.$iframe !== 'undefined' ) {
 254+ context.$iframe[0].contentWindow.focus();
 255+ }
254256 break;
255257 case 'callback':
256258 if ( typeof action.execute == 'function' ) {
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -7831,15 +7831,27 @@
78327832 };
78337833 };
78347834 }
7835 -// FAT UGLY HACK PART 2: Don't do the iframe when only the toolbar is enabled
7836 -if ( typeof context.$iframe === 'undefined' && ( arguments[0] !== 'addModule' || typeof arguments[1].toolbar === 'undefined' ) ) {
7837 - context.fn.setupIframe();
7838 -}
78397835
78407836 /* API Execution */
78417837
78427838 // Since javascript gives arguments as an object, we need to convert them so they can be used more easily
78437839 var args = $.makeArray( arguments );
 7840+
 7841+// FAT UGLY HACK PART 2: Don't do the iframe when only the toolbar is enabled
 7842+if ( typeof context.$iframe === 'undefined' && arguments[0] == 'addModule' ) {
 7843+ // Check that at least one of the modules being added is indeed supported
 7844+ var supported = false;
 7845+ for ( module in arguments[1] ) {
 7846+ // Let the toolbar slip through
 7847+ if ( $.wikiEditor.isSupported( module ) && module !== 'toolbar' ) {
 7848+ supported = true;
 7849+ }
 7850+ }
 7851+ if ( supported ) {
 7852+ context.fn.setupIframe();
 7853+ }
 7854+}
 7855+
78447856 // There would need to be some arguments if the API is being called
78457857 if ( args.length > 0 ) {
78467858 // Handle API calls
@@ -7865,6 +7877,27 @@
78667878 ( function( $ ) { $.wikiEditor.modules.dialogs = {
78677879
78687880 /**
 7881+ * Compatability map
 7882+ */
 7883+'browsers': {
 7884+ // Left-to-right languages
 7885+ 'ltr': {
 7886+ 'msie': [['>=', 1000]], // Off for now
 7887+ 'firefox': [['>=', 1000]], // Off for now
 7888+ 'opera': [['>=', 1000]], // Off for now
 7889+ 'safari': [['==', 1000]], // Off for now
 7890+ 'chrome': [['==', 1000]] // Off for now
 7891+ },
 7892+ // Right-to-left languages
 7893+ 'rtl': {
 7894+ 'msie': [['>=', 1000]], // Off for now
 7895+ 'firefox': [['>=', 1000]], // Off for now
 7896+ 'opera': [['>=', 1000]], // Off for now
 7897+ 'safari': [['==', 1000]], // Off for now
 7898+ 'chrome': [['==', 1000]] // Off for now
 7899+ }
 7900+},
 7901+/**
78697902 * API accessible functions
78707903 */
78717904 api: {
@@ -9244,6 +9277,27 @@
92459278 ( function( $ ) { $.wikiEditor.modules.toc = {
92469279
92479280 /**
 9281+ * Compatability map
 9282+ */
 9283+'browsers': {
 9284+ // Left-to-right languages
 9285+ 'ltr': {
 9286+ 'msie': [['>=', 1000]], // Off for now
 9287+ 'firefox': [['>=', 1000]], // Off for now
 9288+ 'opera': [['>=', 1000]], // Off for now
 9289+ 'safari': [['==', 1000]], // Off for now
 9290+ 'chrome': [['==', 1000]] // Off for now
 9291+ },
 9292+ // Right-to-left languages
 9293+ 'rtl': {
 9294+ 'msie': [['>=', 1000]], // Off for now
 9295+ 'firefox': [['>=', 1000]], // Off for now
 9296+ 'opera': [['>=', 1000]], // Off for now
 9297+ 'safari': [['==', 1000]], // Off for now
 9298+ 'chrome': [['==', 1000]] // Off for now
 9299+ }
 9300+},
 9301+/**
92489302 * Configuration
92499303 */
92509304 cfg: {
@@ -10104,7 +10158,9 @@
1010510159 'encapsulateSelection',
1010610160 $.extend( {}, action.options, parts, { 'replace': action.type == 'replace' } )
1010710161 );
10108 - context.$iframe[0].contentWindow.focus();
 10162+ if ( typeof context.$iframe !== 'undefined' ) {
 10163+ context.$iframe[0].contentWindow.focus();
 10164+ }
1010910165 break;
1011010166 case 'callback':
1011110167 if ( typeof action.execute == 'function' ) {
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -535,9 +535,10 @@
536536 context.$content=$(context.$iframe[0].contentWindow.document.body);var html=context.$textarea.val().replace(/&esc;/g,'&esc;esc;').replace(/\<p\>/g,'&esc;&lt;p&gt;').replace(/\<\/p\>/g,'&esc;&lt;/p&gt;').replace(/\<span class="wikiEditor-tab"\>\<\/span\>/g,'&esc;&lt;span&nbsp;class=&quot;wikiEditor-tab&quot;&gt;&lt;/span&gt;').replace(/&nbsp;/g,'&esc;&amp;nbsp;');if($.browser.msie){html=html.replace(/\t/g,'<span class="wikiEditor-tab"></span>');if($.browser.versionNumber<=7){html=html.replace(/ /g,"&nbsp;");}else{html=html.replace(/(^|\n) /g,"$1&nbsp;");}}
537537 html=$('<div />').text('<p>'+html.replace(/\r?\n/g,'</p><p>')+'</p>').html().replace(/&amp;nbsp;/g,'&nbsp;').replace(/&lt;p&gt;/g,'<p>').replace(/&lt;\/p&gt;/g,'</p>').replace(/&lt;span( |&nbsp;)class=("|&quot;)wikiEditor-tab("|&quot;)&gt;&lt;\/span&gt;/g,'<span class="wikiEditor-tab"></span>').replace(/<p><\/p>/g,'<p><br></p>').replace(/&amp;esc;&amp;amp;nbsp;/g,'&amp;nbsp;').replace(/&amp;esc;&amp;lt;p&amp;gt;/g,'&lt;p&gt;').replace(/&amp;esc;&amp;lt;\/p&amp;gt;/g,'&lt;/p&gt;').replace(/&amp;esc;&amp;lt;span&amp;nbsp;class=&amp;quot;wikiEditor-tab&amp;quot;&amp;gt;&amp;lt;\/span&amp;gt;/g,'&lt;span class="wikiEditor-tab"&gt;&lt;\/span&gt;').replace(/&amp;esc;esc;/g,'&amp;esc;');context.$content.html(html);context.oldHTML=html;context.history.push({'html':html});if($('body').is('.rtl')){context.$content.addClass('rtl').attr('dir','rtl');}
538538 context.$textarea.attr('disabled',true);context.$textarea.hide();context.$iframe.show();context.fn.trigger('ready');$(context.$iframe[0].contentWindow.document).bind('keydown',function(event){return context.fn.trigger('keydown',event);}).bind('paste',function(event){return context.fn.trigger('paste',event);}).bind('keyup paste mouseup cut encapsulateSelection',function(event){return context.fn.trigger('change',event);}).delayedBind(250,'keyup paste mouseup cut encapsulateSelection',function(event){context.fn.trigger('delayedChange',event);});});context.$textarea.closest('form').submit(function(){context.$textarea.attr('disabled',false);context.$textarea.val(context.$textarea.textSelection('getContents'));});context.fallbackWindowOnBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){context.$textarea.val(context.$textarea.textSelection('getContents'));if(context.fallbackWindowOnBeforeUnload){return context.fallbackWindowOnBeforeUnload();}};};}
539 -if(typeof context.$iframe==='undefined'&&(arguments[0]!=='addModule'||typeof arguments[1].toolbar==='undefined')){context.fn.setupIframe();}
540 -var args=$.makeArray(arguments);if(args.length>0){var call=args.shift();if(call in context.api){context.api[call](context,typeof args[0]=='undefined'?{}:args[0]);}}
541 -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];}
 539+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;}}
 540+if(supported){context.fn.setupIframe();}}
 541+if(args.length>0){var call=args.shift();if(call in context.api){context.api[call](context,typeof args[0]=='undefined'?{}:args[0]);}}
 542+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];}
542543 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)
543544 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);});}
544545 dialogDiv.bind('dialogclose',function(){context.fn.restoreSelection();});var maxTI=0;$j('[tabindex]').each(function(){var ti=parseInt($j(this).attr('tabindex'));if(ti>maxTI)
@@ -633,7 +634,7 @@
634635 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;}
635636 valueBeginIndex=valueBegin.index+oldDivider+1;valueEnd=currentValue.match(/[^\s]\s*$/);if(valueEnd==null){continue;}
636637 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;}}
637 -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)+
 638+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)+
638639 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);}
639640 if(context.modules.toc.$toc.data('positionMode')=='goofy'){context.modules.toc.$toc.find('div').autoEllipsis({'position':'right','tooltip':true,'restoreText':true});}
640641 if(!context.modules.toc.$toc.data('collapsed')){context.modules.toc.$toc.height(context.$ui.find('.wikiEditor-ui-left').height()-
@@ -689,7 +690,8 @@
690691 rels.reverse();var id=rels.join('.');$.trackAction(id);}
691692 switch(action.type){case'replace':case'encapsulate':var parts={'pre':'','peri':'','post':''};for(part in parts){if(part+'Msg'in action.options){parts[part]=mw.usability.getMsg(action.options[part+'Msg'],(action.options[part]||null));}else{parts[part]=(action.options[part]||'')}}
692693 if('regex'in action.options&&'regexReplace'in action.options){var selection=context.$textarea.textSelection('getSelection');if(selection!=''&&selection.match(action.options.regex)){parts.peri=selection.replace(action.options.regex,action.options.regexReplace);parts.pre=parts.post='';}}
693 -context.$textarea.textSelection('encapsulateSelection',$.extend({},action.options,parts,{'replace':action.type=='replace'}));context.$iframe[0].contentWindow.focus();break;case'callback':if(typeof action.execute=='function'){action.execute(context);}
 694+context.$textarea.textSelection('encapsulateSelection',$.extend({},action.options,parts,{'replace':action.type=='replace'}));if(typeof context.$iframe!=='undefined'){context.$iframe[0].contentWindow.focus();}
 695+break;case'callback':if(typeof action.execute=='function'){action.execute(context);}
694696 break;case'dialog':context.fn.saveSelection();context.$textarea.wikiEditor('openDialog',action.module);break;default:break;}},buildGroup:function(context,id,group){var $group=$('<div />').attr({'class':'group group-'+id,'rel':id});var label=$.wikiEditor.autoMsg(group,'label');if(label){$group.append('<div class="label">'+label+'</div>')}
695697 var empty=true;if('tools'in group){for(tool in group.tools){var tool=$.wikiEditor.modules.toolbar.fn.buildTool(context,tool,group.tools[tool]);if(tool){empty=false;$group.append(tool);}}}
696698 return empty?null:$group;},buildTool:function(context,id,tool){if('filters'in tool){for(filter in tool.filters){if($(tool.filters[filter]).size()==0){return null;}}}
Property changes on: branches/wmf-deployment/extensions/UsabilityInitiative
___________________________________________________________________
Name: svn:mergeinfo
697699 - /branches/REL1_15/phase3/extensions/UsabilityInitiative:51646
/trunk/extensions/UsabilityInitiative:56207,56209,56296,56333,56355,62041,62043,62127,62139,62142-62143,62145-62146,62256,62263,62274,62380,62384
/trunk/phase3/extensions/UsabilityInitiative:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816
698700 + /branches/REL1_15/phase3/extensions/UsabilityInitiative:51646
/trunk/extensions/UsabilityInitiative:56207,56209,56296,56333,56355,62041,62043,62127,62139,62142-62143,62145-62146,62256,62263,62274,62380,62384,62393-62396
/trunk/phase3/extensions/UsabilityInitiative:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r62392Makes sure the dialogs class is only added on supported browsers.tparscal23:05, 12 February 2010
r62393Makes the line-height of the textarea the same as the iframe - in the case th...tparscal23:06, 12 February 2010
r62394Reworked the logic of the textarea+toolbar only hack. Arranged things so when...tparscal23:08, 12 February 2010
r62395TOC and Dialogs off for now, fixed toolbar dependance on the iframe.tparscal23:33, 12 February 2010
r62396Style version bump for r62393catrope23:41, 12 February 2010

Status & tagging log