Show title attribute on arrows

[MAILPOET-1976]\
This commit is contained in:
Ján Mikláš
2019-05-29 16:24:26 +02:00
committed by M. Shull
parent f73ad4ee3e
commit 5e17532911
2 changed files with 9 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
import App from 'newsletter_editor/App'; import App from 'newsletter_editor/App';
import jQuery from 'jquery'; import jQuery from 'jquery';
import MailPoet from 'mailpoet';
import Marionette from 'backbone.marionette'; import Marionette from 'backbone.marionette';
var Module = {}; var Module = {};
@@ -71,12 +72,16 @@ Module.HistoryView = Marionette.View.extend({
updateArrowsUI: function updateArrowsUI() { updateArrowsUI: function updateArrowsUI() {
this.elements.undo.addClass('mailpoet_history_arrow_inactive'); this.elements.undo.addClass('mailpoet_history_arrow_inactive');
this.elements.undo.prop('title', MailPoet.I18n.t('canNotUndo'));
this.elements.redo.addClass('mailpoet_history_arrow_inactive'); this.elements.redo.addClass('mailpoet_history_arrow_inactive');
this.elements.redo.prop('title', MailPoet.I18n.t('canNotRedo'));
if (this.canUndo()) { if (this.canUndo()) {
this.elements.undo.removeClass('mailpoet_history_arrow_inactive'); this.elements.undo.removeClass('mailpoet_history_arrow_inactive');
this.elements.undo.prop('title', MailPoet.I18n.t('canUndo'));
}; };
if (this.canRedo()) { if (this.canRedo()) {
this.elements.redo.removeClass('mailpoet_history_arrow_inactive'); this.elements.redo.removeClass('mailpoet_history_arrow_inactive');
this.elements.redo.prop('title', MailPoet.I18n.t('canRedo'));
}; };
}, },
}); });

View File

@@ -409,6 +409,10 @@
'template': __('Template'), 'template': __('Template'),
'designer': __('Designer'), 'designer': __('Designer'),
'send': __('Send'), 'send': __('Send'),
'canUndo': __('Undo'),
'canNotUndo': __('No past history available.'),
'canRedo': __('Redo'),
'canNotRedo': __('No future history available.'),
}) %> }) %>
<% endblock %> <% endblock %>