From fbd159a23a30b3dc365f3256fd36927b73ae8d65 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Wed, 8 Feb 2017 10:46:24 +0000 Subject: [PATCH] Add placeholder text on label inputs and clear buttons --- editor/js/ui/editor.js | 26 ++++++++++++++++++-------- nodes/core/core/80-function.html | 2 -- red/api/locales/en-US/editor.json | 3 ++- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/editor/js/ui/editor.js b/editor/js/ui/editor.js index 8476025dd..865ec667d 100644 --- a/editor/js/ui/editor.js +++ b/editor/js/ui/editor.js @@ -549,6 +549,10 @@ RED.editor = (function() { } function refreshLabelForm(container,node) { + + var inputPlaceholder = node._def.inputLabels?RED._("editor.defaultLabel"):RED._("editor.noDefaultLabel"); + var outputPlaceholder = node._def.outputLabels?RED._("editor.defaultLabel"):RED._("editor.noDefaultLabel"); + var inputsDiv = $("#node-label-form-inputs"); var outputsDiv = $("#node-label-form-outputs"); @@ -556,7 +560,7 @@ RED.editor = (function() { var children = inputsDiv.children(); if (children.length < inputCount) { for (i = children.length;i inputCount) { for (i=inputCount;i',{style:"margin: 5px 0px"}); var id = "node-label-form-"+type+"-"+index; $('