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 = ""; var pass_corr = "";
@@ -86,6 +85,7 @@ function log_out(){
} }
$("#admin-lock").addClass("mdi-action-lock"); $("#admin-lock").addClass("mdi-action-lock");
$("#admin-lock").removeClass("mdi-action-lock-open clickable"); $("#admin-lock").removeClass("mdi-action-lock-open clickable");
$(".card-action").addClass("hide");
document.getElementById("password").value = ""; document.getElementById("password").value = "";
Materialize.toast("Logged out", 4000); Materialize.toast("Logged out", 4000);
}else{ }else{

View File

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