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

Change label for 'set' change node action to make it clearer

This commit is contained in:
Nick O'Leary 2021-09-29 19:43:30 +01:00
parent 1b38e2eedf
commit b0f1fad4e2
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 9 additions and 7 deletions

View File

@ -109,6 +109,7 @@
var del = this._("change.action.delete");
var move = this._("change.action.move");
var to = this._("change.action.to");
var toValueLabel = this._("change.action.toValue",to);
var search = this._("change.action.search");
var replace = this._("change.action.replace");
var regex = this._("change.label.regex");
@ -139,10 +140,10 @@
whiteSpace: 'nowrap'
});
let fragment = document.createDocumentFragment();
var row1 = $('<div/>',{style:"display:flex;"}).appendTo(fragment);
var row2 = $('<div/>',{style:"display:flex;margin-top:8px;"}).appendTo(fragment);
var row3 = $('<div/>',{style:"margin-top:8px;"}).appendTo(fragment);
var row4 = $('<div/>',{style:"display:flex;margin-top:8px;"}).appendTo(fragment);
var row1 = $('<div/>',{style:"display:flex; align-items: baseline"}).appendTo(fragment);
var row2 = $('<div/>',{style:"display:flex;margin-top:8px; align-items: baseline"}).appendTo(fragment);
var row3 = $('<div/>',{style:"margin-top:8px;align-items: baseline"}).appendTo(fragment);
var row4 = $('<div/>',{style:"display:flex;margin-top:8px;align-items: baseline"}).appendTo(fragment);
var selectField = $('<select/>',{class:"node-input-rule-type",style:"width:110px; margin-right:10px;"}).appendTo(row1);
var selectOptions = [{v:"set",l:set},{v:"change",l:change},{v:"delete",l:del},{v:"move",l:move}];
@ -155,7 +156,7 @@
.typedInput({types:['msg','flow','global']});
$('<div/>',{style:"display:inline-block;text-align:right; width:120px; padding-right:10px; box-sizing:border-box;"})
.text(to)
.text(toValueLabel)
.appendTo(row2);
function createPropertyValue() {
@ -164,7 +165,7 @@
.typedInput({default:'str',types:['msg','flow','global','str','num','bool','json','bin','date','jsonata','env']});
}
var row3_1 = $('<div/>', {style:"display:flex;"}).appendTo(row3);
var row3_1 = $('<div/>', {style:"display:flex;align-items: baseline"}).appendTo(row3);
$('<div/>',{style:"display:inline-block;text-align:right; width:120px; padding-right:10px; box-sizing:border-box;"})
.text(search)
.appendTo(row3_1);
@ -175,7 +176,7 @@
.typedInput({default:'str',types:['msg','flow','global','str','re','num','bool','env']});
}
var row3_2 = $('<div/>',{style:"display:flex;margin-top:8px;"}).appendTo(row3);
var row3_2 = $('<div/>',{style:"display:flex;margin-top:8px;align-items: baseline"}).appendTo(row3);
$('<div/>',{style:"display:inline-block;text-align:right; width:120px; padding-right:10px; box-sizing:border-box;"})
.text(replace)
.appendTo(row3_2);

View File

@ -712,6 +712,7 @@
"change": "Change",
"delete": "Delete",
"move": "Move",
"toValue": "to the value",
"to": "to",
"search": "Search for",
"replace": "Replace with"