summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG5
-rw-r--r--app/assets/javascripts/projects_list.js.coffee14
2 files changed, 13 insertions, 6 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 64ed97e0aae..64c9864ae6f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -14,8 +14,9 @@ v 8.6.0 (unreleased)
- Increase the notes polling timeout over time (Roberto Dip)
v 8.5.5
- - Ensure removing a project removes associated Todo entries.
- - Prevent a 500 error in Todos when author was removed.
+ - Ensure removing a project removes associated Todo entries
+ - Prevent a 500 error in Todos when author was removed
+ - Fix "Show all" link behavior
v 8.5.4
- Do not cache requests for badges (including builds badge)
diff --git a/app/assets/javascripts/projects_list.js.coffee b/app/assets/javascripts/projects_list.js.coffee
index eab34be652a..a57c37e0702 100644
--- a/app/assets/javascripts/projects_list.js.coffee
+++ b/app/assets/javascripts/projects_list.js.coffee
@@ -2,20 +2,26 @@ class @ProjectsList
constructor: ->
$(".projects-list .js-expand").on 'click', (e) ->
e.preventDefault()
- list = $(this).closest('.projects-list')
+ $projectsList = $(this).closest('.projects-list')
+ ProjectsList.showPagination($projectsList)
+ $projectsList.find('li.bottom').hide()
$("#filter_projects").on 'keyup', ->
ProjectsList.filter_results($("#filter_projects"))
+ @showPagination: ($projectsList) ->
+ $projectsList.find('li').show()
+ $('.gl-pagination').show()
+
@filter_results: ($element) ->
terms = $element.val()
filterSelector = $element.data('filter-selector') || 'span.filter-title'
+ $projectsList = $('.projects-list')
if not terms
- $(".projects-list li").show()
- $('.gl-pagination').show()
+ ProjectsList.showPagination($projectsList)
else
- $(".projects-list li").each (index) ->
+ $projectsList.find('li').each (index) ->
$this = $(this)
name = $this.find(filterSelector).text()