diff --git a/includes/api/ApiEchoNotifications.php b/includes/api/ApiEchoNotifications.php
index 3fc66d17c..6a00bf666 100644
--- a/includes/api/ApiEchoNotifications.php
+++ b/includes/api/ApiEchoNotifications.php
@@ -11,6 +11,7 @@ class ApiEchoNotifications extends ApiCrossWikiBase {
}
public function execute() {
+
// To avoid API warning, register the parameter used to bust browser cache
$this->getMain()->getVal( '_' );
diff --git a/modules/styles/mw.echo.ui.PlaceholderItemWidget.less b/modules/styles/mw.echo.ui.PlaceholderItemWidget.less
index 9139d1525..7ea644e48 100644
--- a/modules/styles/mw.echo.ui.PlaceholderItemWidget.less
+++ b/modules/styles/mw.echo.ui.PlaceholderItemWidget.less
@@ -1,10 +1,5 @@
@import '../echo.variables';
.mw-echo-ui-placeholderItemWidget {
- padding: 2em;
- background-color: @notification-background-read;
-
- &-notLinked,
- &-notLinked a {
- cursor: default;
- }
- }
+ padding: 2em;
+ background-color: @notification-background-read;
+}
diff --git a/modules/ui/mw.echo.ui.PlaceholderItemWidget.js b/modules/ui/mw.echo.ui.PlaceholderItemWidget.js
index 71eff32a3..1d64abe02 100644
--- a/modules/ui/mw.echo.ui.PlaceholderItemWidget.js
+++ b/modules/ui/mw.echo.ui.PlaceholderItemWidget.js
@@ -19,31 +19,29 @@
// Mixin constructor
OO.ui.mixin.LabelElement.call( this, config );
- this.$link = $( '' )
- .addClass( 'mw-echo-ui-placeholderItemWidget-link' );
- this.setLink( config.link || '' );
+ this.$element.addClass( 'mw-echo-ui-placeholderItemWidget' );
- this.$element
- .addClass( 'mw-echo-ui-placeholderItemWidget' )
- .append(
- this.$link.append( this.$label )
- );
+ this.setLink( config.link );
};
OO.inheritClass( mw.echo.ui.PlaceholderItemWidget, OO.ui.Widget );
OO.mixinClass( mw.echo.ui.PlaceholderItemWidget, OO.ui.mixin.LabelElement );
/**
- * Set (or unset) the main link for this widget
+ * Set (or unset) the main link url for this widget
*
- * @param {string} link The widget link
+ * @param {string} url The widget url
*/
- mw.echo.ui.PlaceholderItemWidget.prototype.setLink = function ( link ) {
- this.link = link;
-
- this.$element.toggleClass( 'mw-echo-ui-placeholderItemWidget-loadingOption-notLinked', !this.link );
-
- this.$link.attr( 'href', this.link );
+ mw.echo.ui.PlaceholderItemWidget.prototype.setLink = function ( url ) {
+ var $link;
+ if ( url ) {
+ $link = $( '' )
+ .addClass( 'mw-echo-ui-placeholderItemWidget-link' )
+ .attr( 'href', url );
+ this.$element.html( $link.append( this.$label ) );
+ } else {
+ this.$element.html( this.$label );
+ }
};
/**