Display and hide on frontpage only not working

This commit is contained in:
Kasper Rynning-Tønnesen
2015-04-10 14:56:14 +02:00
parent 4e6b0386b1
commit 65f28cff99
5 changed files with 179 additions and 45 deletions

View File

@@ -1,10 +1,10 @@
var adminTogg = false;
var pass_corr = "";
socket.on("success_settings", function()
socket.on("success_settings", function(msg)
{
pass_corr = "correct";
document.getElementById("sBar").innerHTML = "Successfully applied settings.";
document.getElementById("sBar").innerHTML = msg;
$("#sBar").addClass("opacityFull");
document.getElementById("passbox").value = "";
remove_bar();
@@ -106,6 +106,7 @@ function remove_bar()
function shuffle(form)
{
console.log(adminpass);
socket.emit('shuffle', adminpass);
/*
confRes = $.ajax({
type: "GET",

View File

@@ -186,7 +186,14 @@ function submitAndClose(id,title){
function submit(id,title,type){
socket.emit("add", [id, title, adminpass]);
socket.emit("add", [id, decodeURI(title), adminpass]);
if(type){
document.getElementById("search").value = "";
$("#results").html = "";
$(".main").removeClass("blurT");
$("#controls").removeClass("blurT");
$(".main").removeClass("clickthrough");
}
/*
serverAns = $.ajax({
type: "GET",

View File

@@ -55,10 +55,9 @@ socket.on(chan.toLowerCase()+",np", function(obj)
console.log(seekTo);
if(player_ready)
{
if(!playing){
if(ytplayer.getVideoUrl().split('v=')[1] != video_id)
ytplayer.loadVideoById(video_id);
ytplayer.playVideo();
}
ytplayer.playVideo();
ytplayer.seekTo(seekTo);
}
});