From 94a3d3ebc19b581498e4542a7ff15d86a419de09 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Wed, 3 Jan 2018 20:44:59 +0100 Subject: [PATCH] Add a More-button for collapsing the list after the first horizontal ruler --- static/js/wishlists.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/static/js/wishlists.js b/static/js/wishlists.js index 757191d..b3b2ef2 100644 --- a/static/js/wishlists.js +++ b/static/js/wishlists.js @@ -97,6 +97,16 @@ function updateListHTML(listElem) { $("ul > li", listHtmlElem).has('input[type="checkbox"]') .parent() .addClass("tasklist"); + if (listHtmlElem.find('hr').length) { + listHtmlElem.find('hr') + .nextAll() + .wrapAll('
') + listHtmlElem.append('
' + + '' + + '
'); + } }).fail(function(html, textMsg, error) { listHtmlElem.html("

Kan lijst niet tonen!

" + "

(Technische foutmelding: " + error +