mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 16:44:51 +00:00
cc089d6bd3
It's unnecessary, big and ugly, way too close to an actually useful button, and adds oodles of complexity to the mire that is VPT without significant user benefit whilst taking up an unjustifiably huge amount of the already-over-burdened space. This means that the minimum browser width for English on default Vector to show the toolbar correctly is now 945px, down from 1029px. Bonuses: fix MWCancelConfirmDialog's cancel button to be destructive (it is) and remove a now-recently-fixed comment asking for the save button to be styled using a generic class (provided by the constructive flag). Change-Id: I30dc7020121f0dd6907b61ef674a7cb14eb00652
51 lines
1.5 KiB
JavaScript
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', 'destructive' ] },
|
|
{ 'action': 'keep', 'label': OO.ui.deferMsg( 'visualeditor-viewpage-savewarning-keep' ), 'flags': 'safe' }
|
|
];
|
|
|
|
/* Registration */
|
|
|
|
ve.ui.windowFactory.register( ve.ui.MWCancelConfirmDialog );
|