r66321 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66320‎ | r66321 | r66322 >
Date:05:09, 13 May 2010
Author:catrope
Status:deferred
Tags:
Comment:
Fix r66286: another undeclared context var
Modified paths:
  • /trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php
@@ -16,16 +16,16 @@
1717 array( 'src' => 'Modules/Preview/Preview.js', 'version' => 6 ),
1818 array( 'src' => 'Modules/Publish/Publish.js', 'version' => 6 ),
1919 array( 'src' => 'Modules/Toc/Toc.js', 'version' => 7 ),
20 - array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 87 ),
 20+ array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 88 ),
2121 array( 'src' => 'Modules/TemplateEditor/TemplateEditor.js', 'version' => 6 ),
2222 array( 'src' => 'Modules/Templates/Templates.js', 'version' => 1 ),
2323 array( 'src' => 'Modules/AddMediaWizard/AddMediaWizard.js', 'version' => 6 ),
2424 ),
2525 'combined' => array(
26 - array( 'src' => 'WikiEditor.combined.js', 'version' => 92 ),
 26+ array( 'src' => 'WikiEditor.combined.js', 'version' => 93 ),
2727 ),
2828 'minified' => array(
29 - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 92 ),
 29+ array( 'src' => 'WikiEditor.combined.min.js', 'version' => 93 ),
3030 ),
3131 );
3232 static $messages = array(
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js
@@ -1561,6 +1561,7 @@
15621562 },
15631563 'wikieditor-toolbar-tool-reference-cancel': function() {
15641564 // Clear any saved selection state
 1565+ var context = $j( this ).data( 'context' );
15651566 context.fn.restoreStuffForIE();
15661567 $j( this ).dialog( 'close' );
15671568 }
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js
@@ -84,7 +84,7 @@
8585 <input type="text" id="wikieditor-toolbar-reference-text" />\
8686 </div>\
8787 </div></fieldset>\
88 - </div>',init:function(){$j(this).find('[rel]').each(function(){$j(this).text(mw.usability.getMsg($j(this).attr('rel')));});},dialog:{dialogClass:'wikiEditor-toolbar-dialog',width:590,buttons:{'wikieditor-toolbar-tool-reference-insert':function(){var insertText=$j('#wikieditor-toolbar-reference-text').val();var whitespace=$j('#wikieditor-toolbar-reference-dialog').data('whitespace');var attributes=$j('#wikieditor-toolbar-reference-dialog').data('attributes');$j(this).dialog('close');$j.wikiEditor.modules.toolbar.fn.doAction($j(this).data('context'),{type:'replace',options:{pre:whitespace[0]+'<ref'+attributes+'>',peri:insertText,post:'</ref>'+whitespace[1]}},$j(this));$j('#wikieditor-toolbar-reference-text').val("");},'wikieditor-toolbar-tool-reference-cancel':function(){context.fn.restoreStuffForIE();$j(this).dialog('close');}},open:function(){var context=$j(this).data('context');context.fn.restoreStuffForIE();context.fn.saveStuffForIE();var selection=context.$textarea.textSelection('getSelection');$j('#wikieditor-toolbar-reference-text').focus();$j('#wikieditor-toolbar-reference-dialog').data('whitespace',['','']).data('attributes','');if(selection!=''){var matches,text;if((matches=selection.match(/^(\s*)<ref([^\>]*)>([^\<]*)<\/ref\>(\s*)$/))){text=matches[3];$j('#wikieditor-toolbar-reference-dialog').data('whitespace',[matches[1],matches[4]]);$j('#wikieditor-toolbar-reference-dialog').data('attributes',matches[2]);}else{text=selection;}
 88+ </div>',init:function(){$j(this).find('[rel]').each(function(){$j(this).text(mw.usability.getMsg($j(this).attr('rel')));});},dialog:{dialogClass:'wikiEditor-toolbar-dialog',width:590,buttons:{'wikieditor-toolbar-tool-reference-insert':function(){var insertText=$j('#wikieditor-toolbar-reference-text').val();var whitespace=$j('#wikieditor-toolbar-reference-dialog').data('whitespace');var attributes=$j('#wikieditor-toolbar-reference-dialog').data('attributes');$j(this).dialog('close');$j.wikiEditor.modules.toolbar.fn.doAction($j(this).data('context'),{type:'replace',options:{pre:whitespace[0]+'<ref'+attributes+'>',peri:insertText,post:'</ref>'+whitespace[1]}},$j(this));$j('#wikieditor-toolbar-reference-text').val("");},'wikieditor-toolbar-tool-reference-cancel':function(){var context=$j(this).data('context');context.fn.restoreStuffForIE();$j(this).dialog('close');}},open:function(){var context=$j(this).data('context');context.fn.restoreStuffForIE();context.fn.saveStuffForIE();var selection=context.$textarea.textSelection('getSelection');$j('#wikieditor-toolbar-reference-text').focus();$j('#wikieditor-toolbar-reference-dialog').data('whitespace',['','']).data('attributes','');if(selection!=''){var matches,text;if((matches=selection.match(/^(\s*)<ref([^\>]*)>([^\<]*)<\/ref\>(\s*)$/))){text=matches[3];$j('#wikieditor-toolbar-reference-dialog').data('whitespace',[matches[1],matches[4]]);$j('#wikieditor-toolbar-reference-dialog').data('attributes',matches[2]);}else{text=selection;}
8989 $j('#wikieditor-toolbar-reference-text').val(text);}
9090 if(!($j(this).data('dialogkeypressset'))){$j(this).data('dialogkeypressset',true);$j(this).closest('.ui-dialog').keypress(function(e){if((e.keyCode||e.which)==13){var button=$j(this).data('dialogaction')||$j(this).find('button:first');button.click();e.preventDefault();}});$j(this).closest('.ui-dialog').find('button').focus(function(){$j(this).closest('.ui-dialog').data('dialogaction',this);});}}}},'insert-table':{filters:['#wpTextbox1.toolbar-dialogs'],titleMsg:'wikieditor-toolbar-tool-table-title',id:'wikieditor-toolbar-table-dialog',html:'\
9191 <div class="wikieditor-toolbar-dialog-wrapper">\
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js
@@ -1512,6 +1512,7 @@
15131513 },
15141514 'wikieditor-toolbar-tool-reference-cancel': function() {
15151515 // Clear any saved selection state
 1516+ var context = $j( this ).data( 'context' );
15161517 context.fn.restoreStuffForIE();
15171518 $j( this ).dialog( 'close' );
15181519 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r66286UsabilityInitiative: (bug 23485) (bug 23061) Selection not getting picked up ...catrope19:40, 12 May 2010

Status & tagging log