r72985 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72984‎ | r72985 | r72986 >
Date:15:58, 14 September 2010
Author:nikerabbit
Status:ok
Tags:
Comment:
Avoid creating identical nested divs
Modified paths:
  • /trunk/extensions/Translate/js/quickedit.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/js/quickedit.js
@@ -85,14 +85,13 @@
8686
8787 var textarea = form.find( ".mw-translate-edit-area" );
8888 textarea.focus();
89 - var checks = form.find( ".mw-translate-messagechecks" );
90 - if ( checks ) {
9189
 90+ if ( form.find( ".mw-translate-messagechecks" ) ) {
9291 var checker = new MessageCheckUpdater( function() {
9392 var url = wgScript + "?title=Special:Translate/editpage&suggestions=checks&page=$1&loadgroup=$2";
9493 url = url.replace( "$1", page ).replace( "$2", group );
9594 jQuery.post( url, { translation: textarea.val() } , function(mydata) {
96 - checks.html( mydata );
 95+ form.find( ".mw-translate-messagechecks" ).replaceWith( mydata );
9796 });
9897 });
9998

Status & tagging log