From 5fbd5bf9e286795ed1292c82386828c6f9a06c1e Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Sat, 10 Feb 2018 16:49:47 +0000 Subject: [PATCH] handle other fields in library - by only changing prefix (rather than whole property - so ...-name is still the name required) --- editor/js/ui/library.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/editor/js/ui/library.js b/editor/js/ui/library.js index 13b994a0a..96aa9efeb 100644 --- a/editor/js/ui/library.js +++ b/editor/js/ui/library.js @@ -16,7 +16,7 @@ RED.library = (function() { var exportToLibraryDialog; - var element = "node-input-name"; + var elementPrefix = "node-input-"; function loadFlowLibrary() { $.getJSON("library/flows",function(data) { @@ -86,7 +86,7 @@ RED.library = (function() { var libraryData = {}; var selectedLibraryItem = null; var libraryEditor = null; - element = options.element || "node-input-name"; + elementPrefix = options.elementPrefix || "node-input-"; // Orion editor has set/getText // ACE editor has set/getValue @@ -158,7 +158,7 @@ RED.library = (function() { return ul; } - $('#'+element).css("width","calc(100% - 52px)").after( + $('#'+elementPrefix+"name").css("width","calc(100% - 52px)").after( '
'+ ' '+ '