2013-08-01 20:18:33 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor user interface MWBetaWelcomeDialog class.
|
|
|
|
*
|
2014-01-05 12:05:05 +00:00
|
|
|
* @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt
|
2013-08-01 20:18:33 +00:00
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2014-07-14 21:32:49 +00:00
|
|
|
* Dialog for welcoming new users to VisualEditor.
|
2013-08-01 20:18:33 +00:00
|
|
|
*
|
|
|
|
* @class
|
2014-07-14 21:32:49 +00:00
|
|
|
* @extends OO.ui.MessageDialog
|
2013-08-01 20:18:33 +00:00
|
|
|
*
|
|
|
|
* @constructor
|
2013-09-25 10:21:09 +00:00
|
|
|
* @param {Object} [config] Configuration options
|
2013-08-01 20:18:33 +00:00
|
|
|
*/
|
2014-08-21 00:50:54 +00:00
|
|
|
ve.ui.MWBetaWelcomeDialog = function VeUiMWBetaWelcomeDialog( config ) {
|
2013-08-01 20:18:33 +00:00
|
|
|
// Parent constructor
|
2014-08-21 00:50:54 +00:00
|
|
|
ve.ui.MWBetaWelcomeDialog.super.call( this, config );
|
2013-08-01 20:18:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
2014-07-14 21:32:49 +00:00
|
|
|
OO.inheritClass( ve.ui.MWBetaWelcomeDialog, OO.ui.MessageDialog );
|
2013-08-01 20:18:33 +00:00
|
|
|
|
|
|
|
/* Static Properties */
|
|
|
|
|
2013-08-27 23:28:29 +00:00
|
|
|
ve.ui.MWBetaWelcomeDialog.static.name = 'betaWelcome';
|
|
|
|
|
2014-07-14 21:32:49 +00:00
|
|
|
ve.ui.MWBetaWelcomeDialog.static.size = 'medium';
|
|
|
|
|
|
|
|
ve.ui.MWBetaWelcomeDialog.static.verbose = true;
|
2013-08-01 20:18:33 +00:00
|
|
|
|
|
|
|
ve.ui.MWBetaWelcomeDialog.static.icon = 'help';
|
|
|
|
|
2014-07-14 21:32:49 +00:00
|
|
|
ve.ui.MWBetaWelcomeDialog.static.actions = [
|
|
|
|
{
|
2014-08-22 20:50:48 +00:00
|
|
|
label: OO.ui.deferMsg( 'visualeditor-dialog-beta-welcome-action-continue' ),
|
2014-12-11 22:49:51 +00:00
|
|
|
flags: [ 'progressive', 'primary' ]
|
2014-07-14 21:32:49 +00:00
|
|
|
}
|
|
|
|
];
|
2013-08-01 20:18:33 +00:00
|
|
|
|
2013-11-05 00:29:50 +00:00
|
|
|
/**
|
2014-04-24 00:22:45 +00:00
|
|
|
* @inheritdoc
|
2013-11-05 00:29:50 +00:00
|
|
|
*/
|
2014-07-14 21:32:49 +00:00
|
|
|
ve.ui.MWBetaWelcomeDialog.prototype.getSetupProcess = function ( data ) {
|
|
|
|
// Provide default title and message
|
|
|
|
data = $.extend( {
|
2014-08-22 20:50:48 +00:00
|
|
|
title: ve.msg( 'visualeditor-dialog-beta-welcome-title', mw.user ),
|
|
|
|
message: ve.msg( 'visualeditor-dialog-beta-welcome-content', $( '#ca-edit' ).text() )
|
2014-07-14 21:32:49 +00:00
|
|
|
}, data );
|
|
|
|
|
|
|
|
return ve.ui.MWBetaWelcomeDialog.super.prototype.getSetupProcess.call( this, data );
|
2013-08-01 20:18:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Registration */
|
|
|
|
|
2014-04-21 22:31:21 +00:00
|
|
|
ve.ui.windowFactory.register( ve.ui.MWBetaWelcomeDialog );
|