Include the 'no notifications' message in nojs div

...So it can be hidden if JS is loading.

Bug: T142451
Change-Id: Idd70bdacb79cb45e759b30e711178721db5f80bd
This commit is contained in:
Moriel Schottlender 2016-08-16 17:25:14 -07:00
parent 435fe70fe0
commit 8eda2aa3fa

View file

@ -42,7 +42,9 @@ class SpecialNotifications extends SpecialPage {
// If there are no notifications, display a message saying so
if ( !$notifications ) {
$out->addWikiMsg( 'echo-none' );
// Wrap this with nojs so it is still hidden if JS is loading
$msg = new OOUI\LabelWidget( [ 'label' => $this->msg( 'echo-none' ) ] );
$out->addHTML( Html::rawElement( 'div', array( 'class' => 'mw-echo-special-nojs' ), $msg ) );
$out->addModules( array( 'ext.echo.special' ) );
return;
}