Commit f8e220b6 authored by Rémy Coutable's avatar Rémy Coutable

Fix "Show all" link behavior

Fixes #14168
parent fe4d3abe
......@@ -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)
......
......@@ -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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment