Commit 19b9df2d authored by Jacob Schatz's avatar Jacob Schatz

storing multiple values for comma seperation

parent dfadbe5e
......@@ -49,16 +49,14 @@
Issues.filterResults $("#issue_search_form")
, 500)
filterResults: (form) =>
filterResults: (form, inputs) =>
console.log('form', form)
$('.issues-holder, .merge-requests-holder').css("opacity", '0.5')
formAction = form.attr('action')
console.log form.find("input[type='hidden'][name='label_names[]']")
formData = form.serialize()
console.log 'formData', formData
issuesUrl = formAction
issuesUrl += ("#{if formAction.indexOf("?") < 0 then '?' else '&'}")
issuesUrl += formData
$.ajax
type: "GET"
url: formAction
......
......@@ -243,7 +243,10 @@ class @LabelsSelect
$value.removeAttr('style')
if $dropdown.hasClass 'js-multiselect'
if $dropdown.hasClass('js-filter-submit') and (isIssueIndex or isMRIndex)
Issues.filterResults $dropdown.closest('form')
selectedLabels = $dropdown
.closest('form')
.find("input[type='hidden'][name='#{$dropdown.data('field-name')}']")
Issues.filterResults $dropdown.closest('form'), selectedLabels
else if $dropdown.hasClass('js-filter-submit')
$dropdown.closest('form').submit()
else
......@@ -254,15 +257,18 @@ class @LabelsSelect
page = $('body').data 'page'
isIssueIndex = page is 'projects:issues:index'
isMRIndex = page is page is 'projects:merge_requests:index'
console.log 'clicked'
if $dropdown.hasClass('js-filter-submit') and (isIssueIndex or isMRIndex)
selectedLabel = label.title
Issues.filterResults $dropdown.closest('form')
if not $dropdown.hasClass 'js-multiselect'
selectedLabel = label.title
Issues.filterResults $dropdown.closest('form')
else if $dropdown.hasClass 'js-filter-submit'
console.log 'clicked else if'
$dropdown.closest('form').submit()
else
console.log 'clicked else'
if $dropdown.hasClass 'js-multiselect'
console.log 'clicked else --> if'
return
else
saveLabelData()
......
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