From cd14727a3baae9036d8792582b528134c1900568 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Wed, 3 Jan 2018 21:08:19 +0100 Subject: [PATCH] Also change the label of the More-button when (un)collapsed --- static/js/wishlists.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/static/js/wishlists.js b/static/js/wishlists.js index b3b2ef2..0419e13 100644 --- a/static/js/wishlists.js +++ b/static/js/wishlists.js @@ -102,10 +102,20 @@ function updateListHTML(listElem) { .nextAll() .wrapAll('
') listHtmlElem.append('
' + - '' + '
'); + + var listMoreButton = listHtmlElem.find(".list-more-toggle"); + console.debug(listMoreButton); + listHtmlElem.find('.list-more') + .on('shown.bs.collapse', function() { + listMoreButton.text('Minder…'); + }).on('hidden.bs.collapse', function() { + listMoreButton.text('Meer…'); + }); } }).fail(function(html, textMsg, error) { listHtmlElem.html("

Kan lijst niet tonen!

" +