diff options
| author | Phil Hughes <me@iamphill.com> | 2016-04-13 13:11:44 +0100 |
|---|---|---|
| committer | Phil Hughes <me@iamphill.com> | 2016-05-16 10:29:47 +0100 |
| commit | 832d7fa3ce3e97113dd783600de57b8d2276d8a1 (patch) | |
| tree | 71b64d97cf751739051a3bdc23a0fedb5dc5190e /app/assets/javascripts/issuable.js.coffee | |
| parent | 78a67fc48dab434b43a080e5b15491963656661a (diff) | |
| download | gitlab-ce-832d7fa3ce3e97113dd783600de57b8d2276d8a1.tar.gz | |
Issuable filtering improvements
This improves the filtering of issues and merge requests by creating a single file that encapsulates all the filtering. Previously this was done with a file for issues and a file for merge requests.
Created the ability for the text search to be done alongside other filterables. Previously because this was outside the filterable form, this wasn't possible and would instead do either filter dropdown or text filter - not both.
Diffstat (limited to 'app/assets/javascripts/issuable.js.coffee')
| -rw-r--r-- | app/assets/javascripts/issuable.js.coffee | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/app/assets/javascripts/issuable.js.coffee b/app/assets/javascripts/issuable.js.coffee index afffed63ac5..b999500d0e5 100644 --- a/app/assets/javascripts/issuable.js.coffee +++ b/app/assets/javascripts/issuable.js.coffee @@ -1,7 +1,10 @@ +issuable_created = false @Issuable = init: -> - Issuable.initTemplates() - Issuable.initSearch() + if not issuable_created + issuable_created = true + Issuable.initTemplates() + Issuable.initSearch() initTemplates: -> Issuable.labelRow = _.template( @@ -64,6 +67,7 @@ $('#filter_issue_search').val($('#issue_search').val()) + updateStateFilters: -> stateFilters = $('.issues-state-filters') newParams = {} @@ -82,3 +86,18 @@ else newUrl = gl.utils.mergeUrlParams(newParams, initialUrl) $(this).attr 'href', newUrl + + checkChanged: -> + checked_issues = $('.selected_issue:checked') + if checked_issues.length > 0 + ids = [] + $.each checked_issues, (index, value) -> + ids.push $(value).data('id') + + $('#update_issues_ids').val ids + $('.issues-other-filters').hide() + $('.issues_bulk_update').show() + else + $('#update_issues_ids').val [] + $('.issues_bulk_update').hide() + $('.issues-other-filters').show() |
