mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Merge branch 'dev' of github.com:nixolas1/Zoff into dev
Conflicts: static/js/search.js
This commit is contained in:
@@ -28,7 +28,7 @@ socket.on("skipping", function(obj)
|
||||
|
||||
function populate_list(msg, conf_only)
|
||||
{
|
||||
console.log(msg);
|
||||
//console.log(msg);
|
||||
console.log(conf_only);
|
||||
if(!conf_only)
|
||||
$("#wrapper").empty();
|
||||
@@ -84,7 +84,7 @@ function populate_list(msg, conf_only)
|
||||
{
|
||||
player_name = "#jplayer";
|
||||
}else player_name = "#player";
|
||||
|
||||
|
||||
if(scroller === false)
|
||||
{
|
||||
myScroll = new IScroll('#playlist', {
|
||||
|
||||
@@ -21,10 +21,22 @@ $(document).ready(function()
|
||||
}
|
||||
});
|
||||
|
||||
$("body").keyup(function(event) {
|
||||
if(event.keyCode == 27){
|
||||
$("#results").html("");
|
||||
$(".main").removeClass("blurT");
|
||||
$("#controls").removeClass("blurT");
|
||||
$(".main").removeClass("clickthrough");
|
||||
if(!contains($("#search-wrapper").attr("class").split(" "), "hide"))
|
||||
$("#search-wrapper").toggleClass("hide");
|
||||
if(contains($("#song-title").attr("class").split(" "), "hide"))
|
||||
$("#song-title").toggleClass("hide");
|
||||
}
|
||||
});
|
||||
|
||||
$(".search_input").focus();
|
||||
$(".search_input").keyup(function(event) {
|
||||
search_input = $(this).val();
|
||||
console.log(search_input);
|
||||
if(event.keyCode == 13 && search_input == "fireplace")
|
||||
{
|
||||
if(!peis)
|
||||
@@ -45,12 +57,6 @@ $(document).ready(function()
|
||||
if(search_input.length < 3){$("#results").html("");}
|
||||
if(event.keyCode == 13){
|
||||
search(search_input);
|
||||
}else if(event.keyCode == 27){
|
||||
$("#results").html("");
|
||||
$(".main").removeClass("blurT");
|
||||
$("#controls").removeClass("blurT");
|
||||
$(".main").removeClass("clickthrough");
|
||||
showSearch();
|
||||
}else{
|
||||
i = 0;
|
||||
timer=100;
|
||||
@@ -250,3 +256,14 @@ function durationToSeconds(duration) {
|
||||
seconds= parseInt(matches[16])||0
|
||||
return hours*60*60+minutes*60+seconds;
|
||||
}
|
||||
|
||||
|
||||
function contains(a, obj) {
|
||||
var i = a.length;
|
||||
while (i--) {
|
||||
if (a[i] === obj) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -224,6 +224,8 @@ function errorHandler(newState)
|
||||
{
|
||||
if(video_id !== undefined)
|
||||
{
|
||||
console.log(video_id);
|
||||
console.log(ytplayer.getVideoUrl());
|
||||
console.log("errorskip");
|
||||
socket.emit("skip");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user