diff options
author | Rubén Dávila <rdavila84@gmail.com> | 2016-01-12 05:38:31 +0300 |
---|---|---|
committer | Rubén Dávila <rdavila84@gmail.com> | 2016-01-20 08:14:58 +0300 |
commit | f0b7dcba30c9041c5d004ee8fa4bbd7652125ed4 (patch) | |
tree | 7548d4862a28d258f4b3ce5758d731830852e16e /app/assets/javascripts/projects_list.js.coffee | |
parent | 55707f95896050da638db3c59047e6896b0c0968 (diff) |
Add ability to filter by namespace. #2406
Diffstat (limited to 'app/assets/javascripts/projects_list.js.coffee')
-rw-r--r-- | app/assets/javascripts/projects_list.js.coffee | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/projects_list.js.coffee b/app/assets/javascripts/projects_list.js.coffee index f2887af190b..b71509dbc5a 100644 --- a/app/assets/javascripts/projects_list.js.coffee +++ b/app/assets/javascripts/projects_list.js.coffee @@ -9,11 +9,13 @@ class @ProjectsList $(".projects-list-filter").keyup -> terms = $(this).val() uiBox = $('div.projects-list-holder') + filterSelector = $(this).data('filter-selector') || 'span.filter-title' + if terms == "" || terms == undefined uiBox.find("ul.projects-list li").show() else uiBox.find("ul.projects-list li").each (index) -> - name = $(this).find("span.filter-title").text() + name = $(this).find(filterSelector).text() if name.toLowerCase().search(terms.toLowerCase()) == -1 $(this).hide() |