diff options
author | Josh Frye <joshfng@gmail.com> | 2016-02-05 14:33:24 -0500 |
---|---|---|
committer | Josh Frye <joshfng@gmail.com> | 2016-02-09 10:10:41 -0500 |
commit | 30e022a2feec7450c4173038d3fdfef0d6242953 (patch) | |
tree | 6a145d62527573a381072710fc17ec5785cf7954 /app/assets | |
parent | 0dc64a8ce1e9bde993ea7a862c71d7edaa69a286 (diff) | |
download | gitlab-ce-30e022a2feec7450c4173038d3fdfef0d6242953.tar.gz |
Starred, All, and Trending on explore are paged also group projects. Need ajax filter.
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/dashboard.js.coffee | 4 | ||||
-rw-r--r-- | app/assets/javascripts/dispatcher.js.coffee | 2 | ||||
-rw-r--r-- | app/assets/javascripts/projects_list.js.coffee | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/app/assets/javascripts/dashboard.js.coffee b/app/assets/javascripts/dashboard.js.coffee index c7757540b31..7e77ed5e7ff 100644 --- a/app/assets/javascripts/dashboard.js.coffee +++ b/app/assets/javascripts/dashboard.js.coffee @@ -5,7 +5,7 @@ initSearch: -> @timer = null - $("#project-filter-form-field").on('keyup', -> + $("#project-filter-form-field,.projects-list-filter").on('keyup', -> clearTimeout(@timer) @timer = setTimeout(Dashboard.filterResults, 500) ) @@ -25,7 +25,7 @@ complete: -> $('.projects-list-holder').fadeTo(250, 1) success: (data) -> - $('div.projects-list-holder').replaceWith(data.html) + $('.projects-list-holder,.public-projects').replaceWith(data.html) # Change url so if user reload a page - search results are saved history.replaceState {page: project_filter_url}, document.title, project_filter_url dataType: "json" diff --git a/app/assets/javascripts/dispatcher.js.coffee b/app/assets/javascripts/dispatcher.js.coffee index d4a2b74b143..b17f8e51470 100644 --- a/app/assets/javascripts/dispatcher.js.coffee +++ b/app/assets/javascripts/dispatcher.js.coffee @@ -16,6 +16,8 @@ class Dispatcher shortcut_handler = null switch page + when 'explore:projects:index', 'explore:projects:starred', 'explore:projects:trending' + Dashboard.init() when 'projects:issues:index' Issues.init() shortcut_handler = new ShortcutsNavigation() diff --git a/app/assets/javascripts/projects_list.js.coffee b/app/assets/javascripts/projects_list.js.coffee index b4f5546a42f..bb392140b73 100644 --- a/app/assets/javascripts/projects_list.js.coffee +++ b/app/assets/javascripts/projects_list.js.coffee @@ -11,8 +11,8 @@ class @ProjectsList ProjectsList.filter_results($("#project-filter-form-field")) @filter_results: ($element) -> - terms = $($element).val() - filterSelector = $($element).data('filter-selector') || 'span.filter-title' + terms = $element.val() + filterSelector = $element.data('filter-selector') || 'span.filter-title' if not terms $("ul.projects-list li").show() |