[DE] Added hint to Restore button in the version history.
This commit is contained in:
parent
28be3e9f70
commit
920dc6002a
|
@ -98,6 +98,11 @@ define([
|
||||||
if (e) {
|
if (e) {
|
||||||
var btn = $(e.target);
|
var btn = $(e.target);
|
||||||
if (btn && btn.hasClass('revision-restore')) {
|
if (btn && btn.hasClass('revision-restore')) {
|
||||||
|
var tip = item.btnTip;
|
||||||
|
if (tip) {
|
||||||
|
tip.dontShow = true;
|
||||||
|
tip.tip().remove();
|
||||||
|
}
|
||||||
if (record.get('isRevision'))
|
if (record.get('isRevision'))
|
||||||
Common.Gateway.requestRestore(record.get('revision'));
|
Common.Gateway.requestRestore(record.get('revision'));
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -97,11 +97,27 @@ define([
|
||||||
enableToggle: false
|
enableToggle: false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var me = this;
|
||||||
|
var changetooltip = function (dataview, view, record) {
|
||||||
|
if (record.get('selected')) {
|
||||||
|
var btns = $(view.el).find('.revision-restore').tooltip({title: me.textRestore, placement: 'cursor'});
|
||||||
|
if (btns)
|
||||||
|
view.btnTip = btns.data('bs.tooltip');
|
||||||
|
} else if (view.btnTip) {
|
||||||
|
view.btnTip.dontShow = true;
|
||||||
|
view.btnTip.tip().remove();
|
||||||
|
view.btnTip = null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this.viewHistoryList.on('item:add', changetooltip);
|
||||||
|
this.viewHistoryList.on('item:change', changetooltip);
|
||||||
|
|
||||||
this.trigger('render:after', this);
|
this.trigger('render:after', this);
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
textHistoryHeader: 'Back to Document'
|
textHistoryHeader: 'Back to Document',
|
||||||
|
textRestore: 'Restore'
|
||||||
|
|
||||||
}, Common.Views.History || {}))
|
}, Common.Views.History || {}))
|
||||||
});
|
});
|
|
@ -142,6 +142,7 @@
|
||||||
"Common.Views.Header.openNewTabText": "Open in New Tab",
|
"Common.Views.Header.openNewTabText": "Open in New Tab",
|
||||||
"Common.Views.Header.textBack": "Go to Documents",
|
"Common.Views.Header.textBack": "Go to Documents",
|
||||||
"Common.Views.History.textHistoryHeader": "Back to Document",
|
"Common.Views.History.textHistoryHeader": "Back to Document",
|
||||||
|
"Common.Views.History.textRestore": "Restore",
|
||||||
"Common.Views.ImageFromUrlDialog.cancelButtonText": "Cancel",
|
"Common.Views.ImageFromUrlDialog.cancelButtonText": "Cancel",
|
||||||
"Common.Views.ImageFromUrlDialog.okButtonText": "OK",
|
"Common.Views.ImageFromUrlDialog.okButtonText": "OK",
|
||||||
"Common.Views.ImageFromUrlDialog.textUrl": "Paste an image URL:",
|
"Common.Views.ImageFromUrlDialog.textUrl": "Paste an image URL:",
|
||||||
|
|
Loading…
Reference in a new issue