JGonera has submitted this change and it was merged.

Change subject: Make homepage module run outside alpha
......................................................................


Make homepage module run outside alpha

Also stop it being an h1 - make it more semantically correct
as an .alert.warning (add tiny style change for this)

Change-Id: I82d3f4d999419808e94eae85f399f545a5506c55
---
M javascripts/modules/mf-homepage.js
M less/common/mf-navigation.less
M stylesheets/common/mf-navigation.css
3 files changed, 12 insertions(+), 4 deletions(-)

Approvals:
  JGonera: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/javascripts/modules/mf-homepage.js 
b/javascripts/modules/mf-homepage.js
index 0df2aa6..80a891c 100644
--- a/javascripts/modules/mf-homepage.js
+++ b/javascripts/modules/mf-homepage.js
@@ -1,11 +1,11 @@
 // special casing for homepage
-( function( M, $ ) {
+( function( $ ) {
 
-M.on( 'homepage-loaded', function() {
+$( function() {
        $( 'h1.section_0' ).remove();
        if ( $( '#mainpage' ).children().length === 0 || $( '#content' 
).children().length === 0 ) {
-               $( '<h1>' ).html( mw.msg( 'mobile-frontend-empty-homepage-text' 
) ).prependTo( '#content' );
+               $( '<div class="alert warning">' ).html( mw.msg( 
'mobile-frontend-empty-homepage-text' ) ).prependTo( '#content_wrapper' );
        }
 } );
 
-} ( mw.mobileFrontend, jQuery ) );
+} ( jQuery ) );
diff --git a/less/common/mf-navigation.less b/less/common/mf-navigation.less
index 9d08381..cef49dd 100644
--- a/less/common/mf-navigation.less
+++ b/less/common/mf-navigation.less
@@ -2,6 +2,7 @@
 
 @InfoBoxWLogoSize: 98px;
 @overlayAlertTipColor: black;
+@overlayAlertWarningColor: orange;
 @overlayAlertSuccessColor: green;
 @overlayAlertErrorBorderColor: #D00;
 @overlayAlertErrorBackgroundColor: #FAE1E1;
@@ -179,6 +180,10 @@
        min-height: 64px;
        font-size: @baseFontSize;
 
+       &.warning {
+               border: solid @overlayBorderWidth @overlayAlertWarningColor;
+       }
+
        &.success {
                padding-left: ( 80px + @overlayAlertPadding );
                border: solid @overlayBorderWidth @overlayAlertSuccessColor;
diff --git a/stylesheets/common/mf-navigation.css 
b/stylesheets/common/mf-navigation.css
index 2ae8cf1..c8b6b88 100644
--- a/stylesheets/common/mf-navigation.css
+++ b/stylesheets/common/mf-navigation.css
@@ -165,6 +165,9 @@
   min-height: 64px;
   font-size: 1em;
 }
+.alert.warning {
+  border: solid 1px #ffa500;
+}
 .alert.success {
   padding-left: 80px;
   border: solid 1px #008000;

-- 
To view, visit https://gerrit.wikimedia.org/r/59723
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I82d3f4d999419808e94eae85f399f545a5506c55
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: JGonera <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to