diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-01-21 21:11:30 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-01-21 21:11:30 -0500 |
commit | 325e72589d1619f7f3bcc5c7425d800d31e22bd6 (patch) | |
tree | 67b3a7b952ba1bd8fb3ea2441833fd6c29b0abc7 /assets/js/src/App.js | |
parent | fcdfdeabfa174900f393414297da45635d88f4c0 (diff) |
Always show the search box in board selector
Diffstat (limited to 'assets/js/src/App.js')
-rw-r--r-- | assets/js/src/App.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/assets/js/src/App.js b/assets/js/src/App.js index 0102ada4..976b4554 100644 --- a/assets/js/src/App.js +++ b/assets/js/src/App.js @@ -156,10 +156,18 @@ App.prototype.autoComplete = function() { }; App.prototype.chosen = function() { - $(".chosen-select").chosen({ - width: "180px", - no_results_text: $(".chosen-select").data("notfound"), - disable_search_threshold: 10 + $(".chosen-select").each(function() { + var searchThreshold = $(this).data("search-threshold"); + + if (searchThreshold === undefined) { + searchThreshold = 10; + } + + $(this).chosen({ + width: "180px", + no_results_text: $(this).data("notfound"), + disable_search_threshold: searchThreshold + }); }); $(".select-auto-redirect").change(function() { |