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>
</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
</a>
</p>

View File

@@ -2,5 +2,5 @@
cd /var/www
git stash
git pull
./setperms.sh
scripts/./setperms.sh
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")
{
db.collection(name).find({views:{$exists:true}}, function(err, conf){
db.collection(name).count(function(err, num){
db.collection(name).find({now_playing:true}, function(err, np){
complete(np, i, colNames.length-2, name, num-1, conf);
i++;
db.collection(name).count(function(err, num){
db.collection(name).find({now_playing:true}, function(err, np){
complete(np, i, colNames.length-2, name, num-1, conf);
i++;
});
});
});
});
}
});

View File

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