From 091587142d3328a2eb6665429bc7ee65ed9ae8cc Mon Sep 17 00:00:00 2001 From: Moriel Schottlender Date: Tue, 22 Sep 2015 15:36:14 -0700 Subject: [PATCH] Replace the orange bar with talk-page link, don't remove it The orange bar is replacing the 'talk' link; when it is removed, it should actually be replaced back to being a regular 'talk' page and not be completely removed from the page. Change-Id: I930d321952e85ee79acbbd162ab763b4eea63ff1 --- Resources.php | 1 + modules/ext.echo.init.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Resources.php b/Resources.php index 9604c6818..335c2f774 100644 --- a/Resources.php +++ b/Resources.php @@ -78,6 +78,7 @@ $wgResourceModules += array( 'echo-notification-placeholder', 'tooltip-pt-notifications-alert', 'tooltip-pt-notifications-message', + 'mytalk', 'mypreferences' ), 'targets' => array( 'desktop' ), diff --git a/modules/ext.echo.init.js b/modules/ext.echo.init.js index c45115e4a..db77e2701 100644 --- a/modules/ext.echo.init.js +++ b/modules/ext.echo.init.js @@ -61,7 +61,9 @@ mw.echo.ui.messageWidget.getModel().on( 'allRead', function () { // If there was a talk page notification, get rid of it - $( '#pt-mytalk' ).detach(); + $( '#pt-mytalk a' ) + .removeClass( 'mw-echo-alert' ) + .text( mw.msg( 'mytalk' ) ); } ); }