Add a More-button for collapsing the list after the first horizontal ruler
This commit is contained in:
parent
4dd1fef41b
commit
94a3d3ebc1
|
@ -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('<div class="collapse list-more"/>')
|
||||
listHtmlElem.append('<div class="row justify-content-center">' +
|
||||
'<button class="btn btn-sm btn-light text-dark" data-toggle="collapse" ' +
|
||||
'data-target=".list[data-list-id=\'' + listId + '\'] .list-more">' +
|
||||
'Meer…</button>' +
|
||||
'</div>');
|
||||
}
|
||||
}).fail(function(html, textMsg, error) {
|
||||
listHtmlElem.html("<h3><i>Kan lijst niet tonen!</i></h3>" +
|
||||
"<p class='pt-2'><small><i>(Technische foutmelding: " + error +
|
||||
|
|
Loading…
Reference in New Issue