2 * MediaWiki Widgets - AbandonEditDialog class.
4 * @copyright 2011-2018 VisualEditor Team and others; see AUTHORS.txt
5 * @license The MIT License (MIT); see LICENSE.txt
9 * Confirm dialog shown when the users is leaving an editor without saving
12 * @extends OO.ui.MessageDialog
15 * @param {Object} [config] Configuration options
17 mw
.widgets
.AbandonEditDialog
= function VeUiAbandonEditDialog( config
) {
19 mw
.widgets
.AbandonEditDialog
.super.call( this, config
);
24 OO
.inheritClass( mw
.widgets
.AbandonEditDialog
, OO
.ui
.MessageDialog
);
26 /* Static Properties */
28 mw
.widgets
.AbandonEditDialog
.static.name
= 'abandonedit';
30 mw
.widgets
.AbandonEditDialog
.static.title
=
31 OO
.ui
.deferMsg( 'mw-widgets-abandonedit-title' );
33 mw
.widgets
.AbandonEditDialog
.static.message
=
34 OO
.ui
.deferMsg( 'mw-widgets-abandonedit' );
36 mw
.widgets
.AbandonEditDialog
.static.actions
= [
37 { action
: 'discard', label
: OO
.ui
.deferMsg( 'mw-widgets-abandonedit-discard' ), flags
: [ 'primary', 'destructive' ] },
38 { action
: 'keep', label
: OO
.ui
.deferMsg( 'mw-widgets-abandonedit-keep' ), flags
: 'safe' }