2015-08-05 21:43:23 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor UserInterface MWMobileSaveDialog class.
|
|
|
|
*
|
2023-12-01 16:06:11 +00:00
|
|
|
* @copyright See AUTHORS.txt
|
2015-08-05 21:43:23 +00:00
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Dialog for saving MediaWiki pages in mobile.
|
|
|
|
*
|
2016-06-30 14:01:24 +00:00
|
|
|
* TODO: Currently this does no overriding so could be removed, but we may want
|
|
|
|
* to customise the mobile save dialog in the near future.
|
2015-08-05 21:43:23 +00:00
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @extends ve.ui.MWSaveDialog
|
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
* @param {Object} [config] Config options
|
|
|
|
*/
|
2016-06-30 14:01:24 +00:00
|
|
|
ve.ui.MWMobileSaveDialog = function VeUiMwMobileSaveDialog() {
|
2015-08-05 21:43:23 +00:00
|
|
|
// Parent constructor
|
2016-06-30 14:01:24 +00:00
|
|
|
ve.ui.MWMobileSaveDialog.super.apply( this, arguments );
|
2015-08-05 21:43:23 +00:00
|
|
|
|
|
|
|
// Initialization
|
|
|
|
this.$element.addClass( 've-ui-mwMobileSaveDialog' );
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
OO.inheritClass( ve.ui.MWMobileSaveDialog, ve.ui.MWSaveDialog );
|
|
|
|
|
2016-10-31 17:17:50 +00:00
|
|
|
/* Methods */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @inheritdoc
|
|
|
|
*/
|
|
|
|
ve.ui.MWMobileSaveDialog.prototype.initialize = function () {
|
|
|
|
// Parent method
|
|
|
|
ve.ui.MWMobileSaveDialog.super.prototype.initialize.call( this );
|
|
|
|
|
|
|
|
this.$reviewVisualDiff.addClass( 'content' );
|
2022-02-22 00:23:35 +00:00
|
|
|
this.previewPanel.$element.addClass( 'content' );
|
2019-08-01 14:45:42 +00:00
|
|
|
|
2023-12-01 17:50:06 +00:00
|
|
|
var mobileStartupModuleStatus = mw.loader.getState( 'mobile.startup' );
|
|
|
|
if ( mobileStartupModuleStatus && mobileStartupModuleStatus !== 'registered' ) {
|
|
|
|
mw.loader.using( 'mobile.startup' ).then( function ( req ) {
|
|
|
|
var licenseMsg = req( 'mobile.startup' ).license();
|
|
|
|
if ( licenseMsg ) {
|
|
|
|
// eslint-disable-next-line no-jquery/no-html
|
|
|
|
this.$license.html( licenseMsg );
|
|
|
|
}
|
|
|
|
} );
|
2019-08-01 14:45:42 +00:00
|
|
|
}
|
2016-10-31 17:17:50 +00:00
|
|
|
};
|
|
|
|
|
2015-08-05 21:43:23 +00:00
|
|
|
/* Registration */
|
|
|
|
|
|
|
|
ve.ui.windowFactory.register( ve.ui.MWMobileSaveDialog );
|