mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed removing of Remove button and faulty variable adminTogg
This commit is contained in:
@@ -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{
|
||||
|
||||
@@ -37,18 +37,16 @@ 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"];
|
||||
longsongs = listeID["longsongs"];
|
||||
names=["vote","addsongs","longsongs","frontpage", "allvideos", "removeplay", "skip", "shuffle"];
|
||||
for (var i = 0; i < names.length; i++) {
|
||||
document.getElementsByName(names[i])[0].checked = (listeID[names[i]] === true);
|
||||
if(hasadmin)
|
||||
$("input[name="+names[i]+"]").attr("disabled", true);
|
||||
}
|
||||
if(listeID['adminpass'] == "" || w_p == false) hasadmin = false;
|
||||
else hasadmin = true;
|
||||
music = listeID["allvideos"];
|
||||
longsongs = listeID["longsongs"];
|
||||
names=["vote","addsongs","longsongs","frontpage", "allvideos", "removeplay", "skip", "shuffle"];
|
||||
for (var i = 0; i < names.length; i++) {
|
||||
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");
|
||||
|
||||
Reference in New Issue
Block a user