From: Ryan Lane Date: Thu, 8 Aug 2013 08:22:42 +0000 (+0800) Subject: htmlform multiselect chosen: Replace lists X-Git-Tag: 1.31.0-rc.0~18906^2 X-Git-Url: http://git.cyclocoop.org/%27.parametre_url%28%20%20%20generer_action_auteur%28%27charger_plugin%27%2C%20%27update_flux%27%29%2C%27update_flux%27%2C%20%27oui%27%29.%27?a=commitdiff_plain;h=c83bb594b1b06511b5f79b52568b3d3c8b03943d;p=lhc%2Fweb%2Fwiklou.git htmlform multiselect chosen: Replace lists Rather than appending a new checkbox list and removing the old one, replace the old list with the new one, to preserve ordering. Change-Id: Idd77455bdbaf423e7a51cf3789460d1980f78922 --- diff --git a/resources/mediawiki/mediawiki.htmlform.js b/resources/mediawiki/mediawiki.htmlform.js index 8e764e1a2a..de0685988e 100644 --- a/resources/mediawiki/mediawiki.htmlform.js +++ b/resources/mediawiki/mediawiki.htmlform.js @@ -103,8 +103,7 @@ $fieldLabelText.text( $oldContainer.find( '.mw-label label' ).text() ); $fieldLabel.append( $fieldLabelText ); $container.prepend( $fieldLabel ); - $oldContainer.parent().append( $container ); - $oldContainer.remove(); + $oldContainer.replaceWith( $container ); return $container; }