mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge bde5a2b7cd899db029e76c49f2cbc3676712527a into 2feb290ae3c6cd88c16e4c27c2006a569e0146e2
This commit is contained in:
commit
8784dc89e5
@ -308,6 +308,7 @@
|
|||||||
"alreadyExists": "This node already exists"
|
"alreadyExists": "This node already exists"
|
||||||
},
|
},
|
||||||
"copyMessagePath": "Path copied",
|
"copyMessagePath": "Path copied",
|
||||||
|
"copyMessagePathForMustache": "Path copied for Mustache",
|
||||||
"copyMessageValue": "Value copied",
|
"copyMessageValue": "Value copied",
|
||||||
"copyMessageValue_truncated": "Truncated value copied"
|
"copyMessageValue_truncated": "Truncated value copied"
|
||||||
},
|
},
|
||||||
|
@ -308,6 +308,7 @@
|
|||||||
"alreadyExists": "本ノードは既に存在"
|
"alreadyExists": "本ノードは既に存在"
|
||||||
},
|
},
|
||||||
"copyMessagePath": "パスをコピーしました",
|
"copyMessagePath": "パスをコピーしました",
|
||||||
|
"copyMessagePathForMustache": "Mustache向けのパスをコピーしました",
|
||||||
"copyMessageValue": "値をコピーしました",
|
"copyMessageValue": "値をコピーしました",
|
||||||
"copyMessageValue_truncated": "切り捨てられた値をコピーしました"
|
"copyMessageValue_truncated": "切り捨てられた値をコピーしました"
|
||||||
},
|
},
|
||||||
|
@ -237,12 +237,21 @@ RED.utils = (function() {
|
|||||||
var tools = $('<span class="red-ui-debug-msg-tools"></span>').appendTo(obj);
|
var tools = $('<span class="red-ui-debug-msg-tools"></span>').appendTo(obj);
|
||||||
var copyTools = $('<span class="red-ui-debug-msg-tools-copy button-group"></span>').appendTo(tools);
|
var copyTools = $('<span class="red-ui-debug-msg-tools-copy button-group"></span>').appendTo(tools);
|
||||||
if (!!key) {
|
if (!!key) {
|
||||||
|
var mustachePath = key.replace(/\["([^\]]+)"\]/g,'.$1').replace(/\[([0-9]+)\]/g,'.$1');
|
||||||
var copyPath = $('<button class="red-ui-button red-ui-button-small"><i class="fa fa-terminal"></i></button>').appendTo(copyTools).on("click", function(e) {
|
var copyPath = $('<button class="red-ui-button red-ui-button-small"><i class="fa fa-terminal"></i></button>').appendTo(copyTools).on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
RED.clipboard.copyText(key,copyPath,"clipboard.copyMessagePath");
|
if ((e.ctrlKey || e.metaKey) && key !== mustachePath) {
|
||||||
|
RED.clipboard.copyText(mustachePath,copyPath,"clipboard.copyMessagePathForMustache");
|
||||||
|
} else {
|
||||||
|
RED.clipboard.copyText(key,copyPath,"clipboard.copyMessagePath");
|
||||||
|
}
|
||||||
})
|
})
|
||||||
RED.popover.tooltip(copyPath,RED._("node-red:debug.sidebar.copyPath"));
|
if (key !== mustachePath) {
|
||||||
|
RED.popover.tooltip(copyPath,RED._("node-red:debug.sidebar.copyPathForMustache"));
|
||||||
|
} else {
|
||||||
|
RED.popover.tooltip(copyPath,RED._("node-red:debug.sidebar.copyPath"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var copyPayload = $('<button class="red-ui-button red-ui-button-small"><i class="fa fa-clipboard"></i></button>').appendTo(copyTools).on("click", function(e) {
|
var copyPayload = $('<button class="red-ui-button red-ui-button-small"><i class="fa fa-clipboard"></i></button>').appendTo(copyTools).on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -161,6 +161,7 @@
|
|||||||
"filterLog": "Filter messages",
|
"filterLog": "Filter messages",
|
||||||
"openWindow": "Open in new window",
|
"openWindow": "Open in new window",
|
||||||
"copyPath": "Copy path",
|
"copyPath": "Copy path",
|
||||||
|
"copyPathForMustache": "Copy path (Mustache path by ctrl+click)",
|
||||||
"copyPayload": "Copy value",
|
"copyPayload": "Copy value",
|
||||||
"pinPath": "Pin open",
|
"pinPath": "Pin open",
|
||||||
"selectAll": "select all",
|
"selectAll": "select all",
|
||||||
|
@ -161,6 +161,7 @@
|
|||||||
"filterLog": "ログのフィルタリング",
|
"filterLog": "ログのフィルタリング",
|
||||||
"openWindow": "新しいウィンドウで開く",
|
"openWindow": "新しいウィンドウで開く",
|
||||||
"copyPath": "パスをコピー",
|
"copyPath": "パスをコピー",
|
||||||
|
"copyPathForMustache": "パスをコピー(Ctrl+クリックでMustacheパス)",
|
||||||
"copyPayload": "値をコピー",
|
"copyPayload": "値をコピー",
|
||||||
"pinPath": "展開を固定",
|
"pinPath": "展開を固定",
|
||||||
"selectAll": "全てを選択",
|
"selectAll": "全てを選択",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user