2014-07-15 22:59:09 +00:00
|
|
|
/*
|
|
|
|
* VisualEditor user interface MWCancelConfirmDialog class.
|
|
|
|
*
|
2018-01-03 00:54:47 +00:00
|
|
|
* @copyright 2011-2018 VisualEditor Team and others; see AUTHORS.txt
|
2014-07-15 22:59:09 +00:00
|
|
|
* @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
|
|
|
|
*/
|
2014-08-21 00:50:54 +00:00
|
|
|
ve.ui.MWCancelConfirmDialog = function VeUiMWCancelConfirmDialog( config ) {
|
2014-07-15 22:59:09 +00:00
|
|
|
// Parent constructor
|
2014-08-21 00:50:54 +00:00
|
|
|
ve.ui.MWCancelConfirmDialog.super.call( this, config );
|
2014-07-15 22:59:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
OO.inheritClass( ve.ui.MWCancelConfirmDialog, OO.ui.MessageDialog );
|
|
|
|
|
|
|
|
/* Static Properties */
|
|
|
|
|
|
|
|
ve.ui.MWCancelConfirmDialog.static.name = 'cancelconfirm';
|
|
|
|
|
|
|
|
ve.ui.MWCancelConfirmDialog.static.verbose = true;
|
|
|
|
|
|
|
|
ve.ui.MWCancelConfirmDialog.static.size = 'small';
|
|
|
|
|
|
|
|
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 = [
|
2014-08-22 20:50:48 +00:00
|
|
|
{ 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' }
|
2014-07-15 22:59:09 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
/* Registration */
|
|
|
|
|
|
|
|
ve.ui.windowFactory.register( ve.ui.MWCancelConfirmDialog );
|