Merge "Mark protected IndexPager properties also as protected in subclasses"
[lhc/web/wiklou.git] / resources / src / mediawiki.notification / notification.js
index 0ec010e..f72fc92 100644 (file)
        function Notification( message, options ) {
                var $notification, $notificationContent;
 
-               $notification = $( '<div class="mw-notification"></div>' )
+               $notification = $( '<div>' )
                        .data( 'mw-notification', this )
-                       .addClass( options.autoHide ? 'mw-notification-autohide' : 'mw-notification-noautohide' );
+                       .addClass( [
+                               'mw-notification',
+                               options.autoHide ? 'mw-notification-autohide' : 'mw-notification-noautohide'
+                       ] );
 
                if ( options.tag ) {
                        // Sanitize options.tag before it is used by any code. (Including Notification class methods)
                }
 
                if ( options.title ) {
-                       $( '<div class="mw-notification-title"></div>' )
+                       $( '<div>' )
+                               .addClass( 'mw-notification-title' )
                                .text( options.title )
                                .appendTo( $notification );
                }
 
-               $notificationContent = $( '<div class="mw-notification-content"></div>' );
+               $notificationContent = $( '<div>' ).addClass( 'mw-notification-content' );
 
                if ( typeof message === 'object' ) {
                        // Handle mw.Message objects separately from DOM nodes and jQuery objects