Mooeypoo has uploaded a new change for review.
https://gerrit.wikimedia.org/r/277915
Change subject: Rename MobileNotificationsWrapper to NotificationsWrapper
......................................................................
Rename MobileNotificationsWrapper to NotificationsWrapper
We need to use it in more than just the context of mobile, and
there is nothing actually mobile-specific in it. Renaming the
class so it isn't awkward to use elsewhere.
This makes the ext.echo.ui.mobile module unnecessary.
Change-Id: I7891eb3fb46b350f0b325bf0a2b56b2cd55ff1d7
---
M Resources.php
R modules/ooui/mw.echo.ui.NotificationsWrapper.js
2 files changed, 8 insertions(+), 16 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo
refs/changes/15/277915/1
diff --git a/Resources.php b/Resources.php
index 28dd778..5e35f94 100644
--- a/Resources.php
+++ b/Resources.php
@@ -55,15 +55,6 @@
),
'targets' => array( 'desktop' ),
),
- 'ext.echo.ui.mobile' => $echoResourceTemplate + array(
- 'scripts' => array(
- 'ooui/mobile/mw.echo.ui.MobileNotificationsWrapper.js',
- ),
- 'dependencies' => array(
- 'ext.echo.ui',
- ),
- 'targets' => array( 'mobile', 'desktop' ),
- ),
'ext.echo.ui' => $echoResourceTemplate + array(
'scripts' => array(
'ooui/mw.echo.ui.js',
@@ -74,6 +65,7 @@
'ooui/mw.echo.ui.BundledNotificationGroupWidget.js',
'ooui/mw.echo.ui.ActionMenuPopupWidget.js',
'ooui/mw.echo.ui.MenuItemWidget.js',
+ 'ooui/mobile/mw.echo.ui.NotificationsWrapper.js',
),
'styles' => array(
'ooui/styles/mw.echo.ui.overlay.less',
@@ -256,7 +248,7 @@
'dependencies' => array(
'mediawiki.ui.button',
'mediawiki.api',
- 'ext.echo.ui.desktop',
+ 'ext.echo.ui',
),
'messages' => array(
'echo-load-more-error',
diff --git a/modules/ooui/mobile/mw.echo.ui.MobileNotificationsWrapper.js
b/modules/ooui/mw.echo.ui.NotificationsWrapper.js
similarity index 76%
rename from modules/ooui/mobile/mw.echo.ui.MobileNotificationsWrapper.js
rename to modules/ooui/mw.echo.ui.NotificationsWrapper.js
index 28cb1ee..40344de 100644
--- a/modules/ooui/mobile/mw.echo.ui.MobileNotificationsWrapper.js
+++ b/modules/ooui/mw.echo.ui.NotificationsWrapper.js
@@ -1,6 +1,6 @@
( function ( mw ) {
/**
- * Mobile wrapper for the notifications widget, for mobile view.
+ * Wapper for the notifications widget, for view outside the popup.
*
* @class
* @extends OO.ui.Widget
@@ -10,11 +10,11 @@
* @param {mw.echo.dm.NotificationsModel} model Notifications view model
* @param {Object} [config] Configuration object
*/
- mw.echo.ui.MobileNotificationsWrapper = function
MwEchoUiMobileNotificationsWrapper( model, config ) {
+ mw.echo.ui.NotificationsWrapper = function
MwEchoUiMobileNotificationsWrapper( model, config ) {
config = config || {};
// Parent constructor
- mw.echo.ui.MobileNotificationsWrapper.parent.call( this, config
);
+ mw.echo.ui.NotificationsWrapper.parent.call( this, config );
// Mixin constructor
OO.ui.mixin.PendingElement.call( this, config );
@@ -44,8 +44,8 @@
/* Initialization */
- OO.inheritClass( mw.echo.ui.MobileNotificationsWrapper, OO.ui.Widget );
- OO.mixinClass( mw.echo.ui.MobileNotificationsWrapper,
OO.ui.mixin.PendingElement );
+ OO.inheritClass( mw.echo.ui.NotificationsWrapper, OO.ui.Widget );
+ OO.mixinClass( mw.echo.ui.NotificationsWrapper,
OO.ui.mixin.PendingElement );
/* Events */
@@ -68,7 +68,7 @@
* @return {jQuery.Promise} A promise that is resolved when all
notifications
* were fetched from the API and added to the model and UI.
*/
- mw.echo.ui.MobileNotificationsWrapper.prototype.populate = function () {
+ mw.echo.ui.NotificationsWrapper.prototype.populate = function () {
var widget = this;
this.pushPending();
--
To view, visit https://gerrit.wikimedia.org/r/277915
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7891eb3fb46b350f0b325bf0a2b56b2cd55ff1d7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits