Added overlay for when its an empty playlist

This commit is contained in:
Kasper Rynning-Tønnesen
2015-05-01 09:43:36 +02:00
parent fd3e9c1bc0
commit 48b29a351d
4 changed files with 26 additions and 5 deletions

View File

@@ -188,6 +188,18 @@ hide mdi-action-visibility mdi-action-visibility-off
/*------------------- Channel page ---------------------------------------------------------------------------- */
#player_overlay{
background-color:black;
position: absolute;
top:0px;
width:97.7%;
color:white;
}
#player_overlay_text{
width:100%;
}
#searchform{
width: 50%;
margin-left: 25%;
@@ -565,7 +577,7 @@ hide mdi-action-visibility mdi-action-visibility-off
}
.control-list{
position: absolute !important;
width: 120px;
width: 120px;
}
.control-list li a{ min-width: 0px; width: 37px; padding: 0 0 0 5px;}
@@ -630,4 +642,4 @@ hide mdi-action-visibility mdi-action-visibility-off
height: 90%;
height: calc(100% - 64px);
}
}
}

View File

@@ -49,11 +49,14 @@ socket.on(chan.toLowerCase()+",np", function(obj)
console.log(obj);
if(obj[0].length == 0){
console.log("Empty list");
document.getElementById('song-title').innerHTML = "Empty channel. Add some songs!"
document.getElementById('song-title').innerHTML = "Empty channel. Add some songs!";
$("#player_overlay").height($("#player").height());
$("#player_overlay").toggleClass("hide");
importOldList(chan.toLowerCase());
}
else{
console.log("gotten new song");
$("#player_overlay").addClass("hide");
video_id = obj[0][0]["id"];
conf = obj[1][0];
time = obj[2];