Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -16,14 +16,14 @@ |
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' => 47 ), |
| 20 | + array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 48 ), |
21 | 21 | array( 'src' => 'Modules/TemplateEditor/TemplateEditor.js', 'version' => 4 ), |
22 | 22 | ), |
23 | 23 | 'combined' => array( |
24 | | - array( 'src' => 'WikiEditor.combined.js', 'version' => 49 ), |
| 24 | + array( 'src' => 'WikiEditor.combined.js', 'version' => 50 ), |
25 | 25 | ), |
26 | 26 | 'minified' => array( |
27 | | - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 49 ), |
| 27 | + array( 'src' => 'WikiEditor.combined.min.js', 'version' => 50 ), |
28 | 28 | ), |
29 | 29 | ); |
30 | 30 | static $messages = array( |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js |
— | — | @@ -1303,8 +1303,8 @@ |
1304 | 1304 | // Pre-fill the text fields based on the current selection |
1305 | 1305 | var selection = $j(this).data( 'context' ).$textarea.textSelection( 'getSelection' ); |
1306 | 1306 | $j( '#wikieditor-toolbar-link-int-target' ).focus(); |
1307 | | - // Hide any status indicators that may be visible |
1308 | | - $j( '#wikieditor-toolbar-link-int-target-status > div:visible').hide(); |
| 1307 | + // Trigger the change event, so the link status indicator is up to date |
| 1308 | + $j( '#wikieditor-toolbar-link-int-target' ).change(); |
1309 | 1309 | $j( '#wikieditor-toolbar-link-dialog' ).data( 'whitespace', [ '', '' ] ); |
1310 | 1310 | if ( selection != '' ) { |
1311 | 1311 | var target, text, type; |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js |
— | — | @@ -67,7 +67,7 @@ |
68 | 68 | insertText=escTarget;else if(text=='') |
69 | 69 | insertText='['+escTarget+']';else |
70 | 70 | insertText='['+escTarget+' '+escText+']';} |
71 | | -if(whitespace)insertText=whitespace[0]+insertText+whitespace[1];$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','');$j(this).dialog('close');},'wikieditor-toolbar-tool-link-cancel':function(){$j(this).dialog('close');}},open:function(){$j(this).data('articlePathRegex',new RegExp('^'+RegExp.escape(wgServer+wgArticlePath).replace(/\\\$1/g,'(.*)')+'$'));var selection=$j(this).data('context').$textarea.textSelection('getSelection');$j('#wikieditor-toolbar-link-int-target').focus();$j('#wikieditor-toolbar-link-int-target-status > div:visible').hide();$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;} |
| 71 | +if(whitespace)insertText=whitespace[0]+insertText+whitespace[1];$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','');$j(this).dialog('close');},'wikieditor-toolbar-tool-link-cancel':function(){$j(this).dialog('close');}},open:function(){$j(this).data('articlePathRegex',new RegExp('^'+RegExp.escape(wgServer+wgArticlePath).replace(/\\\$1/g,'(.*)')+'$'));var selection=$j(this).data('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 | 72 | if(typeof text!='undefined') |
73 | 73 | $j('#wikieditor-toolbar-link-int-text').val(text).change();if(typeof target!='undefined') |
74 | 74 | $j('#wikieditor-toolbar-link-int-target').val(target).change();if(typeof type!='undefined') |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js |
— | — | @@ -1254,8 +1254,8 @@ |
1255 | 1255 | // Pre-fill the text fields based on the current selection |
1256 | 1256 | var selection = $j(this).data( 'context' ).$textarea.textSelection( 'getSelection' ); |
1257 | 1257 | $j( '#wikieditor-toolbar-link-int-target' ).focus(); |
1258 | | - // Hide any status indicators that may be visible |
1259 | | - $j( '#wikieditor-toolbar-link-int-target-status > div:visible').hide(); |
| 1258 | + // Trigger the change event, so the link status indicator is up to date |
| 1259 | + $j( '#wikieditor-toolbar-link-int-target' ).change(); |
1260 | 1260 | $j( '#wikieditor-toolbar-link-dialog' ).data( 'whitespace', [ '', '' ] ); |
1261 | 1261 | if ( selection != '' ) { |
1262 | 1262 | var target, text, type; |