1
0
mirror of https://github.com/SuperBFG7/ympd synced 2025-01-11 18:00:36 +00:00

Queue Search Empty List

This commit is contained in:
jcorporation 2018-05-25 17:20:26 +01:00
parent 2697bb9a36
commit 2d57aa43f1

View File

@ -222,7 +222,9 @@ function webSocketConnect() {
}
$('#queueList > tbody').empty();
var nrItems=0;
for (var song in obj.data) {
nrItems++;
if (obj.data[song].type == 'wrap') {
$('#queueList > tbody').append(
"<tr><td><span class=\"material-icons\">error_outline</span></td>" +
@ -243,6 +245,13 @@ function webSocketConnect() {
"<td>"+ minutes + ":" + (seconds < 10 ? '0' : '') + seconds +
"</td><td></td></tr>");
}
if (obj.type == 'queuesearch' && nrItems == 0) {
$('#queueList > tbody').append(
"<tr><td><span class=\"material-icons\">error_outline</span></td>" +
"<td colspan=\"3\">No results, please refine your search!</td>" +
"<td></td><td></td></tr>"
);
}
if (obj.type == 'queue') {
if(obj.data.length && obj.data[obj.data.length-1].pos + 1 >= pagination + MAX_ELEMENTS_PER_PAGE) {
$('#queueNext').removeClass('disabled');