| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
ve.ui.HistoryAction = function VeUiHistoryAction() { |
| 18 |
|
| 19 |
ve.ui.HistoryAction.super.apply( this, arguments ); |
| 20 |
}; |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
OO.inheritClass( ve.ui.HistoryAction, ve.ui.Action ); |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
ve.ui.HistoryAction.static.name = 'history'; |
| 29 |
|
| 30 |
ve.ui.HistoryAction.static.methods = [ 'undo', 'redo' ]; |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
ve.ui.HistoryAction.prototype.undo = function () { |
| 40 |
this.surface.getModel().undo(); |
| 41 |
return true; |
| 42 |
}; |
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
ve.ui.HistoryAction.prototype.redo = function () { |
| 50 |
this.surface.getModel().redo(); |
| 51 |
return true; |
| 52 |
}; |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
ve.ui.actionFactory.register( ve.ui.HistoryAction ); |