Commit 16d02de5 authored by Phil Hughes's avatar Phil Hughes

Fixed issue with dashboard issues not reloading

parent 882ebfc2
......@@ -58,6 +58,7 @@ class @LabelsSelect
if showAny
data.unshift(
any: true
title: 'Any Label'
)
......@@ -91,11 +92,15 @@ class @LabelsSelect
defaultLabel
fieldName: $(dropdown).data('field-name')
id: (label) ->
if label.title is "Any Label"
if label.any?
""
else
label.title
clicked: ->
if $(dropdown).hasClass "js-filter-submit"
page = $("body").data "page"
if $(dropdown).hasClass("js-filter-submit") && page is "projects:issues:index"
Issues.filterResults $(dropdown).parents("form")
else if $(dropdown).hasClass "js-filter-submit"
$(dropdown).parents("form").submit()
)
......@@ -62,6 +62,10 @@ class @MilestoneSelect
isSelected: (milestone) ->
milestone.title is selectedMilestone
clicked: ->
if $(dropdown).hasClass "js-filter-submit"
page = $("body").data "page"
if $(dropdown).hasClass("js-filter-submit") && page is "projects:issues:index"
Issues.filterResults $(dropdown).parents("form")
else if $(dropdown).hasClass "js-filter-submit"
$(dropdown).parents("form").submit()
)
......@@ -60,8 +60,12 @@ class @UsersSelect
else
defaultLabel
clicked: ->
if $(dropdown).hasClass "js-filter-submit"
page = $("body").data "page"
if $(dropdown).hasClass("js-filter-submit") && page is "projects:issues:index"
Issues.filterResults $(dropdown).parents("form")
else if $(dropdown).hasClass "js-filter-submit"
$(dropdown).parents("form").submit()
renderRow: (user) ->
username = if user.username then "@#{user.username}" else ""
avatar = if user.avatar_url then user.avatar_url else false
......
......@@ -30,8 +30,6 @@ feature 'Merge Request filtering by Milestone', feature: true do
def filter_by_milestone(title)
find(".js-milestone-select").click
sleep 0.5
find(".milestone-filter a", text: title).click
sleep 1
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment