JGonera has submitted this change and it was merged.
Change subject: Add top context modules as well as styles - make login js run
......................................................................
Add top context modules as well as styles - make login js run
Currently this is not being added but should be
Change-Id: I4156e53d72aa411de4045cf47bf8cda3c3836b87
---
M includes/skins/SkinMobile.php
1 file changed, 12 insertions(+), 5 deletions(-)
Approvals:
JGonera: Verified; Looks good to me, approved
diff --git a/includes/skins/SkinMobile.php b/includes/skins/SkinMobile.php
index 4b557fd..3bca8ac 100644
--- a/includes/skins/SkinMobile.php
+++ b/includes/skins/SkinMobile.php
@@ -252,9 +252,14 @@
// attach styles
$out->addModuleStyles( 'mobile.styles' );
- if ( count( $contextModules['top'] ) > 0 ) {
- $out->addModuleStyles( $contextModules['top'] );
+ if ( count( $contextModules['styles'] ) > 0 ) {
+ $out->addModuleStyles( $contextModules['styles'] );
}
+
+ if ( count( $contextModules['top'] ) > 0 ) {
+ $out->addModules( $contextModules['top'] );
+ }
+
// add device specific CSS separately to avoid cache
fragmentation
if ( $wgMFVaryResources ) {
$out->addModuleStyles( 'mobile.device.detect' );
@@ -352,11 +357,12 @@
$moduleNames = array();
$headModuleNames = array();
+ $styles = array();
// specific to current context
if ( $isFilePage ) {
$moduleNames[] = 'mobile.file.scripts';
- $headModuleNames[] = 'mobile.file.styles';
+ $styles[] = 'mobile.file.styles';
}
if ( $isSpecialPage ) {
@@ -366,7 +372,7 @@
$specialScriptModuleName = 'mobile.' . $id . '.scripts';
if ( isset( $wgResourceModules[ $specialStyleModuleName
] ) ) {
- $headModuleNames[] = $specialStyleModuleName;
+ $styles[] = $specialStyleModuleName;
}
if ( isset( $wgResourceModules[
$specialScriptModuleName ] ) ) {
@@ -378,7 +384,7 @@
}
}
} else {
- $headModuleNames[] = 'mobile.styles.page';
+ $styles[] = 'mobile.styles.page';
}
if ( $action === 'edit' ) {
@@ -390,6 +396,7 @@
return array(
'top' => $headModuleNames,
'bottom' => $moduleNames,
+ 'styles' => $styles,
);
}
--
To view, visit https://gerrit.wikimedia.org/r/57177
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4156e53d72aa411de4045cf47bf8cda3c3836b87
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: JGonera <[email protected]>
Gerrit-Reviewer: awjrichards <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits