diff options
author | Jacob Schatz <jschatz1@gmail.com> | 2016-03-10 13:24:16 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz1@gmail.com> | 2016-03-10 13:24:16 +0000 |
commit | 60ddd5ef34686e1ea9edc82a6915a9e4738bee50 (patch) | |
tree | fbceec54f6746ef84eaba8a77854f3c96a845450 | |
parent | 491ac7ce4b79c901e23799d2062f9f013f08c6c3 (diff) | |
parent | 83593e461a7925836f81ebf47454f942d55e7fbd (diff) | |
download | gitlab-ce-60ddd5ef34686e1ea9edc82a6915a9e4738bee50.tar.gz |
Merge branch 'fix-projects-ajax-pagination' into 'master'
Fix projects pagination via ajax
Basically was not implemented. Finishes our projects list refactoring.
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
See merge request !3155
-rw-r--r-- | app/assets/javascripts/projects_list.js.coffee | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/assets/javascripts/projects_list.js.coffee b/app/assets/javascripts/projects_list.js.coffee index ed5206368ce..e4c4bf3b273 100644 --- a/app/assets/javascripts/projects_list.js.coffee +++ b/app/assets/javascripts/projects_list.js.coffee @@ -2,6 +2,7 @@ init: -> $(".projects-list-filter").off('keyup') this.initSearch() + this.initPagination() initSearch: -> @timer = null @@ -29,3 +30,8 @@ # 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" + + initPagination: -> + $('.projects-list-holder .pagination').on('ajax:success', (e, data) -> + $('.projects-list-holder').replaceWith(data.html) + ) |