Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4133431
mediawiki.special.contributions.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
mediawiki.special.contributions.js
View Options
(
function
()
{
// Return a promise that is resolved when the element is blurred (loses focus).
// If it already is blurred, resolved immediately.
function
whenBlurred
(
$elem
)
{
const
deferred
=
$
.
Deferred
();
if
(
$elem
.
is
(
':focus'
)
)
{
$elem
.
one
(
'blur'
,
deferred
.
resolve
);
}
else
{
deferred
.
resolve
();
}
return
deferred
.
promise
();
}
$
(
()
=>
{
// Do not infuse the date input while it has user focus.
// This is especially important on Firefox, where hiding the native date input while the native
// date picker is open will cause the date picker to remain visible (but non-functional), but
// not replacing the interface while the user is working with it is probably a good idea anyway.
const
startReady
=
whenBlurred
(
$
(
'#mw-date-start .oo-ui-inputWidget-input'
)
).
then
(
()
=>
mw
.
widgets
.
DateInputWidget
.
static
.
infuse
(
$
(
'#mw-date-start'
)
)
);
const
endReady
=
whenBlurred
(
$
(
'#mw-date-end .oo-ui-inputWidget-input'
)
).
then
(
()
=>
mw
.
widgets
.
DateInputWidget
.
static
.
infuse
(
$
(
'#mw-date-end'
)
)
);
$
.
when
(
startReady
,
endReady
).
then
(
(
startInput
,
endInput
)
=>
{
startInput
.
on
(
'deactivate'
,
(
userSelected
)
=>
{
if
(
userSelected
)
{
endInput
.
focus
();
}
}
);
}
);
}
);
}()
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 19, 12:08 (3 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
e8/34/fe2bcb7680a1b983ae2efaac2e3d
Default Alt Text
mediawiki.special.contributions.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment