diff options
author | Phil Hughes <me@iamphill.com> | 2016-04-26 13:41:17 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-05-16 10:30:59 +0100 |
commit | 7df4b16b56f52eafccd080253b60a4cc15c66149 (patch) | |
tree | 60a545618d79506b9cdb2d9bc6d057442cb962bb | |
parent | 31b1dc3c31a4da59acd2deff2ded0d6d2aed8557 (diff) | |
download | gitlab-ce-7df4b16b56f52eafccd080253b60a4cc15c66149.tar.gz |
Fixed issue with not being able to search text & filter
-rw-r--r-- | app/assets/javascripts/issuable.js.coffee | 11 | ||||
-rw-r--r-- | app/views/shared/issuable/_filter.html.haml | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/app/assets/javascripts/issuable.js.coffee b/app/assets/javascripts/issuable.js.coffee index 012c3e48014..4c4f67f5104 100644 --- a/app/assets/javascripts/issuable.js.coffee +++ b/app/assets/javascripts/issuable.js.coffee @@ -23,7 +23,16 @@ issuable_created = false .on 'keyup', -> clearTimeout(@timer) @timer = setTimeout( -> - Issuable.filterResults $('#issue_search_form') + $search = $('#issue_search') + $form = $('.js-filter-form') + $input = $("input[name='#{$search.attr('name')}']", $form) + + if $input.length is 0 + $form.append "<input type='hidden' name='#{$search.attr('name')}' value='#{$search.val()}'/>" + else + $input.val $search.val() + + Issuable.filterResults $form , 500) toggleLabelFilters: -> diff --git a/app/views/shared/issuable/_filter.html.haml b/app/views/shared/issuable/_filter.html.haml index c4aa57e0acf..323d563cd4a 100644 --- a/app/views/shared/issuable/_filter.html.haml +++ b/app/views/shared/issuable/_filter.html.haml @@ -1,5 +1,5 @@ .issues-filters - .issues-details-filters.gray-content-block.second-block + .issues-details-filters.row-content-block.second-block = form_tag page_filter_path(without: [:assignee_id, :author_id, :milestone_title, :label_name, :issue_search]), method: :get, class: 'filter-form js-filter-form' do - if params[:issue_search].present? = hidden_field_tag :issue_search, params[:issue_search] |