Awight has uploaded a new change for review.
https://gerrit.wikimedia.org/r/173198
Change subject: WIP restore new banner choice modules
......................................................................
WIP restore new banner choice modules
Being sensitive to mobile, this time around.
Change-Id: I1ac69c041712d691514f080c6476e5fd3afb73a5
---
M CentralNotice.hooks.php
M CentralNotice.modules.php
M includes/CNBannerChoiceDataResourceLoaderModule.php
3 files changed, 14 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice
refs/changes/98/173198/1
diff --git a/CentralNotice.hooks.php b/CentralNotice.hooks.php
index 8f5fad9..f45e09a 100644
--- a/CentralNotice.hooks.php
+++ b/CentralNotice.hooks.php
@@ -383,6 +383,8 @@
$names = array(
'ext.centralNotice.bannerController.mobiledevice',
'ext.centralNotice.bannerController.mobile',
+ 'ext.centralNotice.bannerController.lib'
+ 'ext.centralNotice.bannerChoiceData',
);
$out->addModules( $names );
return true;
diff --git a/CentralNotice.modules.php b/CentralNotice.modules.php
index 4135aca..cb28aee 100644
--- a/CentralNotice.modules.php
+++ b/CentralNotice.modules.php
@@ -123,12 +123,15 @@
'dependencies' => array(
'jquery.cookie',
'json',
+ 'ext.centralNotice.bannerChoiceData',
+ 'ext.centralNotice.bannerController.lib',
),
);
$wgResourceModules[ 'ext.centralNotice.bannerChoiceData' ] = array(
// The following settings are brought in via this PHP class:
// 'position' => 'top',
// 'dependencies' => array( 'ext.centralNotice.bannerController.lib' )
+ // 'targets' => array( 'desktop', 'mobile' ),
'class' => 'CNBannerChoiceDataResourceLoaderModule'
);
$wgResourceModules[ 'ext.centralNotice.bannerController.lib' ] = array(
@@ -136,6 +139,7 @@
'remoteExtPath' =>
'CentralNotice/modules/ext.centralNotice.bannerController',
'scripts' => 'bannerController.lib.js',
'position' => 'top'
+ 'targets' => array( 'desktop', 'mobile' ),
);
$wgResourceModules[ 'ext.centralNotice.adminUi.campaignManager' ] = array(
'localBasePath' => $dir . '/modules',
diff --git a/includes/CNBannerChoiceDataResourceLoaderModule.php
b/includes/CNBannerChoiceDataResourceLoaderModule.php
index 2251868..e318a26 100644
--- a/includes/CNBannerChoiceDataResourceLoaderModule.php
+++ b/includes/CNBannerChoiceDataResourceLoaderModule.php
@@ -198,4 +198,11 @@
public function getDependencies() {
return array( 'ext.centralNotice.bannerController.lib' );
}
-}
\ No newline at end of file
+
+ /**
+ * @see ResourceLoaderModule::getTargets()
+ */
+ public function getTargets() {
+ return array( 'desktop', 'mobile' );
+ }
+}
--
To view, visit https://gerrit.wikimedia.org/r/173198
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ac69c041712d691514f080c6476e5fd3afb73a5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits