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' => 86 ), |
| 20 | + array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 87 ), |
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' => 91 ), |
| 26 | + array( 'src' => 'WikiEditor.combined.js', 'version' => 92 ), |
27 | 27 | ), |
28 | 28 | 'minified' => array( |
29 | | - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 91 ), |
| 29 | + array( 'src' => 'WikiEditor.combined.min.js', 'version' => 92 ), |
30 | 30 | ), |
31 | 31 | ); |
32 | 32 | static $messages = array( |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js |
— | — | @@ -1425,6 +1425,7 @@ |
1426 | 1426 | }, |
1427 | 1427 | 'wikieditor-toolbar-tool-link-cancel': function() { |
1428 | 1428 | // Clear any saved selection state |
| 1429 | + var context = $j(this).data( 'context' ); |
1429 | 1430 | context.fn.restoreStuffForIE(); |
1430 | 1431 | $j(this).dialog( 'close' ); |
1431 | 1432 | } |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js |
— | — | @@ -68,7 +68,7 @@ |
69 | 69 | insertText=escTarget;else if(text=='') |
70 | 70 | insertText='['+escTarget+']';else |
71 | 71 | insertText='['+escTarget+' '+escText+']';} |
72 | | -if(whitespace)insertText=whitespace[0]+insertText+whitespace[1];$j(this).dialog('close');$j.wikiEditor.modules.toolbar.fn.doAction($j(this).data('context'),{type:'replace',options:{pre:insertText}},$j(this));$j('#wikieditor-toolbar-link-int-target, #wikieditor-toolbar-link-int-text').val('');$j('#wikieditor-toolbar-link-type-int, #wikieditor-toolbar-link-type-ext').attr('checked','');},'wikieditor-toolbar-tool-link-cancel':function(){context.fn.restoreStuffForIE();$j(this).dialog('close');}},open:function(){$j(this).data('articlePathRegex',new RegExp('^'+RegExp.escape(wgServer+wgArticlePath).replace(/\\\$1/g,'(.*)')+'$'));var context=$j(this).data('context');context.fn.restoreStuffForIE();context.fn.saveStuffForIE();var selection=context.$textarea.textSelection('getSelection');$j('#wikieditor-toolbar-link-int-target').focus();$j('#wikieditor-toolbar-link-int-target').change();$j('#wikieditor-toolbar-link-dialog').data('whitespace',['','']);if(selection!=''){var target,text,type;var matches;if((matches=selection.match(/^(\s*)\[\[([^\]\|]+)(\|([^\]\|]*))?\]\](\s*)$/))){target=matches[2];text=(matches[4]?matches[4]:matches[2]);type='int';$j('#wikieditor-toolbar-link-dialog').data('whitespace',[matches[1],matches[5]]);}else if((matches=selection.match(/^(\s*)\[([^\] ]+)( ([^\]]+))?\](\s*)$/))){target=matches[2];text=(matches[4]?matches[4]:'');type='ext';$j('#wikieditor-toolbar-link-dialog').data('whitespace',[matches[1],matches[5]]);}else{target=text=selection;} |
| 72 | +if(whitespace)insertText=whitespace[0]+insertText+whitespace[1];$j(this).dialog('close');$j.wikiEditor.modules.toolbar.fn.doAction($j(this).data('context'),{type:'replace',options:{pre:insertText}},$j(this));$j('#wikieditor-toolbar-link-int-target, #wikieditor-toolbar-link-int-text').val('');$j('#wikieditor-toolbar-link-type-int, #wikieditor-toolbar-link-type-ext').attr('checked','');},'wikieditor-toolbar-tool-link-cancel':function(){var context=$j(this).data('context');context.fn.restoreStuffForIE();$j(this).dialog('close');}},open:function(){$j(this).data('articlePathRegex',new RegExp('^'+RegExp.escape(wgServer+wgArticlePath).replace(/\\\$1/g,'(.*)')+'$'));var context=$j(this).data('context');context.fn.restoreStuffForIE();context.fn.saveStuffForIE();var selection=context.$textarea.textSelection('getSelection');$j('#wikieditor-toolbar-link-int-target').focus();$j('#wikieditor-toolbar-link-int-target').change();$j('#wikieditor-toolbar-link-dialog').data('whitespace',['','']);if(selection!=''){var target,text,type;var matches;if((matches=selection.match(/^(\s*)\[\[([^\]\|]+)(\|([^\]\|]*))?\]\](\s*)$/))){target=matches[2];text=(matches[4]?matches[4]:matches[2]);type='int';$j('#wikieditor-toolbar-link-dialog').data('whitespace',[matches[1],matches[5]]);}else if((matches=selection.match(/^(\s*)\[([^\] ]+)( ([^\]]+))?\](\s*)$/))){target=matches[2];text=(matches[4]?matches[4]:'');type='ext';$j('#wikieditor-toolbar-link-dialog').data('whitespace',[matches[1],matches[5]]);}else{target=text=selection;} |
73 | 73 | if(typeof text!='undefined') |
74 | 74 | $j('#wikieditor-toolbar-link-int-text').val(text).change();if(typeof target!='undefined') |
75 | 75 | $j('#wikieditor-toolbar-link-int-target').val(target).change();if(typeof type!='undefined') |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js |
— | — | @@ -1376,6 +1376,7 @@ |
1377 | 1377 | }, |
1378 | 1378 | 'wikieditor-toolbar-tool-link-cancel': function() { |
1379 | 1379 | // Clear any saved selection state |
| 1380 | + var context = $j(this).data( 'context' ); |
1380 | 1381 | context.fn.restoreStuffForIE(); |
1381 | 1382 | $j(this).dialog( 'close' ); |
1382 | 1383 | } |