Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5953727
dt.ce.PingNode.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
dt.ce.PingNode.js
View Options
/**
* PingNode view.
*
* @class
* @extends ve.ce.LeafNode
* @mixes ve.ce.FocusableNode
*
* @constructor
* @param {DmMWPingNode} model Model to observe
* @param {Object} [config] Configuration options
*/
function
CeMWPingNode
()
{
// Parent constructor
CeMWPingNode
.
super
.
apply
(
this
,
arguments
);
// Mixin constructor
ve
.
ce
.
FocusableNode
.
call
(
this
);
}
/* Inheritance */
OO
.
inheritClass
(
CeMWPingNode
,
ve
.
ce
.
LeafNode
);
OO
.
mixinClass
(
CeMWPingNode
,
ve
.
ce
.
FocusableNode
);
/* Static Properties */
CeMWPingNode
.
static
.
name
=
'mwPing'
;
CeMWPingNode
.
static
.
tagName
=
'span'
;
CeMWPingNode
.
static
.
deleteCommandName
=
'insertAndOpenMWUsernameCompletions'
;
CeMWPingNode
.
static
.
getDescription
=
function
(
model
)
{
return
model
.
getAttribute
(
'user'
);
};
/* Methods */
/**
* @inheritdoc
*/
CeMWPingNode
.
prototype
.
initialize
=
function
()
{
const
model
=
this
.
getModel
(),
prefix
=
mw
.
msg
(
'discussiontools-replywidget-mention-prefix'
),
suffix
=
mw
.
msg
(
'discussiontools-replywidget-mention-suffix'
),
user
=
model
.
getAttribute
(
'user'
),
title
=
mw
.
Title
.
makeTitle
(
mw
.
config
.
get
(
'wgNamespaceIds'
).
user
,
user
);
// Parent method
CeMWPingNode
.
super
.
prototype
.
initialize
.
call
(
this
);
// DOM changes
const
$link
=
$
(
'<a>'
)
.
addClass
(
'ext-discussiontools-ce-mwPingNode'
)
.
attr
(
{
href
:
title
.
getUrl
(),
title
:
user
}
)
.
text
(
model
.
getAttribute
(
'user'
)
);
ve
.
init
.
platform
.
linkCache
.
styleElement
(
title
.
getPrefixedText
(),
$link
);
this
.
$element
.
append
(
prefix
,
$link
,
suffix
);
};
/* Registration */
ve
.
ce
.
nodeFactory
.
register
(
CeMWPingNode
);
File Metadata
Details
Attached
Mime Type
text/x-asm
Expires
Sat, Oct 3, 02:19 (4 w, 1 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b2/36/a7f5a58ddae353333b41e6b8710a
Default Alt Text
dt.ce.PingNode.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment