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' => 88 ), |
| 20 | + array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 89 ), |
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' => 93 ), |
| 26 | + array( 'src' => 'WikiEditor.combined.js', 'version' => 94 ), |
27 | 27 | ), |
28 | 28 | 'minified' => array( |
29 | | - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 93 ), |
| 29 | + array( 'src' => 'WikiEditor.combined.min.js', 'version' => 94 ), |
30 | 30 | ), |
31 | 31 | ); |
32 | 32 | static $messages = array( |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js |
— | — | @@ -2000,7 +2000,7 @@ |
2001 | 2001 | $textarea.textSelection( 'setSelection', { 'start': start, |
2002 | 2002 | 'end': mode == 'replace' ? newEnd : end } ); |
2003 | 2003 | $j( this ).data( 'offset', mode == 'replace' ? newEnd : end ); |
2004 | | - var textbox = typeof context.$iframe != 'undefined' ? context.$iframe[0].contentWindow : $textarea; |
| 2004 | + var textbox = typeof context.$iframe != 'undefined' ? context.$iframe[0].contentWindow : $textarea[0]; |
2005 | 2005 | textbox.focus(); |
2006 | 2006 | } |
2007 | 2007 | }); |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js |
— | — | @@ -189,7 +189,7 @@ |
190 | 190 | if(!match){$j('#wikieditor-toolbar-replace-nomatch').show();}else if(mode=='replaceAll'){var index;for(var i=0;i<match.length;i++){index=s.indexOf(match[i]);if(index==-1){break;} |
191 | 191 | s=s.substr(index+match[i].length);var start=index+offset;var end=start+match[i].length;var newEnd=start+replaceStr.length;$textarea.textSelection('setSelection',{'start':start,'end':end}).textSelection('encapsulateSelection',{'peri':replaceStr,'replace':true}).textSelection('setSelection',{'start':start,'end':newEnd});offset=newEnd;} |
192 | 192 | $j('#wikieditor-toolbar-replace-success').text(u.getMsg('wikieditor-toolbar-tool-replace-success',match.length)).show();$j(this).data('offset',0);}else{var start=match.index+offset;var end=start+match[0].length;var newEnd=start+replaceStr.length;var context=$j(this).data('context');$textarea.textSelection('setSelection',{'start':start,'end':end});if(mode=='replace'){$textarea.textSelection('encapsulateSelection',{'peri':replaceStr,'replace':true}).textSelection('setSelection',{'start':start,'end':newEnd});} |
193 | | -$textarea.textSelection('scrollToCaretPosition');$textarea.textSelection('setSelection',{'start':start,'end':mode=='replace'?newEnd:end});$j(this).data('offset',mode=='replace'?newEnd:end);var textbox=typeof context.$iframe!='undefined'?context.$iframe[0].contentWindow:$textarea;textbox.focus();}});},dialog:{width:500,dialogClass:'wikiEditor-toolbar-dialog',buttons:{'wikieditor-toolbar-tool-replace-button-findnext':function(e){$j(this).closest('.ui-dialog').data('dialogaction',e.target);$j(this).data('replaceCallback').call(this,'find');},'wikieditor-toolbar-tool-replace-button-replacenext':function(e){$j(this).closest('.ui-dialog').data('dialogaction',e.target);$j(this).data('replaceCallback').call(this,'replace');},'wikieditor-toolbar-tool-replace-button-replaceall':function(e){$j(this).closest('.ui-dialog').data('dialogaction',e.target);$j(this).data('replaceCallback').call(this,'replaceAll');},'wikieditor-toolbar-tool-replace-close':function(){$j(this).dialog('close');}},open:function(){$j(this).data('offset',0);$j('#wikieditor-toolbar-replace-search').focus();$j('#wikieditor-toolbar-replace-nomatch, #wikieditor-toolbar-replace-success, #wikieditor-toolbar-replace-emptysearch, #wikieditor-toolbar-replace-invalidregex').hide();if(!($j(this).data('onetimeonlystuff'))){$j(this).data('onetimeonlystuff',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);});} |
| 193 | +$textarea.textSelection('scrollToCaretPosition');$textarea.textSelection('setSelection',{'start':start,'end':mode=='replace'?newEnd:end});$j(this).data('offset',mode=='replace'?newEnd:end);var textbox=typeof context.$iframe!='undefined'?context.$iframe[0].contentWindow:$textarea[0];textbox.focus();}});},dialog:{width:500,dialogClass:'wikiEditor-toolbar-dialog',buttons:{'wikieditor-toolbar-tool-replace-button-findnext':function(e){$j(this).closest('.ui-dialog').data('dialogaction',e.target);$j(this).data('replaceCallback').call(this,'find');},'wikieditor-toolbar-tool-replace-button-replacenext':function(e){$j(this).closest('.ui-dialog').data('dialogaction',e.target);$j(this).data('replaceCallback').call(this,'replace');},'wikieditor-toolbar-tool-replace-button-replaceall':function(e){$j(this).closest('.ui-dialog').data('dialogaction',e.target);$j(this).data('replaceCallback').call(this,'replaceAll');},'wikieditor-toolbar-tool-replace-close':function(){$j(this).dialog('close');}},open:function(){$j(this).data('offset',0);$j('#wikieditor-toolbar-replace-search').focus();$j('#wikieditor-toolbar-replace-nomatch, #wikieditor-toolbar-replace-success, #wikieditor-toolbar-replace-emptysearch, #wikieditor-toolbar-replace-invalidregex').hide();if(!($j(this).data('onetimeonlystuff'))){$j(this).data('onetimeonlystuff',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);});} |
194 | 194 | var dialog=$j(this).closest('.ui-dialog');var that=this;var context=$j(this).data('context');var textbox=typeof context.$iframe!='undefined'?context.$iframe[0].contentWindow.document:context.$textarea;$j(textbox).bind('keypress.srdialog',function(e){if((e.keyCode||e.which)==13){var button=dialog.data('dialogaction')||dialog.find('button:first');button.click();e.preventDefault();}else if((e.keyCode||e.which)==27){$j(that).dialog('close');}});},close:function(){var context=$j(this).data('context');var textbox=typeof context.$iframe!='undefined'?context.$iframe[0].contentWindow.document:context.$textarea;$j(textbox).unbind('keypress.srdialog');$j(this).closest('.ui-dialog').data('dialogaction',false);}}}}});}});$j(document).ready(function(){if(!wgWikiEditorEnabledModules.templateEditor){return true;} |
195 | 195 | if(wgNamespaceNumber==10){return true;} |
196 | 196 | if($j.fn.wikiEditor){$j('textarea#wpTextbox1').wikiEditor('addModule','templateEditor');}});if(wgWikiEditorEnabledModules.addMediaWizard){if(typeof mwAddMediaConfig=='undefined'){mwAddMediaConfig={};} |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js |
— | — | @@ -1951,7 +1951,7 @@ |
1952 | 1952 | $textarea.textSelection( 'setSelection', { 'start': start, |
1953 | 1953 | 'end': mode == 'replace' ? newEnd : end } ); |
1954 | 1954 | $j( this ).data( 'offset', mode == 'replace' ? newEnd : end ); |
1955 | | - var textbox = typeof context.$iframe != 'undefined' ? context.$iframe[0].contentWindow : $textarea; |
| 1955 | + var textbox = typeof context.$iframe != 'undefined' ? context.$iframe[0].contentWindow : $textarea[0]; |
1956 | 1956 | textbox.focus(); |
1957 | 1957 | } |
1958 | 1958 | }); |