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
|
|
|
|
2024-04-30 16:44:25 +00:00
|
|
|
mw.loader.using( 'mobile.startup' ).then( ( req ) => {
|
2024-05-21 14:22:56 +00:00
|
|
|
const licenseMsg = req( 'mobile.startup' ).license();
|
2024-02-27 15:10:05 +00:00
|
|
|
if ( licenseMsg ) {
|
|
|
|
// eslint-disable-next-line no-jquery/no-html
|
2024-05-01 12:32:49 +00:00
|
|
|
this.$license.html( licenseMsg );
|
2024-02-27 15:10:05 +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 );
|