From 73ef766abdafff6fd0ae7f053b8426287f530f0f Mon Sep 17 00:00:00 2001 From: Colin Clark Date: Mon, 21 Jan 2019 19:59:16 -0500 Subject: [PATCH] Fixes gh-274: Correctly generates an ID for the portSelector selectbox. Also namespaces some listeners and improves the configurability of labels. --- .../midi-port-selector/js/midi-port-selector.js | 6 +++--- src/ui/selectbox/js/selectbox.js | 13 +++++++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/ui/midi/midi-port-selector/js/midi-port-selector.js b/src/ui/midi/midi-port-selector/js/midi-port-selector.js index df94aeaa..9f284ad7 100644 --- a/src/ui/midi/midi-port-selector/js/midi-port-selector.js +++ b/src/ui/midi/midi-port-selector/js/midi-port-selector.js @@ -123,8 +123,8 @@ var fluid = fluid || require("infusion"), }, markup: { - label: "", - selectBox: "", + label: "", + selectBox: "", refreshButton: "" }, @@ -135,7 +135,7 @@ var fluid = fluid || require("infusion"), }, strings: { - selectBoxLabel: "MIDI Port", + selectBoxLabel: "MIDI Port:", refreshButtonLabel: "Refresh" }, diff --git a/src/ui/selectbox/js/selectbox.js b/src/ui/selectbox/js/selectbox.js index e223312f..692a1476 100644 --- a/src/ui/selectbox/js/selectbox.js +++ b/src/ui/selectbox/js/selectbox.js @@ -85,8 +85,17 @@ var fluid = fluid || require("infusion"), }, modelListeners: { - groups: "{that}.refreshView()", - options: "{that}.refreshView()" + groups: { + namespace: "refreshView", + excludeSource: "init", + func: "{that}.refreshView" + }, + + options: { + namespace: "refreshView", + excludeSource: "init", + func: "{that}.refreshView" + } }, listeners: {