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 ...@@ -58,6 +58,7 @@ class @LabelsSelect
if showAny if showAny
data.unshift( data.unshift(
any: true
title: 'Any Label' title: 'Any Label'
) )
...@@ -91,11 +92,15 @@ class @LabelsSelect ...@@ -91,11 +92,15 @@ class @LabelsSelect
defaultLabel defaultLabel
fieldName: $(dropdown).data('field-name') fieldName: $(dropdown).data('field-name')
id: (label) -> id: (label) ->
if label.title is "Any Label" if label.any?
"" ""
else else
label.title label.title
clicked: -> 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") Issues.filterResults $(dropdown).parents("form")
else if $(dropdown).hasClass "js-filter-submit"
$(dropdown).parents("form").submit()
) )
...@@ -62,6 +62,10 @@ class @MilestoneSelect ...@@ -62,6 +62,10 @@ class @MilestoneSelect
isSelected: (milestone) -> isSelected: (milestone) ->
milestone.title is selectedMilestone milestone.title is selectedMilestone
clicked: -> 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") Issues.filterResults $(dropdown).parents("form")
else if $(dropdown).hasClass "js-filter-submit"
$(dropdown).parents("form").submit()
) )
...@@ -60,8 +60,12 @@ class @UsersSelect ...@@ -60,8 +60,12 @@ class @UsersSelect
else else
defaultLabel defaultLabel
clicked: -> 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") Issues.filterResults $(dropdown).parents("form")
else if $(dropdown).hasClass "js-filter-submit"
$(dropdown).parents("form").submit()
renderRow: (user) -> renderRow: (user) ->
username = if user.username then "@#{user.username}" else "" username = if user.username then "@#{user.username}" else ""
avatar = if user.avatar_url then user.avatar_url else false avatar = if user.avatar_url then user.avatar_url else false
......
...@@ -30,8 +30,6 @@ feature 'Merge Request filtering by Milestone', feature: true do ...@@ -30,8 +30,6 @@ feature 'Merge Request filtering by Milestone', feature: true do
def filter_by_milestone(title) def filter_by_milestone(title)
find(".js-milestone-select").click find(".js-milestone-select").click
sleep 0.5
find(".milestone-filter a", text: title).click find(".milestone-filter a", text: title).click
sleep 1
end end
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