Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7425912
ve.ui.HistoryCommand.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
ve.ui.HistoryCommand.js
View Options
/*!
* VisualEditor UserInterface HistoryCommand class.
*
* @copyright See AUTHORS.txt
*/
/**
* UserInterface history command.
*
* @class
* @extends ve.ui.Command
*
* @constructor
* @param {string} name
* @param {string} [method]
*/
ve
.
ui
.
HistoryCommand
=
function
VeUiHistoryCommand
(
name
,
method
)
{
method
=
method
||
name
;
// Parent constructor
ve
.
ui
.
HistoryCommand
.
super
.
call
(
this
,
name
,
'history'
,
method
);
this
.
checkMethod
=
{
undo
:
'canUndo'
,
redo
:
'canRedo'
}[
method
];
};
/* Inheritance */
OO
.
inheritClass
(
ve
.
ui
.
HistoryCommand
,
ve
.
ui
.
Command
);
/* Methods */
/**
* @inheritdoc
*/
ve
.
ui
.
HistoryCommand
.
prototype
.
isExecutable
=
function
(
fragment
)
{
const
surface
=
fragment
.
getSurface
();
// Parent method
return
ve
.
ui
.
HistoryCommand
.
super
.
prototype
.
isExecutable
.
apply
(
this
,
arguments
)
&&
surface
[
this
.
checkMethod
]();
};
/* Registration */
ve
.
ui
.
commandRegistry
.
register
(
new
ve
.
ui
.
HistoryCommand
(
'undo'
)
);
ve
.
ui
.
commandRegistry
.
register
(
new
ve
.
ui
.
HistoryCommand
(
'redo'
)
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 22, 08:09 (18 h, 42 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
70/d1/4f8caaa4c6654277e5c21a0c68ad
Default Alt Text
ve.ui.HistoryCommand.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment