From 325e72589d1619f7f3bcc5c7425d800d31e22bd6 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Thu, 21 Jan 2016 21:11:30 -0500 Subject: Always show the search box in board selector --- assets/js/src/App.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'assets/js/src') 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() { -- cgit v1.2.3