Show title attribute on arrows
[MAILPOET-1976]\
This commit is contained in:
@@ -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'));
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@@ -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 %>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user