Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1425769
mw.echo.ui.PlaceholderItemWidget.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
mw.echo.ui.PlaceholderItemWidget.js
View Options
(
function
()
{
/**
* Placeholder notification option widget for echo popup.
*
* @class
* @extends OO.ui.Widget
* @mixes OO.ui.mixin.LabelElement
*
* @constructor
* @param {Object} [config] Configuration object
* @param {string} [config.link] A link that this widget leads to.
*/
mw
.
echo
.
ui
.
PlaceholderItemWidget
=
function
MwEchoUiPlaceholderItemWidget
(
config
)
{
config
=
config
||
{};
// Parent constructor
mw
.
echo
.
ui
.
PlaceholderItemWidget
.
super
.
call
(
this
,
Object
.
assign
(
{
data
:
null
},
config
)
);
// Mixin constructor
OO
.
ui
.
mixin
.
LabelElement
.
call
(
this
,
config
);
this
.
$element
.
addClass
(
'mw-echo-ui-placeholderItemWidget'
);
this
.
setLink
(
config
.
link
);
};
OO
.
inheritClass
(
mw
.
echo
.
ui
.
PlaceholderItemWidget
,
OO
.
ui
.
Widget
);
OO
.
mixinClass
(
mw
.
echo
.
ui
.
PlaceholderItemWidget
,
OO
.
ui
.
mixin
.
LabelElement
);
/**
* Set (or unset) the main link url for this widget
*
* @param {string} [url] The widget url
*/
mw
.
echo
.
ui
.
PlaceholderItemWidget
.
prototype
.
setLink
=
function
(
url
)
{
if
(
url
)
{
const
$link
=
$
(
'<a>'
)
.
addClass
(
'mw-echo-ui-placeholderItemWidget-link'
)
.
attr
(
'href'
,
url
);
this
.
$element
.
html
(
$link
.
append
(
this
.
$label
)
);
}
else
{
this
.
$element
.
html
(
this
.
$label
);
}
};
/**
* Return false on 'isRead' call for the notification list
* sorting.
*
* @return {boolean} false
*/
mw
.
echo
.
ui
.
PlaceholderItemWidget
.
prototype
.
isRead
=
function
()
{
return
false
;
};
/**
* Return false on 'isForeign' call for the notification list
* sorting.
*
* @return {boolean} false
*/
mw
.
echo
.
ui
.
PlaceholderItemWidget
.
prototype
.
isForeign
=
function
()
{
return
false
;
};
/**
* Return 0 on getTimestamp call for the notification list
* sorting.
*
* @return {number} 0
*/
mw
.
echo
.
ui
.
PlaceholderItemWidget
.
prototype
.
getTimestamp
=
function
()
{
return
0
;
};
/**
* Return 0 on getId call for the notification list
* sorting.
*
* @return {number} 0
*/
mw
.
echo
.
ui
.
PlaceholderItemWidget
.
prototype
.
getId
=
function
()
{
return
0
;
};
/**
* Do nothing for resetInitiallyUnseen since it is requested by the list widget
*/
mw
.
echo
.
ui
.
PlaceholderItemWidget
.
prototype
.
resetInitiallyUnseen
=
function
()
{};
}()
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 16, 11:58 (17 h, 8 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
93/51/139fd3f28657864091b6cbb58cab
Default Alt Text
mw.echo.ui.PlaceholderItemWidget.js (2 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment