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:
parent
2697bb9a36
commit
2d57aa43f1
@ -222,7 +222,9 @@ function webSocketConnect() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$('#queueList > tbody').empty();
|
$('#queueList > tbody').empty();
|
||||||
|
var nrItems=0;
|
||||||
for (var song in obj.data) {
|
for (var song in obj.data) {
|
||||||
|
nrItems++;
|
||||||
if (obj.data[song].type == 'wrap') {
|
if (obj.data[song].type == 'wrap') {
|
||||||
$('#queueList > tbody').append(
|
$('#queueList > tbody').append(
|
||||||
"<tr><td><span class=\"material-icons\">error_outline</span></td>" +
|
"<tr><td><span class=\"material-icons\">error_outline</span></td>" +
|
||||||
@ -243,6 +245,13 @@ function webSocketConnect() {
|
|||||||
"<td>"+ minutes + ":" + (seconds < 10 ? '0' : '') + seconds +
|
"<td>"+ minutes + ":" + (seconds < 10 ? '0' : '') + seconds +
|
||||||
"</td><td></td></tr>");
|
"</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.type == 'queue') {
|
||||||
if(obj.data.length && obj.data[obj.data.length-1].pos + 1 >= pagination + MAX_ELEMENTS_PER_PAGE) {
|
if(obj.data.length && obj.data[obj.data.length-1].pos + 1 >= pagination + MAX_ELEMENTS_PER_PAGE) {
|
||||||
$('#queueNext').removeClass('disabled');
|
$('#queueNext').removeClass('disabled');
|
||||||
|
Loading…
Reference in New Issue
Block a user