Merge "Register a couple of test classes in autoloader"
[lhc/web/wiklou.git] / resources / src / mediawiki.action / mediawiki.action.edit.preview.js
index 9a639ba..1d4d0e9 100644 (file)
                                                        .addClass( 'mw-indicator' )
                                                        .attr( 'id', mw.util.escapeId( 'mw-indicator-' + indicator.name ) )
                                                        .html( indicator[ '*' ] )
-                                                       .get( 0 )
+                                                       .get( 0 ),
+                                               // Add a whitespace between the <div>s because
+                                               // they get displayed with display: inline-block
+                                               document.createTextNode( '\n' )
                                        );
-                                       newList.push( document.createTextNode( '\n' ) );
                                } );
                                $( '.mw-indicators' ).empty().append( newList );
 
                                        );
                                }
                                if ( response.parse.categorieshtml ) {
-                                       $( '#catlinks' ).replaceWith( response.parse.categorieshtml[ '*' ] );
+                                       $content = $( $.parseHTML( response.parse.categorieshtml[ '*' ] ) );
+                                       mw.hook( 'wikipage.categories' ).fire( $content );
+                                       $( '.catlinks[data-mw="interface"]' ).replaceWith( $content );
                                }
                                if ( response.parse.templates ) {
                                        newList = [];