Jdlrobson has uploaded a new change for review.

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


Change subject: Promote addToBodyAttributes to desktop skin
......................................................................

Promote addToBodyAttributes to desktop skin

Makes the Special:MobileMenu work on desktop

Change-Id: Iaf810fe3251079f1728d2cf4230f1fc60bdeaaab
---
M includes/skins/SkinMinerva.php
1 file changed, 13 insertions(+), 0 deletions(-)


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

diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 27d1216..812a2c1 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -20,6 +20,7 @@
                $modules = array(
                        'mobile.startup',
                        'mobile.stable.universal',
+                       'mobile.stable.dependencies',
                );
                $out->addModules( $modules );
 
@@ -31,6 +32,18 @@
        }
 
        /**
+        * This will be called by OutputPage::headElement when it is creating 
the
+        * "<body>" tag, - adds output property bodyClassName to the existing 
classes
+        * @param $out OutputPage
+        * @param $bodyAttrs Array
+        */
+       public function addToBodyAttributes( $out, &$bodyAttrs ) {
+               // does nothing by default
+               $classes = $out->getProperty( 'bodyClassName' );
+               $bodyAttrs[ 'class' ] .= ' ' . $classes;
+       }
+
+       /**
         * @param $out OutputPage
         */
        public function setupSkinUserCss( OutputPage $out ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf810fe3251079f1728d2cf4230f1fc60bdeaaab
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