2015-08-05 21:43:23 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor UserInterface MWMobileSaveDialog class.
|
|
|
|
*
|
2020-01-08 17:13:04 +00:00
|
|
|
* @copyright 2011-2020 VisualEditor Team and others; 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
|
|
|
|
|
|
|
if ( mw.mobileFrontend ) {
|
2022-02-21 18:07:07 +00:00
|
|
|
var mobile = mw.mobileFrontend.require( 'mobile.startup' );
|
|
|
|
var skin = mobile.Skin.getSingleton();
|
|
|
|
var licenseMsg = skin.getLicenseMsg();
|
2019-08-01 14:45:42 +00:00
|
|
|
if ( licenseMsg ) {
|
2021-11-15 17:03:35 +00:00
|
|
|
// eslint-disable-next-line no-jquery/no-html
|
2019-08-01 14:45:42 +00:00
|
|
|
this.$license.html( licenseMsg );
|
|
|
|
}
|
|
|
|
}
|
2016-10-31 17:17:50 +00:00
|
|
|
};
|
|
|
|
|
2015-08-05 21:43:23 +00:00
|
|
|
/* Registration */
|
|
|
|
|
|
|
|
ve.ui.windowFactory.register( ve.ui.MWMobileSaveDialog );
|