mediawiki-extensions-Visual.../modules/ve-mw/ui/dialogs/ve.ui.MWWikitextConvertConfirmDialog.js
David Lynch 4d263afaa2 ce.MWWikitextSurface: ask on paste about wikitext conversion
Throw a dialog box up to ask whether to convert something with formatting to
wikitext, or downconvert it to plain text.

This logically depends on Ie9aaaa59e9dfa138d394051fe491573253df1805.

Bug: T190079
Change-Id: I6afbbe303d1506426109e75c95f6be546ec48536
Depends-On: Ie9aaaa59e9dfa138d394051fe491573253df1805
2018-05-23 08:08:22 -05:00

44 lines
1.3 KiB
JavaScript

/*
* VisualEditor user interface MWWikitextConvertConfirmDialog 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 whether to convert probable-wikitext
*
* @class
* @extends OO.ui.MessageDialog
*
* @constructor
* @param {Object} [config] Configuration options
*/
ve.ui.MWWikitextConvertConfirmDialog = function VeUiMWWikitextConvertConfirmDialog( config ) {
// Parent constructor
ve.ui.MWWikitextConvertConfirmDialog.super.call( this, config );
};
/* Inheritance */
OO.inheritClass( ve.ui.MWWikitextConvertConfirmDialog, OO.ui.MessageDialog );
/* Static Properties */
ve.ui.MWWikitextConvertConfirmDialog.static.name = 'wikitextconvertconfirm';
ve.ui.MWWikitextConvertConfirmDialog.static.title =
OO.ui.deferMsg( 'visualeditor-wikitextconvert-title' );
ve.ui.MWWikitextConvertConfirmDialog.static.message =
OO.ui.deferMsg( 'visualeditor-wikitextconvert-message' );
ve.ui.MWWikitextConvertConfirmDialog.static.actions = [
{ action: 'convert', label: OO.ui.deferMsg( 'visualeditor-wikitextconvert-convert' ) },
{ action: 'plain', label: OO.ui.deferMsg( 'visualeditor-wikitextconvert-plain' ), flags: [ 'primary', 'progressive' ] }
];
/* Registration */
ve.ui.windowFactory.register( ve.ui.MWWikitextConvertConfirmDialog );