Kaldari has uploaded a new change for review.
https://gerrit.wikimedia.org/r/92794
Change subject: Make sure header is rendered before binding events to it
......................................................................
Make sure header is rendered before binding events to it
Change-Id: I565d9cd49de4c584e5c9819d89e8e3f6fccf76ae
---
M javascripts/modules/notifications/notifications.js
1 file changed, 10 insertions(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/94/92794/1
diff --git a/javascripts/modules/notifications/notifications.js
b/javascripts/modules/notifications/notifications.js
index cfdab1d..ca94d8a 100644
--- a/javascripts/modules/notifications/notifications.js
+++ b/javascripts/modules/notifications/notifications.js
@@ -1,17 +1,19 @@
( function( M, $ ) {
var LoadingOverlay = M.require( 'LoadingOverlay' );
- $( '#secondary-button.user-button' ).on( 'click', function( ev ) {
- var loadingOverlay = new LoadingOverlay();
+ $( document ).ready( function() {
+ $( '#secondary-button.user-button' ).on( 'click', function( ev
) {
+ var loadingOverlay = new LoadingOverlay();
- loadingOverlay.show();
- ev.preventDefault();
+ loadingOverlay.show();
+ ev.preventDefault();
- mw.loader.using( 'mobile.notifications.overlay', function() {
- var NotificationsOverlay = M.require(
'modules/notifications/NotificationsOverlay' );
+ mw.loader.using( 'mobile.notifications.overlay',
function() {
+ var NotificationsOverlay = M.require(
'modules/notifications/NotificationsOverlay' );
- loadingOverlay.hide();
- new NotificationsOverlay( { $badge: $( this ) }
).show();
+ loadingOverlay.hide();
+ new NotificationsOverlay( { $badge: $( this ) }
).show();
+ } );
} );
} );
}( mw.mobileFrontend, jQuery ) );
--
To view, visit https://gerrit.wikimedia.org/r/92794
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I565d9cd49de4c584e5c9819d89e8e3f6fccf76ae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Kaldari <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits