mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
42ebd10090
I ran Closure Compiler over the codebase just to see what would happen, and it printed some useful warnings. Change-Id: I56d40b11e6d1dd7ce68a5e59da511f66e928647f
44 lines
1.3 KiB
JavaScript
44 lines
1.3 KiB
JavaScript
/*!
|
|
* VisualEditor user interface MWCancelConfirmDialog class.
|
|
*
|
|
* @copyright 2011-2018 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* Dialog for letting the user choose how to switch to wikitext mode.
|
|
*
|
|
* @class
|
|
* @extends OO.ui.MessageDialog
|
|
*
|
|
* @constructor
|
|
* @param {Object} [config] Configuration options
|
|
*/
|
|
ve.ui.MWCancelConfirmDialog = function VeUiMWCancelConfirmDialog( config ) {
|
|
// Parent constructor
|
|
ve.ui.MWCancelConfirmDialog.super.call( this, config );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
OO.inheritClass( ve.ui.MWCancelConfirmDialog, OO.ui.MessageDialog );
|
|
|
|
/* Static Properties */
|
|
|
|
ve.ui.MWCancelConfirmDialog.static.name = 'cancelconfirm';
|
|
|
|
ve.ui.MWCancelConfirmDialog.static.title =
|
|
OO.ui.deferMsg( 'visualeditor-viewpage-savewarning-title' );
|
|
|
|
ve.ui.MWCancelConfirmDialog.static.message =
|
|
OO.ui.deferMsg( 'visualeditor-viewpage-savewarning' );
|
|
|
|
ve.ui.MWCancelConfirmDialog.static.actions = [
|
|
{ action: 'discard', label: OO.ui.deferMsg( 'visualeditor-viewpage-savewarning-discard' ), flags: [ 'primary', 'destructive' ] },
|
|
{ action: 'keep', label: OO.ui.deferMsg( 'visualeditor-viewpage-savewarning-keep' ), flags: 'safe' }
|
|
];
|
|
|
|
/* Registration */
|
|
|
|
ve.ui.windowFactory.register( ve.ui.MWCancelConfirmDialog );
|