Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -16,16 +16,16 @@ |
17 | 17 | array( 'src' => 'Modules/Preview/Preview.js', 'version' => 6 ), |
18 | 18 | array( 'src' => 'Modules/Publish/Publish.js', 'version' => 6 ), |
19 | 19 | 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 ), |
21 | 21 | array( 'src' => 'Modules/TemplateEditor/TemplateEditor.js', 'version' => 6 ), |
22 | 22 | array( 'src' => 'Modules/Templates/Templates.js', 'version' => 1 ), |
23 | 23 | array( 'src' => 'Modules/AddMediaWizard/AddMediaWizard.js', 'version' => 6 ), |
24 | 24 | ), |
25 | 25 | 'combined' => array( |
26 | | - array( 'src' => 'WikiEditor.combined.js', 'version' => 92 ), |
| 26 | + array( 'src' => 'WikiEditor.combined.js', 'version' => 93 ), |
27 | 27 | ), |
28 | 28 | 'minified' => array( |
29 | | - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 92 ), |
| 29 | + array( 'src' => 'WikiEditor.combined.min.js', 'version' => 93 ), |
30 | 30 | ), |
31 | 31 | ); |
32 | 32 | static $messages = array( |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js |
— | — | @@ -1561,6 +1561,7 @@ |
1562 | 1562 | }, |
1563 | 1563 | 'wikieditor-toolbar-tool-reference-cancel': function() { |
1564 | 1564 | // Clear any saved selection state |
| 1565 | + var context = $j( this ).data( 'context' ); |
1565 | 1566 | context.fn.restoreStuffForIE(); |
1566 | 1567 | $j( this ).dialog( 'close' ); |
1567 | 1568 | } |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js |
— | — | @@ -84,7 +84,7 @@ |
85 | 85 | <input type="text" id="wikieditor-toolbar-reference-text" />\ |
86 | 86 | </div>\ |
87 | 87 | </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;} |
89 | 89 | $j('#wikieditor-toolbar-reference-text').val(text);} |
90 | 90 | 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:'\ |
91 | 91 | <div class="wikieditor-toolbar-dialog-wrapper">\ |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js |
— | — | @@ -1512,6 +1512,7 @@ |
1513 | 1513 | }, |
1514 | 1514 | 'wikieditor-toolbar-tool-reference-cancel': function() { |
1515 | 1515 | // Clear any saved selection state |
| 1516 | + var context = $j( this ).data( 'context' ); |
1516 | 1517 | context.fn.restoreStuffForIE(); |
1517 | 1518 | $j( this ).dialog( 'close' ); |
1518 | 1519 | } |