Create empty undo/redo functions

[MAILPOET-1976]
This commit is contained in:
Ján Mikláš
2019-05-29 16:20:27 +02:00
committed by M. Shull
parent 04155ab412
commit f73ad4ee3e

View File

@@ -12,6 +12,11 @@ Module.HistoryView = Marionette.View.extend({
undo: null, undo: null,
}, },
events: {
'click #mailpoet-history-arrow-undo': 'undo',
'click #mailpoet-history-arrow-redo': 'redo',
},
model: { model: {
states: [], // from newest states: [], // from newest
currentStateIndex: 0, currentStateIndex: 0,
@@ -52,6 +57,18 @@ Module.HistoryView = Marionette.View.extend({
return this.model.currentStateIndex !== 0; return this.model.currentStateIndex !== 0;
}, },
undo: function undo() {
if (!this.canUndo()) {
return;
}
},
redo: function redo() {
if (!this.canRedo()) {
return;
}
},
updateArrowsUI: function updateArrowsUI() { updateArrowsUI: function updateArrowsUI() {
this.elements.undo.addClass('mailpoet_history_arrow_inactive'); this.elements.undo.addClass('mailpoet_history_arrow_inactive');
this.elements.redo.addClass('mailpoet_history_arrow_inactive'); this.elements.redo.addClass('mailpoet_history_arrow_inactive');