Skip to content

Commit

Permalink
Merge branch 'port-selector-fixes'
Browse files Browse the repository at this point in the history
* port-selector-fixes:
  Fixes gh-274: Correctly generates an ID for the portSelector selectbox. Also namespaces some listeners and improves the configurability of labels.
  • Loading branch information
colinbdclark committed Jan 22, 2019
2 parents aa256eb + 73ef766 commit 3b9023d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/ui/midi/midi-port-selector/js/midi-port-selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ var fluid = fluid || require("infusion"),
},

markup: {
label: "<label for='%selectBoxID'>%selectBoxLabel:</label>",
selectBox: "<select class='flock-midi-selector-selectBox' id='%selectBoxId'></select>",
label: "<label for='%selectBoxID'>%selectBoxLabel</label>",
selectBox: "<select class='flock-midi-selector-selectBox' id='%selectBoxID'></select>",
refreshButton: "<button name='refresh'>%refreshButtonLabel</button>"
},

Expand All @@ -135,7 +135,7 @@ var fluid = fluid || require("infusion"),
},

strings: {
selectBoxLabel: "MIDI Port",
selectBoxLabel: "MIDI Port:",
refreshButtonLabel: "Refresh"
},

Expand Down
13 changes: 11 additions & 2 deletions src/ui/selectbox/js/selectbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 3b9023d

Please sign in to comment.