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
|
2014-07-14 21:32:49 +00:00
|
|
|
* @param {OO.ui.WindowManager} manager Manager of window
|
2013-09-25 10:21:09 +00:00
|
|
|
* @param {Object} [config] Configuration options
|
2013-08-01 20:18:33 +00:00
|
|
|
*/
|
2014-07-14 21:32:49 +00:00
|
|
|
ve.ui.MWBetaWelcomeDialog = function VeUiMWBetaWelcomeDialog( manager, config ) {
|
2013-08-01 20:18:33 +00:00
|
|
|
// Parent constructor
|
2014-07-14 21:32:49 +00:00
|
|
|
ve.ui.MWBetaWelcomeDialog.super.call( this, manager, 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 = [
|
|
|
|
{
|
|
|
|
'label': OO.ui.deferMsg( 'visualeditor-dialog-beta-welcome-action-continue' ),
|
|
|
|
'flags': 'primary'
|
|
|
|
}
|
|
|
|
];
|
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( {
|
|
|
|
'title': ve.msg( 'visualeditor-dialog-beta-welcome-title', mw.user ),
|
|
|
|
'message': ve.msg( 'visualeditor-dialog-beta-welcome-content', $( '#ca-edit' ).text() )
|
|
|
|
}, 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 );
|