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

Add tooltip for show/hide button on info sidebar

This commit is contained in:
Kazuhito Yokoi 2023-02-04 20:55:34 +09:00
parent adfc5b3e98
commit ede3ac4282
3 changed files with 8 additions and 0 deletions

View File

@ -683,6 +683,8 @@
"empty": "empty", "empty": "empty",
"globalConfig": "Global Configuration Nodes", "globalConfig": "Global Configuration Nodes",
"triggerAction": "Trigger action", "triggerAction": "Trigger action",
"showFlow": "Show",
"hideFlow": "Hide",
"find": "Find in workspace" "find": "Find in workspace"
}, },
"help": { "help": {

View File

@ -683,6 +683,8 @@
"empty": "空", "empty": "空",
"globalConfig": "グローバル設定ノード", "globalConfig": "グローバル設定ノード",
"triggerAction": "アクションを実行", "triggerAction": "アクションを実行",
"showFlow": "表示",
"hideFlow": "非表示",
"find": "ワークスペース内を検索" "find": "ワークスペース内を検索"
}, },
"help": { "help": {

View File

@ -135,6 +135,10 @@ RED.sidebar.info.outliner = (function() {
RED.workspaces.show(n.id, null, true); RED.workspaces.show(n.id, null, true);
} }
}); });
RED.popover.tooltip(toggleVisibleButton, function () {
var isHidden = !div.hasClass("red-ui-info-outline-item-hidden");
return RED._("sidebar.info." + (isHidden ? "hideFlow" : "showFlow"));
});
} }
if (n.type !== 'subflow') { if (n.type !== 'subflow') {
var toggleButton = $('<button type="button" class="red-ui-info-outline-item-control-disable red-ui-button red-ui-button-small"><i class="fa fa-circle-thin"></i><i class="fa fa-ban"></i></button>').appendTo(controls).on("click",function(evt) { var toggleButton = $('<button type="button" class="red-ui-info-outline-item-control-disable red-ui-button red-ui-button-small"><i class="fa fa-circle-thin"></i><i class="fa fa-ban"></i></button>').appendTo(controls).on("click",function(evt) {