diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-07-02 09:44:53 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-07-02 09:44:53 +0000 |
commit | 0b16423104f761beef651904855b8a37d0f2cd26 (patch) | |
tree | d50d1e6567415ea3d1d71bad8aadf8c3be30e9a9 /public/javascripts/application.js | |
parent | d9a0084b764026af4c07de469810bbbedad08456 (diff) | |
download | redmine-0b16423104f761beef651904855b8a37d0f2cd26.tar.gz redmine-0b16423104f761beef651904855b8a37d0f2cd26.zip |
Group versions by status in issue filters (#10412).
git-svn-id: http://svn.redmine.org/redmine/trunk@15601 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public/javascripts/application.js')
-rw-r--r-- | public/javascripts/application.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/public/javascripts/application.js b/public/javascripts/application.js index eedeae08b..64d3e8ea9 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -175,6 +175,11 @@ function buildFilterRow(field, operator, values) { if ($.isArray(filterValue)) { option.val(filterValue[1]).text(filterValue[0]); if ($.inArray(filterValue[1], values) > -1) {option.attr('selected', true);} + if (filterValue.length == 3) { + var optgroup = select.find('optgroup').filter(function(){return $(this).attr('label') == filterValue[2]}); + if (!optgroup.length) {optgroup = $('<optgroup>').attr('label', filterValue[2]);} + option = optgroup.append(option); + } } else { option.val(filterValue).text(filterValue); if ($.inArray(filterValue, values) > -1) {option.attr('selected', true);} |