diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-08-16 22:17:45 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-08-16 22:17:45 -0400 |
commit | 2fd177363b1359566ad0078fbb8ec9138eea170c (patch) | |
tree | e0f51b1c81d6bc372f5877c598c2f35b1f2670bc /assets/js/src | |
parent | 06638ff5e9eb150e6798b1b79bf77e24f807c7b1 (diff) |
Add project users overview
Diffstat (limited to 'assets/js/src')
-rw-r--r-- | assets/js/src/App.js | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/assets/js/src/App.js b/assets/js/src/App.js index 301e30d4..b0c1712e 100644 --- a/assets/js/src/App.js +++ b/assets/js/src/App.js @@ -7,7 +7,7 @@ function App() { this.tooltip = new Tooltip(this); this.popover = new Popover(this); this.keyboardShortcuts(); - this.boardSelector(); + this.chosen(); this.poll(); // Alert box fadeout @@ -144,20 +144,16 @@ App.prototype.taskAutoComplete = function() { } }; -App.prototype.boardSelector = function() { +App.prototype.chosen = function() { $(".chosen-select").chosen({ - width: "200px", + width: "180px", no_results_text: $(".chosen-select").data("notfound"), disable_search_threshold: 10 }); - $("#board-selector").chosen({ - width: 180, - no_results_text: $("#board-selector").data("notfound") - }); - - $("#board-selector").change(function() { - window.location = $(this).attr("data-board-url").replace(/PROJECT_ID/g, $(this).val()); + $(".select-auto-redirect").change(function() { + var regex = new RegExp($(this).data('redirect-regex'), 'g'); + window.location = $(this).data('redirect-url').replace(regex, $(this).val()); }); }; |