1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

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", "flow": "Flow",
"global": "Global", "global": "Global",
"deleteConfirm": "Are you sure you want to delete this item?", "deleteConfirm": "Are you sure you want to delete this item?",
"autoRefresh": "Auto-refresh" "autoRefresh": "Auto-refresh",
"refrsh": "Refresh",
"delete": "Delete"
}, },
"palette": { "palette": {
"name": "Palette management", "name": "Palette management",

View File

@ -73,6 +73,7 @@ RED.sidebar.context = (function() {
evt.preventDefault(); evt.preventDefault();
updateNode(currentNode, true); updateNode(currentNode, true);
}) })
RED.popover.tooltip(bg,RED._("sidebar.context.refrsh"));
// subflowSection = sections.add({ // subflowSection = sections.add({
// title: "Subflow", // title: "Subflow",
@ -87,7 +88,7 @@ RED.sidebar.context = (function() {
// evt.stopPropagation(); // evt.stopPropagation();
// evt.preventDefault(); // evt.preventDefault();
// }) // })
// // RED.popover.tooltip(bg,RED._("sidebar.context.refrsh"));
// subflowSection.container.hide(); // subflowSection.container.hide();
flowSection = sections.add({ flowSection = sections.add({
@ -107,6 +108,7 @@ RED.sidebar.context = (function() {
evt.preventDefault(); evt.preventDefault();
updateFlow(currentFlow, true); updateFlow(currentFlow, true);
}) })
RED.popover.tooltip(bg,RED._("sidebar.context.refrsh"));
globalSection = sections.add({ globalSection = sections.add({
title: RED._("sidebar.context.global"), title: RED._("sidebar.context.global"),
@ -126,7 +128,7 @@ RED.sidebar.context = (function() {
evt.preventDefault(); evt.preventDefault();
updateEntry(globalSection,"context/global","global"); updateEntry(globalSection,"context/global","global");
}) })
RED.popover.tooltip(bg,RED._("sidebar.context.refrsh"));
RED.actions.add("core:show-context-tab",show); 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) { 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.preventDefault();
e.stopPropagation(); e.stopPropagation();
@ -324,6 +327,7 @@ RED.sidebar.context = (function() {
popover.open(); popover.open();
}); });
RED.popover.tooltip(deleteItem,RED._("sidebar.context.delete"));
var payload = v.msg; var payload = v.msg;
var format = v.format; var format = v.format;
RED.utils.createObjectElement(RED.utils.decodeObject(payload,format), { RED.utils.createObjectElement(RED.utils.decodeObject(payload,format), {