Create empty undo/redo functions
[MAILPOET-1976]
This commit is contained in:
@@ -12,6 +12,11 @@ Module.HistoryView = Marionette.View.extend({
|
||||
undo: null,
|
||||
},
|
||||
|
||||
events: {
|
||||
'click #mailpoet-history-arrow-undo': 'undo',
|
||||
'click #mailpoet-history-arrow-redo': 'redo',
|
||||
},
|
||||
|
||||
model: {
|
||||
states: [], // from newest
|
||||
currentStateIndex: 0,
|
||||
@@ -52,6 +57,18 @@ Module.HistoryView = Marionette.View.extend({
|
||||
return this.model.currentStateIndex !== 0;
|
||||
},
|
||||
|
||||
undo: function undo() {
|
||||
if (!this.canUndo()) {
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
redo: function redo() {
|
||||
if (!this.canRedo()) {
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
updateArrowsUI: function updateArrowsUI() {
|
||||
this.elements.undo.addClass('mailpoet_history_arrow_inactive');
|
||||
this.elements.redo.addClass('mailpoet_history_arrow_inactive');
|
||||
|
Reference in New Issue
Block a user