',{class:"red-ui-search-result-node"}).css({
+ "margin-top": "2px",
+ "margin-left": "3px"
+ }).appendTo(container);
+ var nodeLabel = $('
').css({
+ "line-height": "32px",
+ "margin-left": "6px"
+ }).appendTo(container);
+ if (node) {
+ var colour = RED.utils.getNodeColor(node.type,node._def);
+ var icon_url = RED.utils.getNodeIcon(node._def,node);
+ if (node.type === 'tab') {
+ colour = "#C0DEED";
+ }
+ nodeDiv.css('backgroundColor',colour);
+ var iconContainer = $('',{class:"red-ui-palette-icon-container"}).appendTo(nodeDiv);
+ RED.utils.createIconElement(icon_url, iconContainer, true);
+ var l = RED.utils.getNodeLabel(node,node.id);
+ nodeLabel.text(l);
+ } else {
+ nodeDiv.css({
+ 'backgroundColor': '#eee',
+ 'border-style' : 'dashed'
+ });
+
+ }
+ },
+ expand: function() {
+ var that = this;
+ RED.tray.hide();
+ RED.view.selectNodes({
+ single: true,
+ selected: [that.value()],
+ onselect: function(selection) {
+ that.value(selection.id);
+ RED.tray.show();
+ },
+ oncancel: function() {
+ RED.tray.show();
+ }
+ })
+ }
}
};
var nlsd = false;
@@ -212,6 +261,8 @@
that.uiSelect.addClass('red-ui-typedInput-focus');
})
+ this.valueLabelContainer = $('').appendTo(this.uiSelect)
+
// explicitly set optionSelectTrigger display to inline-block otherwise jQ sets it to 'inline'
this.optionSelectTrigger = $('').appendTo(this.uiSelect);
this.optionSelectLabel = $('').prependTo(this.optionSelectTrigger);
@@ -394,10 +445,13 @@
this.selectTrigger.removeClass("red-ui-typedInput-full-width");
var labelWidth = this._getLabelWidth(this.selectTrigger);
this.elementDiv.css('left',labelWidth+"px");
+ this.valueLabelContainer.css('left',labelWidth+"px");
if (this.optionExpandButton.is(":visible")) {
this.elementDiv.css('right',"22px");
+ this.valueLabelContainer.css('right',"22px");
} else {
this.elementDiv.css('right','0');
+ this.valueLabelContainer.css('right','0');
this.input.css({
'border-top-right-radius': '4px',
'border-bottom-right-radius': '4px'
@@ -520,8 +574,13 @@
selectedOption = {value:""}
}
this._updateOptionSelectLabel(selectedOption)
+ } else {
+ this.input.val(value);
+ }
+ if (this.typeMap[this.propertyType].valueLabel) {
+ this.valueLabelContainer.empty();
+ this.typeMap[this.propertyType].valueLabel.call(this,this.valueLabelContainer,value);
}
- this.input.val(value);
this.input.trigger('change',this.type(),value);
}
},
@@ -566,8 +625,10 @@
this.optionSelectTrigger.show();
if (!opt.hasValue) {
this.elementDiv.hide();
+ this.valueLabelContainer.hide();
} else {
this.elementDiv.show();
+ this.valueLabelContainer.hide();
}
this.activeOptions = {};
opt.options.forEach(function(o) {
@@ -655,11 +716,18 @@
this.oldValue = this.input.val();
this.input.val("");
this.elementDiv.hide();
+ this.valueLabelContainer.hide();
+ } else if (opt.valueLabel) {
+ this.valueLabelContainer.show();
+ this.valueLabelContainer.empty();
+ opt.valueLabel.call(this,this.valueLabelContainer,this.input.val());
+ this.elementDiv.hide();
} else {
if (this.oldValue !== undefined) {
this.input.val(this.oldValue);
delete this.oldValue;
}
+ this.valueLabelContainer.hide();
this.elementDiv.show();
}
if (this.optionExpandButton) {
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js
index 70feb2693..c71891c31 100755
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js
@@ -1386,6 +1386,9 @@ RED.view = (function() {
}
function selectAll() {
+ if (mouse_mode === RED.state.SELECTING_NODE && selectNodesOptions.single) {
+ return;
+ }
RED.nodes.eachNode(function(n) {
if (n.z == RED.workspaces.active()) {
if (mouse_mode === RED.state.SELECTING_NODE) {
@@ -2269,6 +2272,10 @@ RED.view = (function() {
return;
} else if (mouse_mode === RED.state.SELECTING_NODE) {
d3.event.stopPropagation();
+ if (selectNodesOptions.single) {
+ selectNodesOptions.done(d);
+ return;
+ }
if (d.selected) {
d.selected = false;
for (i=0;iError: __message__",
"errors": {
"not-deployed": "node not deployed",