From: jenkins-bot Date: Mon, 10 Sep 2018 18:38:04 +0000 (+0000) Subject: Merge "mediawiki.notification: Use data-mw-foo instead of data-mw.foo" X-Git-Tag: 1.34.0-rc.0~4153 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=e99e49cdf93eb2e1bb0be9ab15882b0a96fdf125;hp=bd7e7dfa639c699ab28beb1b84feae66889c7313 Merge "mediawiki.notification: Use data-mw-foo instead of data-mw.foo" --- 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(); }