From 886c37e94f6c576105d8dfa03c861ab30cf4dd4b Mon Sep 17 00:00:00 2001 From: Fomafix Date: Mon, 10 Sep 2018 15:53:31 +0200 Subject: [PATCH] mediawiki.notification: Use data-mw-foo instead of data-mw.foo All other data-mw attributes or .data() parameters use 'mw-foo' instead of 'mw.foo'. Change-Id: I2f7290c8a7ba1684c65b976c17912aa85846de02 --- resources/src/mediawiki.notification/notification.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/src/mediawiki.notification/notification.js b/resources/src/mediawiki.notification/notification.js index d4bc7ad648..cb3e4ae6c6 100644 --- a/resources/src/mediawiki.notification/notification.js +++ b/resources/src/mediawiki.notification/notification.js @@ -30,7 +30,7 @@ var $notification, $notificationContent; $notification = $( '
' ) - .data( 'mw.notification', this ) + .data( 'mw-notification', this ) .addClass( options.autoHide ? 'mw-notification-autohide' : 'mw-notification-noautohide' ); if ( options.tag ) { @@ -134,7 +134,7 @@ // While there can be only one "open" notif with a given tag, there can be several // matches here because they remain in the DOM until the animation is finished. $tagMatches.each( function () { - var notif = $( this ).data( 'mw.notification' ); + var notif = $( this ).data( 'mw-notification' ); if ( notif && notif.isOpen ) { // Detach from render flow with position absolute so that the new tag can // occupy its space instead. @@ -262,7 +262,7 @@ */ function callEachNotification( $notifications, fn ) { $notifications.each( function () { - var notif = $( this ).data( 'mw.notification' ); + var notif = $( this ).data( 'mw-notification' ); if ( notif ) { notif[ fn ](); } @@ -309,7 +309,7 @@ } ) // When clicking on a notification close it. .on( 'click', '.mw-notification', function () { - var notif = $( this ).data( 'mw.notification' ); + var notif = $( this ).data( 'mw-notification' ); if ( notif ) { notif.close(); } -- 2.20.1