Fixed removing of Remove button and faulty variable adminTogg

This commit is contained in:
Kasper Rynning-Tønnesen
2015-04-30 23:04:53 +02:00
parent 8ee2d1afa0
commit 34bc8953c0
3 changed files with 16 additions and 18 deletions

View File

@@ -1,4 +1,3 @@
var adminTogg = false;
var pass_corr = "";
@@ -86,6 +85,7 @@ function log_out(){
}
$("#admin-lock").addClass("mdi-action-lock");
$("#admin-lock").removeClass("mdi-action-lock-open clickable");
$(".card-action").addClass("hide");
document.getElementById("password").value = "";
Materialize.toast("Logged out", 4000);
}else{

View File

@@ -37,8 +37,6 @@ function populate_list(msg, conf_only)
if(listeID.hasOwnProperty('startTime')) //check if its config part of list
{
console.log("startTime");
if(!adminTogg)
{
if(listeID['adminpass'] == "" || w_p == false) hasadmin = false;
else hasadmin = true;
music = listeID["allvideos"];
@@ -48,7 +46,7 @@ function populate_list(msg, conf_only)
document.getElementsByName(names[i])[0].checked = (listeID[names[i]] === true);
if(hasadmin)
$("input[name="+names[i]+"]").attr("disabled", true);
}
/*if(hasadmin)
$("#setpass").text("Channel has admin");