Merge "Re-order all meta code to put categories first"

This commit is contained in:
jenkins-bot 2017-01-17 02:39:55 +00:00 committed by Gerrit Code Review
commit 1e32b1d31d

View file

@ -63,12 +63,12 @@ ve.ui.MWMetaDialog.prototype.initialize = function () {
// Properties // Properties
this.panels = new OO.ui.StackLayout(); this.panels = new OO.ui.StackLayout();
this.bookletLayout = new OO.ui.BookletLayout( { outlined: true } ); this.bookletLayout = new OO.ui.BookletLayout( { outlined: true } );
this.categoriesPage = new ve.ui.MWCategoriesPage( 'categories', { $overlay: this.$overlay } );
this.settingsPage = new ve.ui.MWSettingsPage( this.settingsPage = new ve.ui.MWSettingsPage(
'settings', 'settings',
{ $overlay: this.$overlay } { $overlay: this.$overlay }
); );
this.advancedSettingsPage = new ve.ui.MWAdvancedSettingsPage( 'advancedSettings' ); this.advancedSettingsPage = new ve.ui.MWAdvancedSettingsPage( 'advancedSettings' );
this.categoriesPage = new ve.ui.MWCategoriesPage( 'categories', { $overlay: this.$overlay } );
this.languagesPage = new ve.ui.MWLanguagesPage( 'languages' ); this.languagesPage = new ve.ui.MWLanguagesPage( 'languages' );
this.templatesUsedPage = new ve.ui.MWTemplatesUsedPage( 'templatesUsed' ); this.templatesUsedPage = new ve.ui.MWTemplatesUsedPage( 'templatesUsed' );
@ -112,7 +112,7 @@ ve.ui.MWMetaDialog.prototype.getSetupProcess = function ( data ) {
.next( function () { .next( function () {
var surfaceModel = this.getFragment().getSurface(), var surfaceModel = this.getFragment().getSurface(),
selectWidget = this.bookletLayout.outlineSelectWidget, selectWidget = this.bookletLayout.outlineSelectWidget,
visualOnlyPages = [ 'settings', 'advancedSettings', 'categories', 'languages' ], visualOnlyPages = [ 'categories', 'settings', 'advancedSettings', 'languages' ],
isSource = ve.init.target.getSurface().getMode() === 'source'; isSource = ve.init.target.getSurface().getMode() === 'source';
visualOnlyPages.forEach( function ( page ) { visualOnlyPages.forEach( function ( page ) {
@ -144,9 +144,9 @@ ve.ui.MWMetaDialog.prototype.getReadyProcess = function ( data ) {
} }
// Let each page set itself up ('languages' page doesn't need this yet) // Let each page set itself up ('languages' page doesn't need this yet)
this.categoriesPage.setup( surfaceModel.metaList, data );
this.settingsPage.setup( surfaceModel.metaList, data ); this.settingsPage.setup( surfaceModel.metaList, data );
this.advancedSettingsPage.setup( surfaceModel.metaList, data ); this.advancedSettingsPage.setup( surfaceModel.metaList, data );
this.categoriesPage.setup( surfaceModel.metaList, data );
}, this ); }, this );
}; };
@ -158,9 +158,9 @@ ve.ui.MWMetaDialog.prototype.getTeardownProcess = function ( data ) {
return ve.ui.MWMetaDialog.super.prototype.getTeardownProcess.call( this, data ) return ve.ui.MWMetaDialog.super.prototype.getTeardownProcess.call( this, data )
.first( function () { .first( function () {
// Let each page tear itself down ('languages' page doesn't need this yet) // Let each page tear itself down ('languages' page doesn't need this yet)
this.categoriesPage.teardown( { action: data.action } );
this.settingsPage.teardown( { action: data.action } ); this.settingsPage.teardown( { action: data.action } );
this.advancedSettingsPage.teardown( { action: data.action } ); this.advancedSettingsPage.teardown( { action: data.action } );
this.categoriesPage.teardown( { action: data.action } );
}, this ); }, this );
}; };