Add popovers to context sidebar mini buttons

This commit is contained in:
Dave Conway-Jones 2019-06-01 13:21:21 +01:00
parent 22855279bd
commit 53ab6f8569
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
2 changed files with 9 additions and 3 deletions

View File

@ -531,7 +531,9 @@
"flow": "Flow",
"global": "Global",
"deleteConfirm": "Are you sure you want to delete this item?",
"autoRefresh": "Auto-refresh"
"autoRefresh": "Auto-refresh",
"refrsh": "Refresh",
"delete": "Delete"
},
"palette": {
"name": "Palette management",

View File

@ -73,6 +73,7 @@ RED.sidebar.context = (function() {
evt.preventDefault();
updateNode(currentNode, true);
})
RED.popover.tooltip(bg,RED._("sidebar.context.refrsh"));
// subflowSection = sections.add({
// title: "Subflow",
@ -87,7 +88,7 @@ RED.sidebar.context = (function() {
// evt.stopPropagation();
// evt.preventDefault();
// })
//
// RED.popover.tooltip(bg,RED._("sidebar.context.refrsh"));
// subflowSection.container.hide();
flowSection = sections.add({
@ -107,6 +108,7 @@ RED.sidebar.context = (function() {
evt.preventDefault();
updateFlow(currentFlow, true);
})
RED.popover.tooltip(bg,RED._("sidebar.context.refrsh"));
globalSection = sections.add({
title: RED._("sidebar.context.global"),
@ -126,7 +128,7 @@ RED.sidebar.context = (function() {
evt.preventDefault();
updateEntry(globalSection,"context/global","global");
})
RED.popover.tooltip(bg,RED._("sidebar.context.refrsh"));
RED.actions.add("core:show-context-tab",show);
@ -272,6 +274,7 @@ RED.sidebar.context = (function() {
}
})
});
RED.popover.tooltip(refreshItem,RED._("sidebar.context.refrsh"));
var deleteItem = $('<button class="red-ui-button red-ui-button-small"><i class="fa fa-trash"></i></button>').appendTo(tools).on("click", function(e) {
e.preventDefault();
e.stopPropagation();
@ -324,6 +327,7 @@ RED.sidebar.context = (function() {
popover.open();
});
RED.popover.tooltip(deleteItem,RED._("sidebar.context.delete"));
var payload = v.msg;
var format = v.format;
RED.utils.createObjectElement(RED.utils.decodeObject(payload,format), {