Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4107342
WatchlistTopSectionWidget.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
WatchlistTopSectionWidget.js
View Options
const
MarkSeenButtonWidget
=
require
(
'./MarkSeenButtonWidget.js'
);
/**
* Top section (between page title and filters) on Special:Watchlist.
*
* @class mw.rcfilters.ui.WatchlistTopSectionWidget
* @ignore
* @extends OO.ui.Widget
*
* @param {mw.rcfilters.Controller} controller
* @param {mw.rcfilters.dm.ChangesListViewModel} changesListModel
* @param {mw.rcfilters.ui.SavedLinksListWidget} savedLinksListWidget
* @param {jQuery} $watchlistDetails Content of the 'details' section that includes watched pages count
* @param {Object} [config] Configuration object
*/
const
WatchlistTopSectionWidget
=
function
MwRcfiltersUiWatchlistTopSectionWidget
(
controller
,
changesListModel
,
savedLinksListWidget
,
$watchlistDetails
,
config
)
{
config
=
config
||
{};
// Parent
WatchlistTopSectionWidget
.
super
.
call
(
this
,
config
);
const
editWatchlistButton
=
new
OO
.
ui
.
ButtonWidget
(
{
label
:
mw
.
msg
(
'rcfilters-watchlist-edit-watchlist-button'
),
icon
:
'edit'
,
href
:
require
(
'../config.json'
).
StructuredChangeFiltersEditWatchlistUrl
}
);
const
markSeenButton
=
new
MarkSeenButtonWidget
(
controller
,
changesListModel
);
const
$topTable
=
$
(
'<div>'
)
.
addClass
(
'mw-rcfilters-ui-table'
)
.
append
(
$
(
'<div>'
)
.
addClass
(
'mw-rcfilters-ui-row'
)
.
append
(
$
(
'<div>'
)
.
addClass
(
'mw-rcfilters-ui-cell'
)
.
addClass
(
'mw-rcfilters-ui-watchlistTopSectionWidget-watchlistDetails'
)
.
append
(
$watchlistDetails
)
)
.
append
(
$
(
'<div>'
)
.
addClass
(
'mw-rcfilters-ui-cell'
)
.
addClass
(
'mw-rcfilters-ui-watchlistTopSectionWidget-editWatchlistButton'
)
.
append
(
editWatchlistButton
.
$element
)
)
);
const
$bottomTable
=
$
(
'<div>'
)
.
addClass
(
'mw-rcfilters-ui-table'
)
.
addClass
(
'mw-rcfilters-ui-watchlistTopSectionWidget-savedLinksTable'
)
.
append
(
$
(
'<div>'
)
.
addClass
(
'mw-rcfilters-ui-row'
)
.
append
(
$
(
'<div>'
)
.
addClass
(
'mw-rcfilters-ui-cell'
)
.
append
(
markSeenButton
.
$element
)
)
.
append
(
$
(
'<div>'
)
.
addClass
(
'mw-rcfilters-ui-cell'
)
.
addClass
(
'mw-rcfilters-ui-watchlistTopSectionWidget-savedLinks'
)
.
append
(
savedLinksListWidget
.
$element
)
)
);
const
$separator
=
$
(
'<div>'
)
.
addClass
(
'mw-rcfilters-ui-watchlistTopSectionWidget-separator'
);
this
.
$element
.
addClass
(
'mw-rcfilters-ui-watchlistTopSectionWidget'
)
.
append
(
$topTable
,
$separator
,
$bottomTable
);
};
/* Initialization */
OO
.
inheritClass
(
WatchlistTopSectionWidget
,
OO
.
ui
.
Widget
);
module
.
exports
=
WatchlistTopSectionWidget
;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Aug 18, 20:00 (2 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
a3/ea/27a76159952a090f854c471033e7
Default Alt Text
WatchlistTopSectionWidget.js (2 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment