Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5967096
ve.init.MWWelcomeDialog.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
ve.init.MWWelcomeDialog.js
View Options
/*!
* VisualEditor user interface MWWelcomeDialog class.
*
* @copyright See AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
mw
.
libs
.
ve
=
mw
.
libs
.
ve
||
{};
/**
* Dialog for welcoming new users.
*
* @class
* @extends OO.ui.MessageDialog
*
* @constructor
* @param {Object} [config] Configuration options
*/
mw
.
libs
.
ve
.
WelcomeDialog
=
function
VeInitWelcomeDialog
(
config
)
{
// Parent constructor
mw
.
libs
.
ve
.
WelcomeDialog
.
super
.
call
(
this
,
config
);
this
.
$element
.
addClass
(
've-init-mw-welcomeDialog'
);
};
/* Inheritance */
OO
.
inheritClass
(
mw
.
libs
.
ve
.
WelcomeDialog
,
OO
.
ui
.
MessageDialog
);
/* Static Properties */
mw
.
libs
.
ve
.
WelcomeDialog
.
static
.
name
=
'welcome'
;
mw
.
libs
.
ve
.
WelcomeDialog
.
static
.
size
=
'medium'
;
mw
.
libs
.
ve
.
WelcomeDialog
.
static
.
actions
=
[
{
action
:
'switch-wte'
,
label
:
OO
.
ui
.
deferMsg
(
'visualeditor-welcomedialog-switch'
),
modes
:
[
'visual'
]
},
{
action
:
'switch-ve'
,
label
:
OO
.
ui
.
deferMsg
(
'visualeditor-welcomedialog-switch-ve'
),
modes
:
[
'source'
]
},
{
action
:
'accept'
,
label
:
OO
.
ui
.
deferMsg
(
'visualeditor-welcomedialog-action'
),
flags
:
[
'progressive'
,
'primary'
],
modes
:
[
'visual'
,
'source'
,
'noswitch'
]
}
];
/**
* @inheritdoc
*/
mw
.
libs
.
ve
.
WelcomeDialog
.
prototype
.
getSetupProcess
=
function
(
data
)
{
// Provide default title and message
data
=
$
.
extend
(
{
title
:
mw
.
msg
(
'visualeditor-welcomedialog-title'
,
mw
.
user
,
mw
.
config
.
get
(
'wgSiteName'
)
),
message
:
$
(
'<span>'
)
.
addClass
(
've-init-mw-welcomeDialog-content'
)
.
append
(
$
(
document
.
createTextNode
(
mw
.
msg
(
'visualeditor-welcomedialog-content'
)
)
),
$
(
'<br>'
),
$
(
document
.
createTextNode
(
mw
.
msg
(
'visualeditor-welcomedialog-content-thanks'
)
)
)
)
},
data
);
return
mw
.
libs
.
ve
.
WelcomeDialog
.
super
.
prototype
.
getSetupProcess
.
call
(
this
,
data
)
.
next
(
()
=>
{
this
.
switchable
=
data
.
switchable
;
this
.
editor
=
data
.
editor
;
this
.
actions
.
setMode
(
this
.
switchable
?
this
.
editor
:
'noswitch'
);
}
);
};
/**
* @inheritdoc
*/
mw
.
libs
.
ve
.
WelcomeDialog
.
prototype
.
getActionProcess
=
function
(
action
)
{
if
(
action
===
'switch-wte'
)
{
return
new
OO
.
ui
.
Process
(
()
=>
{
this
.
close
(
{
action
:
'switch-wte'
}
);
}
);
}
// Parent method
return
mw
.
libs
.
ve
.
WelcomeDialog
.
super
.
prototype
.
getActionProcess
.
call
(
this
,
action
);
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 3, 12:08 (3 d, 13 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
74/6c/b3ed46add6a39a887743246e934e
Default Alt Text
ve.init.MWWelcomeDialog.js (2 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment