From d525fecdf726d369bfe7ba6933bf727c0e596b4d Mon Sep 17 00:00:00 2001 From: james-strauss-uwa Date: Wed, 9 Sep 2020 16:21:57 +0800 Subject: [PATCH] Use correct terminology when adding parameters to nodes. Hide custom name input when selecting the parameter name unless a custom name is selected. --- src/Eagle.ts | 2 +- src/Utils.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Eagle.ts b/src/Eagle.ts index 4f191f9c4..9bf6a1093 100644 --- a/src/Eagle.ts +++ b/src/Eagle.ts @@ -1445,7 +1445,7 @@ export class Eagle { uniqueFieldNames = Utils.getFieldTextList(this.logicalGraph()); } - Utils.requestUserChoice("Add Field", "Please select a field text", uniqueFieldNames, 0, true, "Custom Field Name", (completed : boolean, userString : string) => { + Utils.requestUserChoice("Add Parameter", "Please select a parameter name, or create a custom name", uniqueFieldNames, 0, true, "Custom Parameter Name", (completed : boolean, userString : string) => { if (!completed){ return; } diff --git a/src/Utils.ts b/src/Utils.ts index 4f169af92..aa8480578 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -330,8 +330,8 @@ export class Utils { var choices : string[] = $('#choiceModal').data('choices'); var choice : number = parseInt($('#choiceModalSelect').val(), 10); - // disable the custom text input unless the last option in the select is chosen - $('#choiceModalString').prop('disabled', choice !== choices.length); + // hide the custom text input unless the last option in the select is chosen + $('#choiceModalStringRow').toggle(choice === choices.length); }) // #confirmModal - requestUserConfirm()