jenkins-bot has submitted this change and it was merged.
Change subject: Use templates in core to avoid fatals
......................................................................
Use templates in core to avoid fatals
Bug: 73377
Change-Id: I5a956864d86bbf8cea40cdd1015636e675d8e778
---
M ZeroBanner.php
M modules/ZeroInfo.js
M modules/ZeroOverlay.js
3 files changed, 7 insertions(+), 7 deletions(-)
Approvals:
Dr0ptp4kt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/ZeroBanner.php b/ZeroBanner.php
index b07ef74..2c0fa43 100644
--- a/ZeroBanner.php
+++ b/ZeroBanner.php
@@ -78,10 +78,10 @@
),
'localBasePath' => __DIR__,
'remoteExtPath' => $remoteExtPath,
- 'localTemplateBasePath' => __DIR__ . '/templates',
- 'templates' => array( 'interstitial.hogan', 'zeroinfo.hogan' ),
- // Use Mantle Resource Loader module
- 'class' => 'ResourceLoaderTemplateModule',
+ 'templates' => array(
+ 'interstitial.hogan' => 'templates/interstitial.hogan',
+ 'zeroinfo.hogan' => 'templates/zeroinfo.hogan'
+ ),
'targets' => array( 'mobile' ),
'scripts' => array(
'modules/banner.js',
diff --git a/modules/ZeroInfo.js b/modules/ZeroInfo.js
index a7b0aac..ad33876 100644
--- a/modules/ZeroInfo.js
+++ b/modules/ZeroInfo.js
@@ -25,7 +25,7 @@
moreInfo: mw.msg(
'zero-info-buttonText' )
};
- var content = M.template.get( 'zeroinfo.hogan'
).render( tplData );
+ var content = mw.template.get( 'zerobanner',
'zeroinfo.hogan' ).render( tplData );
this.$body.append( content );
if ( conf.bannerWarning ) {
@@ -52,7 +52,7 @@
this.windowManager.openWindow( dialog );
// Listen to router and hide dialog on URL change
- M.router.one( 'route', function () {
+ M.router.once( 'route', function () {
windowManager.clearWindows();
} );
};
diff --git a/modules/ZeroOverlay.js b/modules/ZeroOverlay.js
index 2862c7b..cadf298 100644
--- a/modules/ZeroOverlay.js
+++ b/modules/ZeroOverlay.js
@@ -3,7 +3,7 @@
'use strict';
var Overlay = M.require( 'Overlay' ),
ZeroOverlay = Overlay.extend( {
- template: M.template.get( 'interstitial.hogan' ),
+ template: mw.template.get( 'zerobanner', 'interstitial.hogan' ),
closeOnBack: true,
defaults: {
yes: mw.msg( 'zero-accept' ),
--
To view, visit https://gerrit.wikimedia.org/r/173069
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5a956864d86bbf8cea40cdd1015636e675d8e778
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ZeroBanner
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Dr0ptp4kt <[email protected]>
Gerrit-Reviewer: Jhobs <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits