1
0
mirror of https://github.com/SuperBFG7/ympd synced 2024-12-25 10:30:26 +00:00

Feat: hide column buttons, if tags are not enabled

This commit is contained in:
jcorporation 2018-10-25 22:49:02 +01:00
parent 5f012c83a2
commit 610ecc84da
2 changed files with 8 additions and 8 deletions

View File

@ -155,7 +155,7 @@
</div>
<button data-href='{"cmd": "gotoPage", "options": ["next"]}' id="QueuePaginationTopNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">&raquo;</button>
</div>
<div class="btn-group mr-2">
<div class="btn-group mr-2 featTags">
<button id="QueueColsBtn" class="btn btn-secondary dropdown-toggle material-icons" type="button" data-toggle="dropdown">settings</button>
<div class="dropdown-menu bg-dark px-2" id="QueueColsDropdown"><form></form>
<button data-href='{"cmd": "saveCols", "options": ["Queue"]}' class="btn btn-success btn-block btn-sm mt-2">Apply</button>
@ -237,7 +237,7 @@
</div>
<button data-href='{"cmd": "gotoPage", "options": ["next"]}' id="BrowsePlaylistsPaginationTopNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">&raquo;</button>
</div>
<div class="btn-group mr-2 hide">
<div class="btn-group mr-2 hide featTags">
<button id="BrowsePlaylistsDetailColsBtn" class="btn btn-secondary dropdown-toggle material-icons" type="button" data-toggle="dropdown">settings</button>
<div class="dropdown-menu bg-dark px-2" id="BrowsePlaylistsDetailColsDropdown"><form></form>
<button data-href='{"cmd": "saveCols", "options": ["BrowsePlaylistsDetail"]}' class="btn btn-success btn-block btn-sm mt-2">Apply</button>
@ -390,7 +390,7 @@
</div>
<button data-href='{"cmd": "gotoPage", "options": ["next"]}' id="BrowseFilesystemPaginationTopNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">&raquo;</button>
</div>
<div class="btn-group mr-2">
<div class="btn-group mr-2 featTags">
<button id="BrowseFilesystemColsBtn" class="btn btn-secondary dropdown-toggle material-icons" type="button" data-toggle="dropdown">settings</button>
<div class="dropdown-menu bg-dark px-2" id="BrowseFilesystemColsDropdown"><form></form>
<button data-href='{"cmd": "saveCols", "options": ["BrowseFilesystem"]}' class="btn btn-success btn-block btn-sm mt-2">Apply</button>
@ -476,7 +476,7 @@
</div>
<button data-href='{"cmd": "gotoPage", "options": ["next"]}' id="SearchPaginationTopNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">&raquo;</button>
</div>
<div class="btn-group mr-2">
<div class="btn-group mr-2 featTags">
<button id="SearchColsBtn" class="btn btn-secondary dropdown-toggle material-icons" type="button" data-toggle="dropdown">settings</button>
<div class="dropdown-menu bg-dark px-2" id="SearchColsDropdown"><form></form>
<button data-href='{"cmd": "saveCols", "options": ["Search"]}' class="btn btn-success btn-block btn-sm mt-2">Apply</button>

View File

@ -959,7 +959,6 @@ function filterCols(x) {
cols.push(settings[x][i]);
}
settings[x] = cols;
settings[x].sort();
}
function parseSettings(obj) {
@ -1352,7 +1351,7 @@ function parseQueue(obj) {
row.setAttribute('draggable','true');
row.setAttribute('data-trackid', obj.data[i].id);
row.setAttribute('id','queueTrackId' + obj.data[i].id);
row.setAttribute('data-songpos', (obj.data[i].pos + 1));
row.setAttribute('data-songpos', (obj.data[i].Pos + 1));
row.setAttribute('data-duration', obj.data[i].Duration);
row.setAttribute('data-uri', obj.data[i].uri);
var tds = '';
@ -1414,7 +1413,7 @@ function parseFilesystem(obj) {
var row = document.createElement('tr');
row.setAttribute('data-type', obj.data[i].Type);
row.setAttribute('data-uri', uri);
if (obj.data[i].type == 'song')
if (obj.data[i].Type == 'song')
row.setAttribute('data-name', obj.data[i].Title);
else
row.setAttribute('data-name', obj.data[i].name);
@ -1502,7 +1501,8 @@ function parsePlaylists(obj) {
document.getElementById('BrowsePlaylistsDetailList').classList.remove('hide');
document.getElementById('BrowsePlaylistsAllList').classList.add('hide');
document.getElementById('btnBrowsePlaylistsAll').parentNode.classList.remove('hide');
document.getElementById('BrowsePlaylistsDetailColsBtn').parentNode.classList.remove('hide');
if (settings.featTags)
document.getElementById('BrowsePlaylistsDetailColsBtn').parentNode.classList.remove('hide');
}
var nrItems = obj.data.length;