Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7429290
ve.ui.HistoryAction.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.HistoryAction.js
View Options
/*!
* VisualEditor UserInterface HistoryAction class.
*
* @copyright See AUTHORS.txt
*/
/**
* History action.
*
* @class
* @extends ve.ui.Action
*
* @constructor
* @param {ve.ui.Surface} surface Surface to act on
* @param {string} [source]
*/
ve
.
ui
.
HistoryAction
=
function
VeUiHistoryAction
()
{
// Parent constructor
ve
.
ui
.
HistoryAction
.
super
.
apply
(
this
,
arguments
);
};
/* Inheritance */
OO
.
inheritClass
(
ve
.
ui
.
HistoryAction
,
ve
.
ui
.
Action
);
/* Static Properties */
ve
.
ui
.
HistoryAction
.
static
.
name
=
'history'
;
ve
.
ui
.
HistoryAction
.
static
.
methods
=
[
'undo'
,
'redo'
];
/* Methods */
/**
* Step backwards in time.
*
* @return {boolean} Action was executed
*/
ve
.
ui
.
HistoryAction
.
prototype
.
undo
=
function
()
{
this
.
surface
.
getModel
().
undo
();
return
true
;
};
/**
* Step forwards in time.
*
* @return {boolean} Action was executed
*/
ve
.
ui
.
HistoryAction
.
prototype
.
redo
=
function
()
{
this
.
surface
.
getModel
().
redo
();
return
true
;
};
/* Registration */
ve
.
ui
.
actionFactory
.
register
(
ve
.
ui
.
HistoryAction
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 22, 09:55 (4 h, 34 m ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
aa/5e/46b21acc6507cfe29bd0cfaffe87
Default Alt Text
ve.ui.HistoryAction.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment