r61232 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61231‎ | r61232 | r61233 >
Date:01:56, 19 January 2010
Author:tparscal
Status:ok
Tags:
Comment:
Fixed leading new line in Safari and Chrome.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -153,7 +153,7 @@
154154 array(
155155 'src' => 'js/plugins/jquery.wikiEditor.js',
156156 'class' => 'j.wikiEditor',
157 - 'version' => 53
 157+ 'version' => 54
158158 ),
159159 array(
160160 'src' => 'js/plugins/jquery.wikiEditor.highlight.js',
@@ -191,10 +191,10 @@
192192 'version' => 1 ),
193193 ),
194194 'combined' => array(
195 - array( 'src' => 'js/plugins.combined.js', 'version' => 154 ),
 195+ array( 'src' => 'js/plugins.combined.js', 'version' => 155 ),
196196 ),
197197 'minified' => array(
198 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 154 ),
 198+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 155 ),
199199 ),
200200 ),
201201 );
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js
@@ -722,7 +722,7 @@
723723 html = html.replace( /\t/g, '<span class="wikiEditor-tab"></span>' );
724724 }
725725 // We must append, because IE will crash if we set html() - which is the same as empty() and append()
726 - context.$content.append( html.replace( /\r?\n/g, '<br />' ) );
 726+ context.$content.html( html.replace( /\r?\n/g, '<br />' ) );
727727 // Reflect direction of parent frame into child
728728 if ( $( 'body' ).is( '.rtl' ) ) {
729729 context.$content.addClass( 'rtl' ).attr( 'dir', 'rtl' );
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -7203,7 +7203,7 @@
72047204 html = html.replace( /\t/g, '<span class="wikiEditor-tab"></span>' );
72057205 }
72067206 // We must append, because IE will crash if we set html() - which is the same as empty() and append()
7207 - context.$content.append( html.replace( /\r?\n/g, '<br />' ) );
 7207+ context.$content.html( html.replace( /\r?\n/g, '<br />' ) );
72087208 // Reflect direction of parent frame into child
72097209 if ( $( 'body' ).is( '.rtl' ) ) {
72107210 context.$content.addClass( 'rtl' ).attr( 'dir', 'rtl' );
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -473,7 +473,7 @@
474474 context.$content=$(context.$iframe[0].contentWindow.document.body);var html=context.$textarea.val().replace(/\</g,'&lt;').replace(/\>/g,'&gt;');if($.browser.msie){if($.browser.versionNumber<=7){var prefix='',suffix=html;while(suffix){var match=suffix.match(/(^|\n) /);if(match){prefix+=suffix.substr(0,match.index+match[0].length-1)+'&nbsp;';suffix=suffix.substr(match.index+match[0].length);}else{break;}}
475475 html=prefix+suffix;}else{html=html.replace(/(^|\n) /g,"$1&nbsp;");}
476476 html=html.replace(/\t/g,'<span class="wikiEditor-tab"></span>');}
477 -context.$content.append(html.replace(/\r?\n/g,'<br />'));if($('body').is('.rtl')){context.$content.addClass('rtl').attr('dir','rtl');}
 477+context.$content.html(html.replace(/\r?\n/g,'<br />'));if($('body').is('.rtl')){context.$content.addClass('rtl').attr('dir','rtl');}
478478 context.$textarea.attr('disabled',true);context.$textarea.hide();context.$iframe.show();context.fn.trigger('ready');});context.$textarea.closest('form').submit(function(){context.$textarea.attr('disabled',false);context.$textarea.val(context.$textarea.textSelection('getContents'));});}
479479 arguments=$.makeArray(arguments);if(arguments.length>0){var call=arguments.shift();if(call in context.api){context.api[call](context,typeof arguments[0]=='undefined'?{}:arguments[0]);}}
480480 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,data)},openDialog:function(context,module){if(module in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[module].id).dialog('open');}},closeDialog:function(context,data){if(module in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[module].id).dialog('close');}}},fn:{create:function(context,config){for(module in config){$.wikiEditor.modules.dialogs.modules[module]=config[module];}

Status & tagging log