mediawiki-extensions-Visual.../modules/ve-mw/ui/dialogs/ve.ui.MWCancelConfirmDialog.js
Alex Monk 54a1a85e6e Make a message dialog for cancelling VE
Confirm dialog was replaced in refactor, so until this is merged the 'Cancel'
button is broken.

Bug: 68068
Change-Id: I77d1c82bf0d68013eef361174a134860a197cd44
2014-07-16 00:07:24 +01:00

51 lines
1.5 KiB
JavaScript

/*
* VisualEditor user interface MWCancelConfirmDialog class.
*
* @copyright 2011-2014 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 {OO.ui.WindowManager} manager Manager of window
* @param {Object} [config] Configuration options
*/
ve.ui.MWCancelConfirmDialog = function VeUiMWCancelConfirmDialog( manager, config ) {
// Parent constructor
ve.ui.MWCancelConfirmDialog.super.call( this, manager, config );
};
/* 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.icon = 'help';
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' },
{ 'action': 'keep', 'label': OO.ui.deferMsg( 'visualeditor-viewpage-savewarning-keep' ), 'flags': 'safe' }
];
/* Registration */
ve.ui.windowFactory.register( ve.ui.MWCancelConfirmDialog );