LivePreview: Update the correct mw-editfooter-list
authorDerk-Jan Hartman <hartman.wiki@gmail.com>
Thu, 26 Mar 2015 13:06:49 +0000 (14:06 +0100)
committerDerk-Jan Hartman <hartman.wiki@gmail.com>
Thu, 26 Mar 2015 13:06:49 +0000 (14:06 +0100)
mw-editfooter-list is used by both templatesUsed and hiddencats, so
make sure we replace correct one.

Bug: T78834
Change-Id: I00be75ac6d68f96fb366b9561ec1ee0e1998f656

resources/src/mediawiki.action/mediawiki.action.edit.preview.js

index 3a6110d..65ae0f0 100644 (file)
                                                newList.push( li );
                                        } );
 
-                                       $editform.find( '.mw-editfooter-list' ).detach().empty().append( newList ).appendTo( '.templatesUsed' );
+                                       $editform.find( '.templatesUsed .mw-editfooter-list' ).detach().empty().append( newList ).appendTo( '.templatesUsed' );
                                }
                                if ( response.parse.limitreporthtml ) {
                                        $( '.limitreport' ).html( response.parse.limitreporthtml['*'] );