jenkins-bot has submitted this change and it was merged.

Change subject: Gather should use OO.mfExtend for Views and Schemas
......................................................................


Gather should use OO.mfExtend for Views and Schemas

Bug: T123076
Change-Id: I9363c4d23bde8caf0541fd0dfb13abe15b6583e3
---
M resources/ext.gather.buttonspinner/ButtonWithSpinner.js
M resources/ext.gather.collection.base/CollectionsContentOverlayBase.js
M resources/ext.gather.collection.confirm/ConfirmationOverlay.js
M resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js
M resources/ext.gather.collection.delete/CollectionDeleteOverlay.js
M resources/ext.gather.collection.editor/CollectionEditOverlay.js
M resources/ext.gather.collection.editor/SearchTutorialOverlay.js
M resources/ext.gather.collection.flag/CollectionFlagButton.js
M resources/ext.gather.collection.flag/CollectionFlagOverlay.js
M resources/ext.gather.collections.list/CollectionsList.js
M resources/ext.gather.collections.list/CreateCollectionButton.js
M resources/ext.gather.logging/SchemaGather.js
M resources/ext.gather.logging/SchemaGatherFlags.js
M resources/ext.gather.page.search/CollectionPageList.js
M resources/ext.gather.page.search/CollectionSearchPanel.js
M resources/ext.gather.relatedpages/RelatedPages.js
M resources/ext.gather.toastpanel/ToastPanel.js
M resources/ext.gather.watchstar/CollectionsWatchstar.js
M resources/ext.gather.watchstar/Tag.js
M resources/ext.gather.watchstar/WatchstarPageActionOverlay.js
20 files changed, 188 insertions(+), 149 deletions(-)

Approvals:
  Sumit: Looks good to me, but someone else must approve
  Jhernandez: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/ext.gather.buttonspinner/ButtonWithSpinner.js 
b/resources/ext.gather.buttonspinner/ButtonWithSpinner.js
index 118485f..b9eab3d 100644
--- a/resources/ext.gather.buttonspinner/ButtonWithSpinner.js
+++ b/resources/ext.gather.buttonspinner/ButtonWithSpinner.js
@@ -1,8 +1,7 @@
 ( function ( M ) {
 
        var Button = M.require( 'mobile.startup/Button' ),
-               icons = M.require( 'mobile.startup/icons' ),
-               ButtonWithSpinner;
+               icons = M.require( 'mobile.startup/icons' );
 
        /**
         * @class ButtonWithSpinner
@@ -22,7 +21,10 @@
         *                      button.loading( true );
         *              </code>
         */
-       ButtonWithSpinner = Button.extend( {
+       function ButtonWithSpinner() {
+               Button.apply( this, arguments );
+       }
+       OO.mfExtend( ButtonWithSpinner, Button, {
                defaults: {
                        tagName: 'button',
                        disabled: false,
diff --git 
a/resources/ext.gather.collection.base/CollectionsContentOverlayBase.js 
b/resources/ext.gather.collection.base/CollectionsContentOverlayBase.js
index a9f5dfd..c1d6121 100644
--- a/resources/ext.gather.collection.base/CollectionsContentOverlayBase.js
+++ b/resources/ext.gather.collection.base/CollectionsContentOverlayBase.js
@@ -1,14 +1,17 @@
 ( function ( M ) {
 
-       var CollectionsContentOverlayBase,
-               ContentOverlay = M.require( 'mobile.overlays/ContentOverlay' );
+       var ContentOverlay = M.require( 'mobile.overlays/ContentOverlay' );
 
        /**
         * A clickable watchstar for managing collections
         * @class CollectionsContentOverlayBase
         * @extends ContentOverlay
         */
-       CollectionsContentOverlayBase = ContentOverlay.extend( {
+       function CollectionsContentOverlayBase() {
+               ContentOverlay.apply( this, arguments );
+       }
+
+       OO.mfExtend( CollectionsContentOverlayBase, ContentOverlay, {
                /**
                 * FIXME: re-evaluate content overlay default classes/css.
                 * @inheritdoc
diff --git a/resources/ext.gather.collection.confirm/ConfirmationOverlay.js 
b/resources/ext.gather.collection.confirm/ConfirmationOverlay.js
index e859041..af689ab 100644
--- a/resources/ext.gather.collection.confirm/ConfirmationOverlay.js
+++ b/resources/ext.gather.collection.confirm/ConfirmationOverlay.js
@@ -1,7 +1,6 @@
 ( function ( M, $ ) {
 
-       var ConfirmationOverlay,
-               toast = M.require( 'mobile.toast/toast' ),
+       var toast = M.require( 'mobile.toast/toast' ),
                icons = M.require( 'mobile.startup/icons' ),
                CollectionsContentOverlayBase = M.require( 
'ext.gather.collection.base/CollectionsContentOverlayBase' );
 
@@ -10,7 +9,18 @@
         * @extends CollectionsContentOverlayBase
         * @class ConfirmationOverlay
         */
-       ConfirmationOverlay = CollectionsContentOverlayBase.extend( {
+       function ConfirmationOverlay( options ) {
+               var collection = options.collection;
+               CollectionsContentOverlayBase.apply( this, arguments );
+               if ( !collection ) {
+                       // use toast
+                       toast.show( options.unknownCollectionError, 'toast 
error' );
+               } else {
+                       this.id = collection.id;
+               }
+       }
+
+       OO.mfExtend( ConfirmationOverlay, CollectionsContentOverlayBase, {
                /** @inheritdoc */
                className: 'collection-confirmation-overlay content-overlay 
position-fixed',
                /** @inheritdoc */
@@ -30,17 +40,6 @@
                templatePartials: $.extend( {}, 
CollectionsContentOverlayBase.prototype.templatePartials, {
                        content: mw.template.get( 
'ext.gather.collection.confirm', 'confirmationOverlay.hogan' )
                } ),
-               /** @inheritdoc */
-               initialize: function ( options ) {
-                       var collection = options.collection;
-                       if ( !collection ) {
-                               // use toast
-                               toast.show( options.unknownCollectionError, 
'toast error' );
-                       } else {
-                               this.id = collection.id;
-                               
CollectionsContentOverlayBase.prototype.initialize.apply( this, arguments );
-                       }
-               },
                /**
                 * Event handler when the cancel button is clicked.
                 */
diff --git 
a/resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js 
b/resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js
index 2638106..9e1159d 100644
--- 
a/resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js
+++ 
b/resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js
@@ -1,6 +1,5 @@
 ( function ( M, $ ) {
-       var CollectionsContentOverlay,
-               SchemaGather = M.require( 'ext.gather.logging/SchemaGather' ),
+       var SchemaGather = M.require( 'ext.gather.logging/SchemaGather' ),
                schema = new SchemaGather(),
                icons = M.require( 'mobile.startup/icons' ),
                toast = M.require( 'mobile.toast/toast' ),
@@ -17,7 +16,29 @@
         * @class CollectionsContentOverlay
         * @extends CollectionsContentOverlayBase
         */
-       CollectionsContentOverlay = CollectionsContentOverlayBase.extend( {
+       function CollectionsContentOverlay( options ) {
+               this.gateway = options.gateway;
+               this.createButton = new ButtonWithSpinner( {
+                       label: this.defaults.createButtonLabel,
+                       additionalClassNames: 'create-collection',
+                       constructive: true,
+                       disabled: true,
+                       loading: false
+               } );
+               if ( options.collections === undefined ) {
+                       options.collections = [];
+                       CollectionsContentOverlayBase.call( this, options );
+                       // load the collections.
+                       this.showSpinner();
+                       this._loadCollections( user.getName(), options.page );
+               } else {
+                       CollectionsContentOverlayBase.call( this, options );
+               }
+               // This should be an event on the view itself.
+               M.on( 'resize', $.proxy( this, 'expandForm' ) );
+       }
+
+       OO.mfExtend( CollectionsContentOverlay, CollectionsContentOverlayBase, {
                /**
                 * FIXME: re-evaluate content overlay default classes/css.
                 * @inheritdoc
@@ -80,28 +101,6 @@
                        showTutorial: false,
                        collections: undefined
                } ),
-               /** @inheritdoc */
-               initialize: function ( options ) {
-                       this.gateway = options.gateway;
-                       this.createButton = new ButtonWithSpinner( {
-                               label: this.defaults.createButtonLabel,
-                               additionalClassNames: 'create-collection',
-                               constructive: true,
-                               disabled: true,
-                               loading: false
-                       } );
-                       if ( options.collections === undefined ) {
-                               options.collections = [];
-                               
CollectionsContentOverlayBase.prototype.initialize.call( this, options );
-                               // load the collections.
-                               this.showSpinner();
-                               this._loadCollections( user.getName(), 
options.page );
-                       } else {
-                               
CollectionsContentOverlayBase.prototype.initialize.call( this, options );
-                       }
-                       // This should be an event on the view itself.
-                       M.on( 'resize', $.proxy( this, 'expandForm' ) );
-               },
                /** @inheritdoc */
                show: function () {
                        CollectionsContentOverlayBase.prototype.show.apply( 
this, arguments );
diff --git a/resources/ext.gather.collection.delete/CollectionDeleteOverlay.js 
b/resources/ext.gather.collection.delete/CollectionDeleteOverlay.js
index 3cd84a9..87c2e55 100644
--- a/resources/ext.gather.collection.delete/CollectionDeleteOverlay.js
+++ b/resources/ext.gather.collection.delete/CollectionDeleteOverlay.js
@@ -1,7 +1,6 @@
 ( function ( M, $ ) {
 
-       var CollectionDeleteOverlay,
-               SchemaGather = M.require( 'ext.gather.logging/SchemaGather' ),
+       var SchemaGather = M.require( 'ext.gather.logging/SchemaGather' ),
                schema = new SchemaGather(),
                toast = M.require( 'mobile.toast/toast' ),
                CollectionsGateway = M.require( 
'ext.gather.api/CollectionsGateway' ),
@@ -12,7 +11,12 @@
         * @extends ConfirmationOverlay
         * @class CollectionDeleteOverlay
         */
-       CollectionDeleteOverlay = ConfirmationOverlay.extend( {
+       function CollectionDeleteOverlay( options ) {
+               this.gateway = new CollectionsGateway( options.api );
+               ConfirmationOverlay.apply( this, arguments );
+       }
+
+       OO.mfExtend( CollectionDeleteOverlay, ConfirmationOverlay, {
                /**
                 * @inheritdoc
                 * @cfg {Object} defaults Default options hash.
@@ -30,11 +34,6 @@
                events: {
                        'click .cancel': 'onCancelClick',
                        'click .confirm': 'onDeleteClick'
-               },
-               /** @inheritdoc */
-               initialize: function ( options ) {
-                       this.gateway = new CollectionsGateway( options.api );
-                       ConfirmationOverlay.prototype.initialize.apply( this, 
arguments );
                },
                /**
                 * Event handler when the delete button is clicked.
diff --git a/resources/ext.gather.collection.editor/CollectionEditOverlay.js 
b/resources/ext.gather.collection.editor/CollectionEditOverlay.js
index 5c5fd58..ab385e4 100644
--- a/resources/ext.gather.collection.editor/CollectionEditOverlay.js
+++ b/resources/ext.gather.collection.editor/CollectionEditOverlay.js
@@ -1,7 +1,6 @@
 ( function ( M, $ ) {
 
-       var CollectionEditOverlay,
-               toast = M.require( 'mobile.toast/toast' ),
+       var toast = M.require( 'mobile.toast/toast' ),
                CollectionsGateway = M.require( 
'ext.gather.api/CollectionsGateway' ),
                CollectionSearchPanel = M.require( 
'ext.gather.page.search/CollectionSearchPanel' ),
                Overlay = M.require( 'mobile.overlays/Overlay' ),
@@ -19,7 +18,28 @@
         * @class CollectionEditOverlay
         * @uses CollectionSearchPanel
         */
-       CollectionEditOverlay = Overlay.extend( {
+       function CollectionEditOverlay( options ) {
+               // Initial properties;
+               this.id = null;
+               this.originalTitle = '';
+
+               if ( options && options.collection ) {
+                       this.id = options.collection.id;
+                       this.originalTitle = options.collection.title;
+               } else {
+                       options.collection = {
+                               // New collection is public by default
+                               isPublic: true
+                       };
+               }
+               this.activePane = 'main';
+               this.api = options.api;
+               this.gateway = new CollectionsGateway( this.api );
+               Overlay.apply( this, arguments );
+               this.$clear = this.$( '.search-header .clear' );
+       }
+
+       OO.mfExtend( CollectionEditOverlay, Overlay, {
                _selectors: {
                        edit: '.continue-header, .editor-pane',
                        manage: [
@@ -111,27 +131,6 @@
                        header: mw.template.get( 
'ext.gather.collection.editor', 'header.hogan' ),
                        content: mw.template.get( 
'ext.gather.collection.editor', 'content.hogan' )
                } ),
-               /** @inheritdoc */
-               initialize: function ( options ) {
-                       // Initial properties;
-                       this.id = null;
-                       this.originalTitle = '';
-
-                       if ( options && options.collection ) {
-                               this.id = options.collection.id;
-                               this.originalTitle = options.collection.title;
-                       } else {
-                               options.collection = {
-                                       // New collection is public by default
-                                       isPublic: true
-                               };
-                       }
-                       this.activePane = 'main';
-                       this.api = options.api;
-                       this.gateway = new CollectionsGateway( this.api );
-                       Overlay.prototype.initialize.apply( this, arguments );
-                       this.$clear = this.$( '.search-header .clear' );
-               },
                /** @inheritdoc */
                postRender: function () {
                        Overlay.prototype.postRender.apply( this, arguments );
diff --git a/resources/ext.gather.collection.editor/SearchTutorialOverlay.js 
b/resources/ext.gather.collection.editor/SearchTutorialOverlay.js
index e4cba10..a0c003a 100644
--- a/resources/ext.gather.collection.editor/SearchTutorialOverlay.js
+++ b/resources/ext.gather.collection.editor/SearchTutorialOverlay.js
@@ -1,8 +1,15 @@
 ( function ( M, $ ) {
-       var PointerOverlay = M.require( 'mobile.contentOverlays/PointerOverlay' 
),
-               SearchTutorialOverlay;
+       var PointerOverlay = M.require( 'mobile.contentOverlays/PointerOverlay' 
);
 
-       SearchTutorialOverlay = PointerOverlay.extend( {
+       /**
+        * @class SearchTutorialOverlay
+        * @extends PointerOverlay
+        */
+       function SearchTutorialOverlay() {
+               PointerOverlay.apply( this, arguments );
+       }
+
+       OO.mfExtend( SearchTutorialOverlay, PointerOverlay, {
                template: mw.template.get( 'ext.gather.collection.editor', 
'SearchTutorialOverlay.hogan' ),
                className: 'overlay pointer-overlay search-tutorial-overlay',
                events: $.extend( {}, PointerOverlay.prototype.events, {
diff --git a/resources/ext.gather.collection.flag/CollectionFlagButton.js 
b/resources/ext.gather.collection.flag/CollectionFlagButton.js
index 50cbbac..f9624eb 100644
--- a/resources/ext.gather.collection.flag/CollectionFlagButton.js
+++ b/resources/ext.gather.collection.flag/CollectionFlagButton.js
@@ -3,15 +3,17 @@
        var CollectionsGateway = M.require( 'ext.gather.api/CollectionsGateway' 
),
                CollectionFlagOverlay = M.require( 
'ext.gather.collection.flag/CollectionFlagOverlay' ),
                Button = M.require( 'mobile.startup/Button' ),
-               Icon = M.require( 'mobile.startup/Icon' ),
-               CollectionFlagButton;
+               Icon = M.require( 'mobile.startup/Icon' );
 
        /**
         * A button used to flag a collection
         * @class CollectionFlagButton
         * @extends Button
         */
-       CollectionFlagButton = Button.extend( {
+       function CollectionFlagButton() {
+               Button.apply( this, arguments );
+       }
+       OO.mfExtend( CollectionFlagButton, Button, {
                /**
                 * @inheritdoc
                 * @cfg {Object} defaults Default options hash.
diff --git a/resources/ext.gather.collection.flag/CollectionFlagOverlay.js 
b/resources/ext.gather.collection.flag/CollectionFlagOverlay.js
index c7f27b3..f04faf8 100644
--- a/resources/ext.gather.collection.flag/CollectionFlagOverlay.js
+++ b/resources/ext.gather.collection.flag/CollectionFlagOverlay.js
@@ -1,7 +1,6 @@
 ( function ( M, $ ) {
 
-       var CollectionFlagOverlay,
-               ConfirmationOverlay = M.require( 
'ext.gather.collection.confirm/ConfirmationOverlay' ),
+       var ConfirmationOverlay = M.require( 
'ext.gather.collection.confirm/ConfirmationOverlay' ),
                SchemaGatherFlags = M.require( 
'ext.gather.logging/SchemaGatherFlags' ),
                schema = new SchemaGatherFlags(),
                toast = M.require( 'mobile.toast/toast' );
@@ -11,7 +10,11 @@
         * @extends ConfirmationOverlay
         * @class CollectionFlagOverlay
         */
-       CollectionFlagOverlay = ConfirmationOverlay.extend( {
+       function CollectionFlagOverlay() {
+               ConfirmationOverlay.apply( this, arguments );
+       }
+
+       OO.mfExtend( CollectionFlagOverlay, ConfirmationOverlay, {
                /** @inheritdoc */
                defaults: $.extend( {}, ConfirmationOverlay.prototype.defaults, 
{
                        flagSuccessMsg: mw.msg( 
'gather-flag-collection-success' ),
diff --git a/resources/ext.gather.collections.list/CollectionsList.js 
b/resources/ext.gather.collections.list/CollectionsList.js
index c26fca4..5640500 100644
--- a/resources/ext.gather.collections.list/CollectionsList.js
+++ b/resources/ext.gather.collections.list/CollectionsList.js
@@ -1,7 +1,6 @@
 ( function ( M, $ ) {
 
-       var CollectionsList,
-               InfiniteScroll = M.require( 
'mobile.infiniteScroll/InfiniteScroll' ),
+       var InfiniteScroll = M.require( 'mobile.infiniteScroll/InfiniteScroll' 
),
                icons = M.require( 'mobile.startup/icons' ),
                CollectionsGateway = M.require( 
'ext.gather.api/CollectionsGateway' ),
                toast = M.require( 'mobile.toast/toast' ),
@@ -9,7 +8,24 @@
                Icon = M.require( 'mobile.startup/Icon' ),
                CreateCollectionButton = M.require( 
'ext.gather.collections.list/CreateCollectionButton' );
 
-       CollectionsList = View.extend( {
+       /**
+        * @class CollectionsList
+        * @extends View
+        */
+       function CollectionsList( options ) {
+               View.call( this, options );
+               // After the initial render initialize the infinite scrolling.
+               this.$pagination = this.$el.find( '.collections-pagination' );
+               if ( this.$pagination.length ) {
+                       this._replacePaginationControls();
+                       this.gateway = new CollectionsGateway( options.api );
+                       this.infiniteScroll = new InfiniteScroll();
+                       this.infiniteScroll.setElement( this.$el );
+                       this.infiniteScroll.on( 'load', $.proxy( this, 
'_loadCollections' ) );
+               }
+       }
+
+       OO.mfExtend( CollectionsList, View, {
                /**
                 * @inheritdoc
                 * @cfg {Object} defaults Default options hash.
@@ -30,19 +46,6 @@
                templatePartials: {
                        item: mw.template.get( 'ext.gather.collections.list', 
'CollectionsListItemCard.hogan' ),
                        image: mw.template.get( 'ext.gather.collections.list', 
'CardImage.hogan' )
-               },
-               /** @inheritdoc */
-               initialize: function ( options ) {
-                       View.prototype.initialize.apply( this, arguments );
-                       // After the initial render initialize the infinite 
scrolling.
-                       this.$pagination = this.$el.find( 
'.collections-pagination' );
-                       if ( this.$pagination.length ) {
-                               this._replacePaginationControls();
-                               this.gateway = new CollectionsGateway( 
options.api );
-                               this.infiniteScroll = new InfiniteScroll();
-                               this.infiniteScroll.setElement( this.$el );
-                               this.infiniteScroll.on( 'load', $.proxy( this, 
'_loadCollections' ) );
-                       }
                },
                /** @inheritdoc */
                postRender: function () {
diff --git a/resources/ext.gather.collections.list/CreateCollectionButton.js 
b/resources/ext.gather.collections.list/CreateCollectionButton.js
index e92eaaf..dd4e3a8 100644
--- a/resources/ext.gather.collections.list/CreateCollectionButton.js
+++ b/resources/ext.gather.collections.list/CreateCollectionButton.js
@@ -2,15 +2,17 @@
 
        var CollectionEditOverlay = M.require( 
'ext.gather.collection.edit/CollectionEditOverlay' ),
                Button = M.require( 'mobile.startup/Button' ),
-               Icon = M.require( 'mobile.startup/Icon' ),
-               CreateCollectionButton;
+               Icon = M.require( 'mobile.startup/Icon' );
 
        /**
         * A button used to create a collection
         * @class CreateCollectionButton
         * @extends Button
         */
-       CreateCollectionButton = Button.extend( {
+       function CreateCollectionButton() {
+               Button.apply( this, arguments );
+       }
+       OO.mfExtend( CreateCollectionButton, Button, {
                /**
                 * @inheritdoc
                 * @cfg {Object} defaults Default options hash.
diff --git a/resources/ext.gather.logging/SchemaGather.js 
b/resources/ext.gather.logging/SchemaGather.js
index 80cdff5..4d92048 100644
--- a/resources/ext.gather.logging/SchemaGather.js
+++ b/resources/ext.gather.logging/SchemaGather.js
@@ -1,6 +1,5 @@
 ( function ( M, $ ) {
-       var SchemaGather,
-               skinName = mw.config.get( 'skin' ),
+       var skinName = mw.config.get( 'skin' ),
                context = M.require( 'mobile.context/context' ),
                mobileMode = context.getMode(),
                Schema = M.require( 'mobile.startup/Schema' ),
@@ -13,7 +12,11 @@
         * @class SchemaGather
         * @extends Schema
         */
-       SchemaGather = Schema.extend( {
+       function SchemaGather( options ) {
+               Schema.call( this, options );
+       }
+
+       OO.mfExtend( SchemaGather, Schema, {
                /**
                 * @inheritdoc
                 */
diff --git a/resources/ext.gather.logging/SchemaGatherFlags.js 
b/resources/ext.gather.logging/SchemaGatherFlags.js
index 4c08e18..1615fc4 100644
--- a/resources/ext.gather.logging/SchemaGatherFlags.js
+++ b/resources/ext.gather.logging/SchemaGatherFlags.js
@@ -1,13 +1,16 @@
 ( function ( M, $ ) {
-       var SchemaGatherFlags,
-               Schema = M.require( 'mobile.startup/Schema' ),
+       var Schema = M.require( 'mobile.startup/Schema' ),
                user = M.require( 'mobile.user/user' );
 
        /**
         * @class SchemaGatherFlags
         * @extends Schema
         */
-       SchemaGatherFlags = Schema.extend( {
+       function SchemaGatherFlags( options ) {
+               Schema.call( this, options );
+       }
+
+       OO.mfExtend( SchemaGatherFlags, Schema, {
                /**
                 * @inheritdoc
                 */
diff --git a/resources/ext.gather.page.search/CollectionPageList.js 
b/resources/ext.gather.page.search/CollectionPageList.js
index e997de1..d44a18e 100644
--- a/resources/ext.gather.page.search/CollectionPageList.js
+++ b/resources/ext.gather.page.search/CollectionPageList.js
@@ -2,8 +2,7 @@
 
        var PageList = M.require( 'mobile.pagelist/PageList' ),
                Page = M.require( 'mobile.startup/Page' ),
-               Icon = M.require( 'mobile.startup/Icon' ),
-               CollectionPageList;
+               Icon = M.require( 'mobile.startup/Icon' );
 
        /**
         * List of items page view
@@ -13,7 +12,13 @@
         * @uses Watchstar
         * @extends View
         */
-       CollectionPageList = PageList.extend( {
+       function CollectionPageList( options ) {
+               this._removals = [];
+               this._additions = [];
+               PageList.call( this, options );
+               this.collectionGateway = options.collectionGateway;
+       }
+       OO.mfExtend( CollectionPageList, PageList, {
                /**
                 * @inheritdoc
                 * @cfg {CollectionsGateway} defaults.collectionGateway
@@ -39,13 +44,6 @@
                /** @inheritdoc */
                templatePartials: {
                        item: mw.template.get( 'ext.gather.page.search', 
'item.hogan' )
-               },
-               /** @inheritdoc */
-               initialize: function ( options ) {
-                       this._removals = [];
-                       this._additions = [];
-                       PageList.prototype.initialize.apply( this, arguments );
-                       this.collectionGateway = options.collectionGateway;
                },
                /**
                 * Event handler for when a member changes status in the 
collection
diff --git a/resources/ext.gather.page.search/CollectionSearchPanel.js 
b/resources/ext.gather.page.search/CollectionSearchPanel.js
index 746d3e2..3ab999c 100644
--- a/resources/ext.gather.page.search/CollectionSearchPanel.js
+++ b/resources/ext.gather.page.search/CollectionSearchPanel.js
@@ -5,8 +5,7 @@
                CollectionsGateway = M.require( 
'ext.gather.api/CollectionsGateway' ),
                SearchGateway = M.require( 'mobile.search.api/SearchGateway' ),
                SEARCH_DELAY = 200,
-               CollectionPageList = M.require( 
'ext.gather.page.search/CollectionPageList' ),
-               CollectionSearchPanel;
+               CollectionPageList = M.require( 
'ext.gather.page.search/CollectionPageList' );
 
        /**
         * Class for a showing page search results in a panel
@@ -14,7 +13,11 @@
         * @extends Panel
         * @uses CollectionPageList
         */
-       CollectionSearchPanel = Panel.extend( {
+       function CollectionSearchPanel() {
+               Panel.apply( this, arguments );
+       }
+
+       OO.mfExtend( CollectionSearchPanel, Panel, {
                /** @inheritdoc */
                template: mw.template.get( 'ext.gather.page.search', 
'CollectionSearchPanel.hogan' ),
                /** @inheritdoc */
diff --git a/resources/ext.gather.relatedpages/RelatedPages.js 
b/resources/ext.gather.relatedpages/RelatedPages.js
index c4b62a1..e9aab80 100644
--- a/resources/ext.gather.relatedpages/RelatedPages.js
+++ b/resources/ext.gather.relatedpages/RelatedPages.js
@@ -5,15 +5,23 @@
                View = M.require( 'mobile.view/View' ),
                Page = M.require( 'mobile.startup/Page' ),
                CollectionPageList = M.require( 
'ext.gather.page.search/CollectionPageList' ),
-               icons = M.require( 'mobile.startup/icons' ),
-               RelatedPages;
+               icons = M.require( 'mobile.startup/icons' );
 
        /**
         * @class RelatedPages
         * @extends View
         * @uses CollectionPageList
         */
-       RelatedPages = View.extend( {
+       function RelatedPages( options ) {
+               this.relatedGateway = new RelatedPagesGateway( options.api );
+               this.collectionGateway = new CollectionsGateway( options.api );
+               this.relatedPages = [];
+               this.pageList = null;
+               this._loading = true;
+               View.call( this, options );
+               this.search().then( $.proxy( this, 'postRender' ) );
+       }
+       OO.mfExtend( RelatedPages, View, {
                className: 'related-pages',
                /**
                 * @inheritdoc
@@ -26,16 +34,6 @@
                        heading: mw.msg( 'gather-edit-collection-related-pages' 
)
                },
                template: mw.template.get( 'ext.gather.relatedpages', 
'relatedpages.hogan' ),
-               /** @inheritdoc */
-               initialize: function ( options ) {
-                       this.relatedGateway = new RelatedPagesGateway( 
options.api );
-                       this.collectionGateway = new CollectionsGateway( 
options.api );
-                       this.relatedPages = [];
-                       this.pageList = null;
-                       this._loading = true;
-                       View.prototype.initialize.apply( this, arguments );
-                       this.search().then( $.proxy( this, 'postRender' ) );
-               },
                /** @inheritdoc */
                postRender: function () {
                        var self = this,
diff --git a/resources/ext.gather.toastpanel/ToastPanel.js 
b/resources/ext.gather.toastpanel/ToastPanel.js
index eb983da..5316b3c 100644
--- a/resources/ext.gather.toastpanel/ToastPanel.js
+++ b/resources/ext.gather.toastpanel/ToastPanel.js
@@ -1,8 +1,7 @@
 /*jshint unused:vars */
 ( function ( M, $ ) {
 
-       var ToastPanel,
-               Button = M.require( 'mobile.startup/Button' ),
+       var Button = M.require( 'mobile.startup/Button' ),
                Panel = M.require( 'mobile.startup/Panel' );
 
        /**
@@ -11,7 +10,11 @@
         * @class ToastPanel
         * @extends Panel
         */
-       ToastPanel = Panel.extend( {
+       function ToastPanel( options ) {
+               Panel.call( this, options );
+       }
+
+       OO.mfExtend( ToastPanel, Panel, {
                className: 'panel view-border-box drawer position-fixed 
toast-panel',
                template: mw.template.get( 'ext.gather.toastpanel', 
'ToastPanel.hogan' ),
                templatePartials: {
diff --git a/resources/ext.gather.watchstar/CollectionsWatchstar.js 
b/resources/ext.gather.watchstar/CollectionsWatchstar.js
index 940f181..01ec1df 100644
--- a/resources/ext.gather.watchstar/CollectionsWatchstar.js
+++ b/resources/ext.gather.watchstar/CollectionsWatchstar.js
@@ -1,8 +1,7 @@
 // jscs:disable requireCamelCaseOrUpperCaseIdentifiers
 ( function ( M ) {
 
-       var CollectionsWatchstar,
-               SchemaGather = M.require( 'ext.gather.logging/SchemaGather' ),
+       var SchemaGather = M.require( 'ext.gather.logging/SchemaGather' ),
                schema = new SchemaGather(),
                CtaDrawer = M.require( 'mobile.drawers/CtaDrawer' ),
                CollectionsContentOverlay = M.require( 
'ext.gather.watchstar/CollectionsContentOverlay' ),
@@ -24,7 +23,11 @@
         * @class CollectionsWatchstar
         * @extends View
         */
-       CollectionsWatchstar = View.extend( {
+       function CollectionsWatchstar( options ) {
+               View.call( this, options );
+       }
+
+       OO.mfExtend( CollectionsWatchstar, View, {
                /**
                 * @inheritdoc
                 */
diff --git a/resources/ext.gather.watchstar/Tag.js 
b/resources/ext.gather.watchstar/Tag.js
index 7cb14fe..95dd6df 100644
--- a/resources/ext.gather.watchstar/Tag.js
+++ b/resources/ext.gather.watchstar/Tag.js
@@ -1,15 +1,18 @@
 // jscs:disable requireCamelCaseOrUpperCaseIdentifiers
 ( function ( M ) {
 
-       var Tag,
-               View = M.require( 'mobile.view/View' );
+       var View = M.require( 'mobile.view/View' );
 
        /**
         * A tag with a label
         * @class Tag
         * @extends View
         */
-       Tag = View.extend( {
+       function Tag() {
+               View.call( this );
+       }
+
+       OO.mfExtend( Tag, View, {
                className: 'gather-tag',
                template: mw.template.get( 'ext.gather.watchstar', 'Tag.hogan' )
        } );
diff --git a/resources/ext.gather.watchstar/WatchstarPageActionOverlay.js 
b/resources/ext.gather.watchstar/WatchstarPageActionOverlay.js
index 283a2f7..ce940c3 100644
--- a/resources/ext.gather.watchstar/WatchstarPageActionOverlay.js
+++ b/resources/ext.gather.watchstar/WatchstarPageActionOverlay.js
@@ -2,10 +2,17 @@
        var
                SchemaGather = M.require( 'ext.gather.logging/SchemaGather' ),
                schema = new SchemaGather(),
-               PageActionOverlay = M.require( 
'mobile.contentOverlays/PointerOverlay' ),
-               WatchstarPageActionOverlay;
+               PageActionOverlay = M.require( 
'mobile.contentOverlays/PointerOverlay' );
 
-       WatchstarPageActionOverlay = PageActionOverlay.extend( {
+       /**
+        * @class WatchstarPageActionOverlay
+        * @extends PageActionOverlay
+        */
+       function WatchstarPageActionOverlay() {
+               PageActionOverlay.call( this );
+       }
+
+       OO.mfExtend( WatchstarPageActionOverlay, PageActionOverlay, {
                className: PageActionOverlay.prototype.className + ' slide 
active editing',
                events: $.extend( {}, PageActionOverlay.prototype.events, {
                        'click .cancel': 'onCancelClick',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9363c4d23bde8caf0541fd0dfb13abe15b6583e3
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: dev
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Jhernandez <[email protected]>
Gerrit-Reviewer: Sumit <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to