Merge branch 'master' of github.com:nixolas1/Zoff

This commit is contained in:
Nicolas A. Tonne
2015-04-30 23:32:45 +02:00
6 changed files with 21 additions and 21 deletions

View File

@@ -138,7 +138,7 @@ if(isset($_GET['chan'])){
</a> </a>
</p> </p>
<p> <p>
<a class="waves-effect waves-light btn light-blue share" href="http://twitter.com/intent/tweet?url=http://<?php echo $_SERVER['HTTP_HOST']; ?>&text=Check out this playlist <?php echo ucfirst($list); ?> on Zöff!&via=zoffmusic" target="popup" onclick="window.open('http://twitter.com/intent/tweet?url=http://<?php echo $_SERVER['HTTP_HOST']; ?>&text=Check out this playlist <?php echo ucfirst($list); ?> on Zöff!&via=zoffmusic','Share Playlist','width=600,height=300')"> <a class="waves-effect waves-light btn light-blue share" href="http://twitter.com/intent/tweet?url=http://<?php echo $_SERVER['HTTP_HOST']; ?>&text=Check out Zöff!&via=zoffmusic" target="popup" onclick="window.open('http://twitter.com/intent/tweet?url=http://<?php echo $_SERVER['HTTP_HOST']; ?>&text=Check out Zöff!&via=zoffmusic','Share Playlist','width=600,height=300')">
<img class="left" src="static/images/twitter.png">Share on Twitter <img class="left" src="static/images/twitter.png">Share on Twitter
</a> </a>
</p> </p>

View File

@@ -2,5 +2,5 @@
cd /var/www cd /var/www
git stash git stash
git pull git pull
./setperms.sh scripts/./setperms.sh
forever restartall forever restartall

View File

@@ -1 +1 @@
ssh -p 1911 root@zoff.no '/var/www/getnew.sh' ssh -p 1911 root@zoff.no '/var/www/scripts/getnew.sh'

View File

@@ -42,12 +42,12 @@ io.on('connection', function(socket){
if(name != "system.indexes") if(name != "system.indexes")
{ {
db.collection(name).find({views:{$exists:true}}, function(err, conf){ db.collection(name).find({views:{$exists:true}}, function(err, conf){
db.collection(name).count(function(err, num){ db.collection(name).count(function(err, num){
db.collection(name).find({now_playing:true}, function(err, np){ db.collection(name).find({now_playing:true}, function(err, np){
complete(np, i, colNames.length-2, name, num-1, conf); complete(np, i, colNames.length-2, name, num-1, conf);
i++; i++;
});
}); });
});
}); });
} }
}); });

View File

@@ -1,4 +1,3 @@
var adminTogg = false;
var pass_corr = ""; var pass_corr = "";
@@ -86,8 +85,11 @@ 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");
adminpass = "";
document.getElementById("password").value = ""; document.getElementById("password").value = "";
Materialize.toast("Logged out", 4000); Materialize.toast("Logged out", 4000);
refresh_scroll();
}else{ }else{
Materialize.toast("Not logged in", 4000); Materialize.toast("Not logged in", 4000);
} }

View File

@@ -37,18 +37,16 @@ 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;
{ else hasadmin = true;
if(listeID['adminpass'] == "" || w_p == false) hasadmin = false; music = listeID["allvideos"];
else hasadmin = true; longsongs = listeID["longsongs"];
music = listeID["allvideos"]; names=["vote","addsongs","longsongs","frontpage", "allvideos", "removeplay", "skip", "shuffle"];
longsongs = listeID["longsongs"]; for (var i = 0; i < names.length; i++) {
names=["vote","addsongs","longsongs","frontpage", "allvideos", "removeplay", "skip", "shuffle"]; document.getElementsByName(names[i])[0].checked = (listeID[names[i]] === true);
for (var i = 0; i < names.length; i++) { if(hasadmin)
document.getElementsByName(names[i])[0].checked = (listeID[names[i]] === true); $("input[name="+names[i]+"]").attr("disabled", true);
if(hasadmin)
$("input[name="+names[i]+"]").attr("disabled", true);
}
/*if(hasadmin) /*if(hasadmin)
$("#setpass").text("Channel has admin"); $("#setpass").text("Channel has admin");