Jdlrobson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/182240

Change subject: Hygiene: Remove need for #notifications element
......................................................................

Hygiene: Remove need for #notifications element

Change-Id: I262332d1031b1e4dfa863d0bcbd95a7cf80ba9a7
---
M javascripts/Drawer.js
M javascripts/application.js
M less/common.less
M less/toast.less
M tests/qunit/modules/references/test_init.js
5 files changed, 5 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/40/182240/1

diff --git a/javascripts/Drawer.js b/javascripts/Drawer.js
index 1e63819..f3a0ec5 100644
--- a/javascripts/Drawer.js
+++ b/javascripts/Drawer.js
@@ -10,7 +10,7 @@
         */
        Drawer = Panel.extend( {
                className: 'drawer position-fixed',
-               appendToElement: '#notifications',
+               appendToElement: '#mw-mf-viewport',
                closeOnScroll: true,
 
                /** @inheritdoc */
diff --git a/javascripts/application.js b/javascripts/application.js
index b3b8f7d..9a12f26 100644
--- a/javascripts/application.js
+++ b/javascripts/application.js
@@ -50,9 +50,6 @@
                var
                        $viewport = $( '#mw-mf-viewport' );
 
-               // FIXME: This shouldn't be necessary
-               $( '<div id="notifications">' ).appendTo( $viewport );
-
                if ( browser.supportsAnimations() ) {
                        $viewport.addClass( 'animations' );
                }
diff --git a/less/common.less b/less/common.less
index 1fe11c3..c7f027d 100644
--- a/less/common.less
+++ b/less/common.less
@@ -117,7 +117,7 @@
 }
 
 .no-position-fixed {
-       #notifications {
+       .drawer {
                bottom: 0;
        }
 
diff --git a/less/toast.less b/less/toast.less
index 18af2c9..ceed0a8 100644
--- a/less/toast.less
+++ b/less/toast.less
@@ -7,12 +7,9 @@
 //
 // Styleguide 3.
 
-#notifications {
-       // it's only a container, should not get in the way
-       height: 0;
+.drawer {
        // needed for Android 4.x
        position: absolute;
-       z-index: @z-indexOverOverlay;
        // needed for MSIE 9 (Windows Phone 7)
        width: 100%;
 }
diff --git a/tests/qunit/modules/references/test_init.js 
b/tests/qunit/modules/references/test_init.js
index f8137af..b792859 100644
--- a/tests/qunit/modules/references/test_init.js
+++ b/tests/qunit/modules/references/test_init.js
@@ -20,8 +20,8 @@
                $el: $( '#mfe-test-references' )
        } );
        $("#mfe-test-references sup a").trigger("click");
-       assert.strictEqual( $( '#notifications .references h3' ).text(), '[1]' 
);
-       assert.strictEqual( $( '#notifications .references a' ).text(), 'test 
reference' );
+       assert.strictEqual( $( '.drawer .references h3' ).text(), '[1]' );
+       assert.strictEqual( $( '.drawer .references a' ).text(), 'test 
reference' );
 });
 
 } )( jQuery, mw.mobileFrontend );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I262332d1031b1e4dfa863d0bcbd95a7cf80ba9a7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>

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

Reply via email to