mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Better admin settings
This commit is contained in:
14
js/admin.js
14
js/admin.js
@@ -4,7 +4,10 @@ var pass_corr = "";
|
||||
function admin()
|
||||
{
|
||||
adminTogg = !adminTogg;
|
||||
if(!adminTogg) $("#playlist").height($("#playlist").height()+$("#adminPanel").outerHeight(true));
|
||||
if(!adminTogg){
|
||||
$("#playlist").height($("#playlist").height()+$("#adminPanel").outerHeight(true));
|
||||
$("#passbox").focus();
|
||||
}
|
||||
$("#adminPanel").toggleClass("hiddenAdmin");
|
||||
if(adminTogg) $("#playlist").height($("#playlist").height()-$("#adminPanel").outerHeight(true));
|
||||
}
|
||||
@@ -32,6 +35,15 @@ function submitAdmin(form)
|
||||
}).responseText;
|
||||
|
||||
pass_corr = confRes;
|
||||
|
||||
if(pass_corr=="correct"){
|
||||
$("#adminPanel").addClass("success");
|
||||
}else{ $("#adminPanel").addClass("fadeerror"); alert("Wrong password :(")}
|
||||
|
||||
console.log(pass_corr);
|
||||
updateList();
|
||||
setTimeout(function(){
|
||||
$("#adminPanel").removeClass("success");
|
||||
$("#adminPanel").removeClass("fadeerror");
|
||||
},1500);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user