From: Fomafix Date: Mon, 10 Sep 2018 13:53:31 +0000 (+0200) Subject: mediawiki.notification: Use data-mw-foo instead of data-mw.foo X-Git-Tag: 1.34.0-rc.0~4153^2 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=886c37e94f6c576105d8dfa03c861ab30cf4dd4b;p=lhc%2Fweb%2Fwiklou.git 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 --- 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(); }