mirror of
https://github.com/SuperBFG7/ympd
synced 2024-12-26 11:00:27 +00:00
Feat: collapse title list in album view
This commit is contained in:
parent
9ef69f3c08
commit
997928790c
@ -33,10 +33,6 @@ button {
|
||||
}
|
||||
|
||||
|
||||
.card {
|
||||
min-height: 350px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 576px) {
|
||||
.header-logo {
|
||||
display:none !important;
|
||||
|
@ -1341,7 +1341,11 @@ function parseListDBtags(obj) {
|
||||
' <div class="card-body">' +
|
||||
' <h5 class="card-title" id="albumartist' + id + '"></h5>' +
|
||||
' <h4 class="card-title">' + obj.data[i].value + '</h4>' +
|
||||
' <table class="table table-sm table-hover" id="tbl' + id + '"><tbody></tbody></table'+
|
||||
' <a class="color-darkgrey" data-toggle="collapse" href="#collapse' + id +'" id="collapseLink' + id +'">' +
|
||||
' <span class="material-icons">keyboard_arrow_right</span> Show Titles</a> ' +
|
||||
' <div class="collapse" id="collapse' + id +'">' +
|
||||
' <table class="table table-sm table-hover" id="tbl' + id + '"><tbody></tbody></table>'+
|
||||
' </div>' +
|
||||
' </div>'+
|
||||
'</div>';
|
||||
|
||||
@ -1433,6 +1437,16 @@ function parseListTitles(obj) {
|
||||
img.setAttribute('data-type', 'dir');
|
||||
document.getElementById('albumartist' + id).innerText = obj.albumartist;
|
||||
|
||||
var titleTable = document.getElementById('collapseLink' + id);
|
||||
var myCollapseInit = new Collapse(titleTable);
|
||||
|
||||
document.getElementById('collapse' + id).addEventListener('show.bs.collapse', function() {
|
||||
titleTable.innerHTML = '<span class="material-icons">keyboard_arrow_down</span> Hide Titles';
|
||||
}, false);
|
||||
document.getElementById('collapse' + id).addEventListener('hidden.bs.collapse', function() {
|
||||
titleTable.innerHTML = '<span class="material-icons">keyboard_arrow_right</span> Show Titles';
|
||||
}, false);
|
||||
|
||||
var titleList = '';
|
||||
var nrItems = obj.data.length;
|
||||
for (var i = 0; i < nrItems; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user