summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJacob Schatz <jschatz1@gmail.com>2016-04-11 13:56:29 +0000
committerJacob Schatz <jschatz1@gmail.com>2016-04-11 13:56:29 +0000
commit4087bd16e8e083550d306fd0c90d2a892b8577bf (patch)
tree01feab8e38cd0446cf3ac62ad065802e0c3e7ba0 /app
parent6a2109490c62f2a37fbc510e39395898b4d12ea4 (diff)
parent2f4dc45da2fbe6ab4469f1c836683bec9c8f0dd9 (diff)
downloadgitlab-ce-4087bd16e8e083550d306fd0c90d2a892b8577bf.tar.gz
Merge branch 'dashboard-filter-milestone' into 'master'
Fixed issue with dashboard/issues not filtering by milestone Closes #15128 See merge request !3650
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/milestone_select.js.coffee8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/assets/javascripts/milestone_select.js.coffee b/app/assets/javascripts/milestone_select.js.coffee
index f73127f49f0..6bd4e885a03 100644
--- a/app/assets/javascripts/milestone_select.js.coffee
+++ b/app/assets/javascripts/milestone_select.js.coffee
@@ -85,15 +85,21 @@ class @MilestoneSelect
# display:block overrides the hide-collapse rule
$value.removeAttr('style')
clicked: (selected) ->
+ page = $('body').data 'page'
+ isIssueIndex = page is 'projects:issues:index'
+ isMRIndex = page is page is 'projects:merge_requests:index'
+
if $dropdown.hasClass 'js-filter-bulk-update'
return
- if $dropdown.hasClass('js-filter-submit')
+ if $dropdown.hasClass('js-filter-submit') and (isIssueIndex or isMRIndex)
if selected.name?
selectedMilestone = selected.name
else
selectedMilestone = ''
Issues.filterResults $dropdown.closest('form')
+ else if $dropdown.hasClass('js-filter-submit')
+ $dropdown.closest('form').submit()
else
selected = $selectbox
.find('input[type="hidden"]')