r59185 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59184‎ | r59185 | r59186 >
Date:23:01, 17 November 2009
Author:catrope
Status:ok (Comments)
Tags:
Comment:
acaifix: Some IE fixes. This should fix bug 21492, bug 21220, bug 21248 and bug 21246
Modified paths:
  • /branches/usability/acaifix/EditToolbar/EditToolbar.js (modified) (history)
  • /branches/usability/acaifix/EditToolbar/EditToolbar.php (modified) (history)
  • /branches/usability/acaifix/UsabilityInitiative.hooks.php (modified) (history)
  • /branches/usability/acaifix/js/plugins.combined.js (modified) (history)
  • /branches/usability/acaifix/js/plugins.combined.min.js (modified) (history)
  • /branches/usability/acaifix/js/plugins/jquery.textSelection.js (modified) (history)
  • /branches/usability/acaifix/js/plugins/jquery.wikiEditor.js (modified) (history)

Diff [purge]

Index: branches/usability/acaifix/UsabilityInitiative.hooks.php
@@ -65,17 +65,17 @@
6666 array( 'src' => 'js/plugins/jquery.delayedBind.js', 'version' => 1 ),
6767 array( 'src' => 'js/plugins/jquery.namespaceSelect.js', 'version' => 1 ),
6868 array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 6 ),
69 - array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 17 ),
70 - array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 12 ),
 69+ array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 18 ),
 70+ array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 13 ),
7171 array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 22 ),
7272 array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 8 ),
7373 array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 27 ),
7474 ),
7575 'combined' => array(
76 - array( 'src' => 'js/plugins.combined.js', 'version' => 64 ),
 76+ array( 'src' => 'js/plugins.combined.js', 'version' => 65 ),
7777 ),
7878 'minified' => array(
79 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 64 ),
 79+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 65 ),
8080 ),
8181 ),
8282 );
Index: branches/usability/acaifix/EditToolbar/EditToolbar.js
@@ -1043,11 +1043,11 @@
10441044 }
10451045 },
10461046 open: function() {
 1047+ // Pre-fill the text fields based on the current selection
 1048+ var selection = $j(this).data( 'context' ).$textarea.focus().getSelection();
10471049 $j( '#edittoolbar-link-int-target, #edittoolbar-link-ext-target' )
10481050 .filter( ':visible' )
10491051 .focus();
1050 - // Pre-fill the text fields based on the current selection
1051 - var selection = $j(this).data( 'context' ).$textarea.getSelection();
10521052 $j( '#edittoolbar-link-dialog-tab-int' ).data( 'whitespace', [ '', '' ] );
10531053 $j( '#edittoolbar-link-dialog-tab-ext' ).data( 'whitespace', [ '', '' ] );
10541054 if ( selection != '' ) {
Index: branches/usability/acaifix/EditToolbar/EditToolbar.php
@@ -19,7 +19,7 @@
2020 /* Configuration */
2121
2222 // Bump the version number every time you change any of the .css/.js files
23 -$wgEditToolbarStyleVersion = 75;
 23+$wgEditToolbarStyleVersion = 76;
2424
2525 // Set this to true to simply override the stock toolbar for everyone
2626 $wgEditToolbarGlobalEnable = false;
Index: branches/usability/acaifix/js/plugins/jquery.textSelection.js
@@ -51,13 +51,12 @@
5252 post += ' ';
5353 }
5454 }
55 - var selText = $(this).getSelection();
 55+ var selText = $(this).focus().getSelection();
5656 var isSample = false;
5757 if ( this.style.display == 'none' ) {
5858 // Do nothing
5959 } else if ( this.selectionStart || this.selectionStart == '0' ) {
6060 // Mozilla/Opera
61 - $(this).focus();
6261 var startPos = this.selectionStart;
6362 var endPos = this.selectionEnd;
6463 checkSelectedText();
@@ -82,9 +81,10 @@
8382 this.selectionStart = startPos + pre.length + selText.length + post.length;
8483 this.selectionEnd = this.selectionStart;
8584 }
 85+ // Scroll the textarea to the inserted text
 86+ $(this).scrollToCaretPosition();
8687 } else if ( document.selection && document.selection.createRange ) {
8788 // IE
88 - $(this).focus();
8989 var range = document.selection.createRange();
9090 if ( ownline && range.moveStart ) {
9191 var range2 = document.selection.createRange();
@@ -109,8 +109,6 @@
110110 }
111111 range.select();
112112 }
113 - // Scroll the textarea to the inserted text
114 - $(this).scrollToCaretPosition();
115113 $(this).trigger( 'encapsulateSelection', [ pre, peri, post, ownline, replace ] );
116114 });
117115 },
@@ -123,11 +121,18 @@
124122 * Get the position (in resolution of bytes not nessecarily characters)
125123 * in a textarea
126124 */
127 - getCaretPosition: function( startAndEnd ) {
 125+ getCaretPosition: function( startAndEnd, restoreFocus ) {
128126 function getCaret( e ) {
129127 var caretPos = 0, endPos = 0;
130128 if ( $.browser.msie ) {
131129 // IE Support
 130+ // Focus the textarea for this
 131+ // If another element currently has focus, restore it
 132+ var oldFocus = false;
 133+ if ( restoreFocus )
 134+ oldFocus = document.selection.createRange().parentElement;
 135+ e.focus();
 136+
132137 var postFinished = false;
133138 var periFinished = false;
134139 var postFinished = false;
@@ -196,6 +201,9 @@
197202 } while ( ( !postFinished || !periFinished || !postFinished ) );
198203 caretPos = rawPreText.replace( /\r\n/g, "\n" ).length;
199204 endPos = caretPos + rawPeriText.replace( /\r\n/g, "\n" ).length;
 205+ // Restore focus
 206+ if ( oldFocus && oldFocus.focus )
 207+ oldFocus.focus();
200208 } else if ( e.selectionStart || e.selectionStart == '0' ) {
201209 // Firefox support
202210 caretPos = e.selectionStart;
@@ -224,8 +232,12 @@
225233 var selection = document.body.createTextRange();
226234 selection.moveToElementText( this );
227235 var length = selection.text.length;
 236+ if ( start > length || end > length )
 237+ // Faulty data, ignore
 238+ return;
 239+ selection.collapse();
 240+ selection.moveEnd( 'character', end );
228241 selection.moveStart( 'character', start );
229 - selection.moveEnd( 'character', -length + end );
230242 selection.select();
231243 }
232244 });
@@ -321,4 +333,4 @@
322334 } );
323335 }
324336
325 -} ); } )( jQuery );
\ No newline at end of file
 337+} ); } )( jQuery );
Index: branches/usability/acaifix/js/plugins/jquery.wikiEditor.js
@@ -171,7 +171,9 @@
172172 $(this).data( 'wikiEditor-cursor', false );
173173 })
174174 .blur( function() {
175 - $(this).data( 'wikiEditor-cursor', $(this).getCaretPosition( true ) );
 175+ var pos = $(this).data( 'wikiEditor-cursor' );
 176+ if ( !$(this).data( 'wikiEditor-cursor' ) )
 177+ $(this).data( 'wikiEditor-cursor', $(this).getCaretPosition( true, true ) );
176178 });
177179
178180 // Create a set of standard methods for internal and external use
@@ -237,4 +239,4 @@
238240 // Store the context for next time, and support chaining
239241 return $(this).data( 'wikiEditor-context', context );
240242
241 -};})(jQuery);
\ No newline at end of file
 243+};})(jQuery);
Index: branches/usability/acaifix/js/plugins.combined.js
@@ -879,13 +879,12 @@
880880 post += ' ';
881881 }
882882 }
883 - var selText = $(this).getSelection();
 883+ var selText = $(this).focus().getSelection();
884884 var isSample = false;
885885 if ( this.style.display == 'none' ) {
886886 // Do nothing
887887 } else if ( this.selectionStart || this.selectionStart == '0' ) {
888888 // Mozilla/Opera
889 - $(this).focus();
890889 var startPos = this.selectionStart;
891890 var endPos = this.selectionEnd;
892891 checkSelectedText();
@@ -910,9 +909,10 @@
911910 this.selectionStart = startPos + pre.length + selText.length + post.length;
912911 this.selectionEnd = this.selectionStart;
913912 }
 913+ // Scroll the textarea to the inserted text
 914+ $(this).scrollToCaretPosition();
914915 } else if ( document.selection && document.selection.createRange ) {
915916 // IE
916 - $(this).focus();
917917 var range = document.selection.createRange();
918918 if ( ownline && range.moveStart ) {
919919 var range2 = document.selection.createRange();
@@ -937,8 +937,6 @@
938938 }
939939 range.select();
940940 }
941 - // Scroll the textarea to the inserted text
942 - $(this).scrollToCaretPosition();
943941 $(this).trigger( 'encapsulateSelection', [ pre, peri, post, ownline, replace ] );
944942 });
945943 },
@@ -951,11 +949,18 @@
952950 * Get the position (in resolution of bytes not nessecarily characters)
953951 * in a textarea
954952 */
955 - getCaretPosition: function( startAndEnd ) {
 953+ getCaretPosition: function( startAndEnd, restoreFocus ) {
956954 function getCaret( e ) {
957955 var caretPos = 0, endPos = 0;
958956 if ( $.browser.msie ) {
959957 // IE Support
 958+ // Focus the textarea for this
 959+ // If another element currently has focus, restore it
 960+ var oldFocus = false;
 961+ if ( restoreFocus )
 962+ oldFocus = document.selection.createRange().parentElement;
 963+ e.focus();
 964+
960965 var postFinished = false;
961966 var periFinished = false;
962967 var postFinished = false;
@@ -1024,6 +1029,9 @@
10251030 } while ( ( !postFinished || !periFinished || !postFinished ) );
10261031 caretPos = rawPreText.replace( /\r\n/g, "\n" ).length;
10271032 endPos = caretPos + rawPeriText.replace( /\r\n/g, "\n" ).length;
 1033+ // Restore focus
 1034+ if ( oldFocus && oldFocus.focus )
 1035+ oldFocus.focus();
10281036 } else if ( e.selectionStart || e.selectionStart == '0' ) {
10291037 // Firefox support
10301038 caretPos = e.selectionStart;
@@ -1052,8 +1060,12 @@
10531061 var selection = document.body.createTextRange();
10541062 selection.moveToElementText( this );
10551063 var length = selection.text.length;
 1064+ if ( start > length || end > length )
 1065+ // Faulty data, ignore
 1066+ return;
 1067+ selection.collapse();
 1068+ selection.moveEnd( 'character', end );
10561069 selection.moveStart( 'character', start );
1057 - selection.moveEnd( 'character', -length + end );
10581070 selection.select();
10591071 }
10601072 });
@@ -1149,7 +1161,8 @@
11501162 } );
11511163 }
11521164
1153 -} ); } )( jQuery );/**
 1165+} ); } )( jQuery );
 1166+/**
11541167 * This plugin provides a way to build a user interface around a textarea. You
11551168 * can build the UI from a confguration..
11561169 * $j( 'div#edittoolbar' ).wikiEditor(
@@ -1322,7 +1335,9 @@
13231336 $(this).data( 'wikiEditor-cursor', false );
13241337 })
13251338 .blur( function() {
1326 - $(this).data( 'wikiEditor-cursor', $(this).getCaretPosition( true ) );
 1339+ var pos = $(this).data( 'wikiEditor-cursor' );
 1340+ if ( !$(this).data( 'wikiEditor-cursor' ) )
 1341+ $(this).data( 'wikiEditor-cursor', $(this).getCaretPosition( true, true ) );
13271342 });
13281343
13291344 // Create a set of standard methods for internal and external use
@@ -1388,7 +1403,8 @@
13891404 // Store the context for next time, and support chaining
13901405 return $(this).data( 'wikiEditor-context', context );
13911406
1392 -};})(jQuery);/**
 1407+};})(jQuery);
 1408+/**
13931409 * Extend the RegExp object with an escaping function
13941410 * From http://simonwillison.net/2006/Jan/20/escape/
13951411 */
Index: branches/usability/acaifix/js/plugins.combined.min.js
@@ -52,22 +52,26 @@
5353 context.data.$container.hide();$.suggestions.cancel(context);});}
5454 $(this).data('suggestions-context',context);});return returnValue!==null?returnValue:$(this);};})(jQuery);(function($){$.fn.extend({getSelection:function(){var e=this.jquery?this[0]:this;var retval='';if(e.style.display=='none'){}else if(document.selection&&document.selection.createRange){e.focus();var range=document.selection.createRange();retval=range.text;}else if(e.selectionStart||e.selectionStart=='0'){retval=e.value.substring(e.selectionStart,e.selectionEnd);}
5555 return retval;},encapsulateSelection:function(pre,peri,post,ownline,replace){return this.each(function(){function checkSelectedText(){if(!selText){selText=peri;isSample=true;}else if(replace){selText=peri;}else if(selText.charAt(selText.length-1)==' '){selText=selText.substring(0,selText.length-1);post+=' ';}}
56 -var selText=$(this).getSelection();var isSample=false;if(this.style.display=='none'){}else if(this.selectionStart||this.selectionStart=='0'){$(this).focus();var startPos=this.selectionStart;var endPos=this.selectionEnd;checkSelectedText();if(ownline){if(startPos!=0&&this.value.charAt(startPos-1)!="\n"){pre="\n"+pre;}
 56+var selText=$(this).focus().getSelection();var isSample=false;if(this.style.display=='none'){}else if(this.selectionStart||this.selectionStart=='0'){var startPos=this.selectionStart;var endPos=this.selectionEnd;checkSelectedText();if(ownline){if(startPos!=0&&this.value.charAt(startPos-1)!="\n"){pre="\n"+pre;}
5757 if(this.value.charAt(endPos)!="\n"){post+="\n";}}
5858 this.value=this.value.substring(0,startPos)+pre+selText+post+this.value.substring(endPos,this.value.length);if(window.opera){pre=pre.replace(/\r?\n/g,"\r\n");selText=selText.replace(/\r?\n/g,"\r\n");post=post.replace(/\r?\n/g,"\r\n");}
59 -if(isSample){this.selectionStart=startPos+pre.length;this.selectionEnd=startPos+pre.length+selText.length;}else{this.selectionStart=startPos+pre.length+selText.length+post.length;this.selectionEnd=this.selectionStart;}}else if(document.selection&&document.selection.createRange){$(this).focus();var range=document.selection.createRange();if(ownline&&range.moveStart){var range2=document.selection.createRange();range2.collapse();range2.moveStart('character',-1);if(range2.text!="\r"&&range2.text!="\n"&&range2.text!=""){pre="\n"+pre;}
 59+if(isSample){this.selectionStart=startPos+pre.length;this.selectionEnd=startPos+pre.length+selText.length;}else{this.selectionStart=startPos+pre.length+selText.length+post.length;this.selectionEnd=this.selectionStart;}
 60+$(this).scrollToCaretPosition();}else if(document.selection&&document.selection.createRange){var range=document.selection.createRange();if(ownline&&range.moveStart){var range2=document.selection.createRange();range2.collapse();range2.moveStart('character',-1);if(range2.text!="\r"&&range2.text!="\n"&&range2.text!=""){pre="\n"+pre;}
6061 var range3=document.selection.createRange();range3.collapse(false);range3.moveEnd('character',1);if(range3.text!="\r"&&range3.text!="\n"&&range3.text!=""){post+="\n";}}
6162 checkSelectedText();range.text=pre+selText+post;if(isSample&&range.moveStart){range.moveStart('character',-post.length-selText.length);range.moveEnd('character',-post.length);}
6263 range.select();}
63 -$(this).scrollToCaretPosition();$(this).trigger('encapsulateSelection',[pre,peri,post,ownline,replace]);});},getCaretPosition:function(startAndEnd){function getCaret(e){var caretPos=0,endPos=0;if($.browser.msie){var postFinished=false;var periFinished=false;var postFinished=false;var preText,rawPreText,periText;var rawPeriText,postText,rawPostText;var periRange=document.selection.createRange().duplicate();var preRange=document.body.createTextRange();preRange.moveToElementText(e);preRange.setEndPoint("EndToStart",periRange);var postRange=document.body.createTextRange();postRange.moveToElementText(e);postRange.setEndPoint("StartToEnd",periRange);preText=rawPreText=preRange.text;periText=rawPeriText=periRange.text;postText=rawPostText=postRange.text;do{if(!postFinished){if(preRange.compareEndPoints("StartToEnd",preRange)==0){postFinished=true;}else{preRange.moveEnd("character",-1)
 64+$(this).trigger('encapsulateSelection',[pre,peri,post,ownline,replace]);});},getCaretPosition:function(startAndEnd,restoreFocus){function getCaret(e){var caretPos=0,endPos=0;if($.browser.msie){var oldFocus=false;if(restoreFocus)
 65+oldFocus=document.selection.createRange().parentElement;e.focus();var postFinished=false;var periFinished=false;var postFinished=false;var preText,rawPreText,periText;var rawPeriText,postText,rawPostText;var periRange=document.selection.createRange().duplicate();var preRange=document.body.createTextRange();preRange.moveToElementText(e);preRange.setEndPoint("EndToStart",periRange);var postRange=document.body.createTextRange();postRange.moveToElementText(e);postRange.setEndPoint("StartToEnd",periRange);preText=rawPreText=preRange.text;periText=rawPeriText=periRange.text;postText=rawPostText=postRange.text;do{if(!postFinished){if(preRange.compareEndPoints("StartToEnd",preRange)==0){postFinished=true;}else{preRange.moveEnd("character",-1)
6466 if(preRange.text==preText){rawPreText+="\r\n";}else{postFinished=true;}}}
6567 if(!periFinished){if(periRange.compareEndPoints("StartToEnd",periRange)==0){periFinished=true;}else{periRange.moveEnd("character",-1)
6668 if(periRange.text==periText){rawPeriText+="\r\n";}else{periFinished=true;}}}
6769 if(!postFinished){if(postRange.compareEndPoints("StartToEnd",postRange)==0){postFinished=true;}else{postRange.moveEnd("character",-1)
68 -if(postRange.text==postText){rawPostText+="\r\n";}else{postFinished=true;}}}}while((!postFinished||!periFinished||!postFinished));caretPos=rawPreText.replace(/\r\n/g,"\n").length;endPos=caretPos+rawPeriText.replace(/\r\n/g,"\n").length;}else if(e.selectionStart||e.selectionStart=='0'){caretPos=e.selectionStart;endPos=e.selectionEnd;}
 70+if(postRange.text==postText){rawPostText+="\r\n";}else{postFinished=true;}}}}while((!postFinished||!periFinished||!postFinished));caretPos=rawPreText.replace(/\r\n/g,"\n").length;endPos=caretPos+rawPeriText.replace(/\r\n/g,"\n").length;if(oldFocus&&oldFocus.focus)
 71+oldFocus.focus();}else if(e.selectionStart||e.selectionStart=='0'){caretPos=e.selectionStart;endPos=e.selectionEnd;}
6972 return startAndEnd?[caretPos,endPos]:caretPos;}
7073 return getCaret(this.get(0));},setSelection:function(start,end){if(typeof end=='undefined')
71 -end=start;return this.each(function(){if(this.selectionStart||this.selectionStart=='0'){if(start>this.selectionEnd){this.selectionEnd=end;this.selectionStart=start;}else{this.selectionStart=start;this.selectionEnd=end;}}else if(document.body.createTextRange){var selection=document.body.createTextRange();selection.moveToElementText(this);var length=selection.text.length;selection.moveStart('character',start);selection.moveEnd('character',-length+end);selection.select();}});},scrollToCaretPosition:function(force){function getLineLength(e){return Math.floor(e.scrollWidth/($.os.name=='linux'?7:8));}
 74+end=start;return this.each(function(){if(this.selectionStart||this.selectionStart=='0'){if(start>this.selectionEnd){this.selectionEnd=end;this.selectionStart=start;}else{this.selectionStart=start;this.selectionEnd=end;}}else if(document.body.createTextRange){var selection=document.body.createTextRange();selection.moveToElementText(this);var length=selection.text.length;if(start>length||end>length)
 75+return;selection.collapse();selection.moveEnd('character',end);selection.moveStart('character',start);selection.select();}});},scrollToCaretPosition:function(force){function getLineLength(e){return Math.floor(e.scrollWidth/($.os.name=='linux'?7:8));}
7276 function getCaretScrollPosition(e){var text=e.value.replace(/\r/g,"");var caret=$(e).getCaretPosition();var lineLength=getLineLength(e);var row=0;var charInLine=0;var lastSpaceInLine=0;for(i=0;i<caret;i++){charInLine++;if(text.charAt(i)==" "){lastSpaceInLine=charInLine;}else if(text.charAt(i)=="\n"){lastSpaceInLine=0;charInLine=0;row++;}
7377 if(charInLine>lineLength){if(lastSpaceInLine>0){charInLine=charInLine-lastSpaceInLine;lastSpaceInLine=0;row++;}}}
7478 var nextSpace=0;for(j=caret;j<caret+lineLength;j++){if(text.charAt(j)==" "||text.charAt(j)=="\n"||caret==text.length){nextSpace=j;break;}}
@@ -84,7 +88,8 @@
8589 $.isOperaBroken=true;div.remove();}
8690 if($.isOperaBroken)
8791 s=s.replace(/\n/g,"\r\n");return s;};$.fn.wikiEditor=function(){var context=$(this).data('wikiEditor-context');if(typeof context=='undefined'){var instance=$.wikiEditor.instances.length;context={'$textarea':$(this),'modules':{},'data':{},'instance':instance};$.wikiEditor.instances[instance]=$(this);$(this).wrap($('<div></div>').addClass('wikiEditor-ui').attr('id','wikiEditor-ui')).wrap($('<div></div>').addClass('wikiEditor-ui-bottom').attr('id','wikiEditor-ui-bottom')).wrap($('<div></div>').addClass('wikiEditor-ui-text').attr('id','wikiEditor-ui-text'));context.$ui=$(this).parent().parent().parent();context.$ui.after($('<div style="clear:both;"></div>'));context.$ui.prepend($('<div></div>').addClass('wikiEditor-ui-top').attr('id','wikiEditor-ui-top'));$(this).focus(function(){var pos=$(this).data('wikiEditor-cursor');if(pos)
88 -$(this).setSelection(pos[0],pos[1]);$(this).data('wikiEditor-cursor',false);}).blur(function(){$(this).data('wikiEditor-cursor',$(this).getCaretPosition(true));});context.api={addModule:function(context,data){function callModuleApi(module,call,data){if(module in $.wikiEditor.modules&&'fn'in $.wikiEditor.modules[module]&&call in $.wikiEditor.modules[module].fn){$.wikiEditor.modules[module].fn[call](context,data);}}
 92+$(this).setSelection(pos[0],pos[1]);$(this).data('wikiEditor-cursor',false);}).blur(function(){var pos=$(this).data('wikiEditor-cursor');if(!$(this).data('wikiEditor-cursor'))
 93+$(this).data('wikiEditor-cursor',$(this).getCaretPosition(true,true));});context.api={addModule:function(context,data){function callModuleApi(module,call,data){if(module in $.wikiEditor.modules&&'fn'in $.wikiEditor.modules[module]&&call in $.wikiEditor.modules[module].fn){$.wikiEditor.modules[module].fn[call](context,data);}}
8994 if(typeof data=='string'){callModuleApi(data,'create',{});}else if(typeof data=='object'){for(module in data){if(typeof module=='string'){callModuleApi(module,'create',data[module]);}}}}};for(module in $.wikiEditor.modules){if('api'in $.wikiEditor.modules[module]){for(call in $.wikiEditor.modules[module].api){if(!(call in context.api)){context.api[call]=$.wikiEditor.modules[module].api[call];}}}}}
9095 if(arguments.length>0&&typeof arguments[0]=='object'){context.api.addModule(context,arguments[0]);}else{arguments=$.makeArray(arguments);if(arguments.length>0){var call=arguments.shift();if(call in context.api){context.api[call](context,arguments[0]==undefined?{}:arguments[0]);}}}
9196 return $(this).data('wikiEditor-context',context);};})(jQuery);RegExp.escape=function(s){return s.replace(/([.*+?^${}()|\/\\[\]])/g,'\\$1');};(function($){$.wikiEditor.modules.dialogs={api:{addDialog:function(context,data){$.wikiEditor.modules.dialogs.fn.create(context,{'modules':data})},openDialog:function(context,data){if(data.dialog in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[data.dialog].id).dialog('open');}},closeDialog:function(context,data){if(data.dialog in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[data.dialog].id).dialog('close');}}},fn:{create:function(context,config){for(module in config){$.wikiEditor.modules.dialogs.modules[module]=config[module];}

Follow-up revisions

RevisionCommit summaryAuthorDate
r59204wmf-deployment: Merging usability changes from trunk...catrope18:53, 18 November 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r58425EditToolbar: (bug 21220) Selected value not copied to page title field in IE/...catrope11:36, 2 November 2009

Comments

#Comment by Tim Starling (talk | contribs)   04:09, 18 November 2009

Is it tested?

#Comment by Catrope (talk | contribs)   11:08, 18 November 2009

Yes, I had Andrew and Adam test it.

#Comment by Shuhari (talk | contribs)   18:48, 18 November 2009

This revision was reviewed by Werdna at 6:44pm UTC on November 18th before production deployment.

Status & tagging log