jenkins-bot has submitted this change and it was merged.
Change subject: ext.echo.overlay: Various minor consistency fixes and cleanup
......................................................................
ext.echo.overlay: Various minor consistency fixes and cleanup
Change-Id: Id3b0f4fd7253282b190d6b2ed5fc78b714295e96
---
M modules/overlay/ext.echo.overlay.js
1 file changed, 14 insertions(+), 11 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/overlay/ext.echo.overlay.js
b/modules/overlay/ext.echo.overlay.js
index 4a5e8c4..b5d34cf 100644
--- a/modules/overlay/ext.echo.overlay.js
+++ b/modules/overlay/ext.echo.overlay.js
@@ -23,7 +23,7 @@
buildOverlay: function ( callback ) {
var notificationLimit,
- $overlay = $( '<div></div>' ).addClass(
'mw-echo-overlay' ),
+ $overlay = $( '<div>' ).addClass(
'mw-echo-overlay' ),
$prefLink = $( '#pt-preferences a' ),
count = 0,
apiData,
@@ -51,10 +51,10 @@
unread = [],
unreadTotalCount =
result.query.notifications.count,
unreadRawTotalCount =
result.query.notifications.rawcount,
- $title = $( '<div
class="mw-echo-overlay-title"></div>' ),
- $ul = $( '<ul
class="mw-echo-notifications"></ul>' ),
- titleText = '',
- overflow = false,
+ $title = $( '<div>' ).addClass(
'mw-echo-overlay-title' ),
+ $ul = $( '<ul>' ).addClass(
'mw-echo-notifications' ),
+ titleText,
+ overflow,
$overlayFooter,
$markReadButton;
@@ -65,7 +65,7 @@
$.each( notifications.index, function ( index,
id ) {
var $wrapper,
data = notifications.list[id],
- $li = $( '<li></li>' )
+ $li = $( '<li>' )
.data( 'details', data )
.data( 'id', id )
.attr( {
@@ -130,7 +130,8 @@
);
overflow = true;
} else {
- titleText = mw.msg(
'echo-overlay-title' );
+ titleText = mw.msg(
'echo-overlay-title' );
+ overflow = false;
}
} else {
titleText = mw.msg( 'echo-none' );
@@ -159,7 +160,7 @@
count =
result.query.echomarkread.count;
mw.echo.overlay.updateCount( count, result.query.echomarkread.rawcount );
//
Reset header to 'Notifications'
- $(
'#mw-echo-overlay-title-text').msg( 'echo-overlay-title' );
+ $(
'#mw-echo-overlay-title-text' ).html( mw.msg( 'echo-overlay-title' ) );
}
} );
} );
@@ -288,19 +289,21 @@
return;
}
- $overlay = mw.echo.overlay.buildOverlay(
+ mw.echo.overlay.buildOverlay(
function ( $overlay ) {
$overlay
.hide()
.appendTo( $(
'#pt-notifications' ) );
+
// Create the pokey (aka chevron)
- $( '.mw-echo-overlay' ).before( $(
'<div>' ).addClass( 'mw-echo-overlay-pokey' ) );
+ $overlay.before( $( '<div>' ).addClass(
'mw-echo-overlay-pokey' ) );
mw.hook(
'ext.echo.overlay.beforeShowingOverlay' ).fire( $overlay );
// Show the notifications overlay
$overlay.show();
- } );
+ }
+ );
} );
$( 'body' ).click( function ( e ) {
--
To view, visit https://gerrit.wikimedia.org/r/93113
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id3b0f4fd7253282b190d6b2ed5fc78b714295e96
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Bsitu <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits