mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
Fixed #129
This commit is contained in:
@@ -144,3 +144,9 @@
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<!--
|
||||
<li class="no-padding">
|
||||
<h5 id="desc-title">List description</h5>
|
||||
<span id="description"></span>
|
||||
</li>
|
||||
-->
|
||||
|
||||
@@ -186,7 +186,7 @@ io.on('connection', function(socket){
|
||||
}else
|
||||
{
|
||||
db.createCollection(coll, function(err, docs){
|
||||
db.collection(coll).insert({"addsongs":false, "adminpass":"", "allvideos":false, "frontpage":true, "longsongs":false, "removeplay": false, "shuffle": true, "skip": false, "skips": [], "startTime":get_time(), "views": [], "vote": false}, function(err, docs)
|
||||
db.collection(coll).insert({"addsongs":false, "adminpass":"", "allvideos":false, "frontpage":true, "longsongs":false, "removeplay": false, "shuffle": true, "skip": false, "skips": [], "startTime":get_time(), "views": [], "vote": false, "desc": ""}, function(err, docs)
|
||||
{
|
||||
send_list(coll, socket, true, false, true);
|
||||
|
||||
@@ -432,6 +432,8 @@ io.on('connection', function(socket){
|
||||
var adminpass = params[6];
|
||||
var skipping = params[7];
|
||||
var shuffling = params[8];
|
||||
var description = "";
|
||||
if(params.length == 10) description = params[9];
|
||||
|
||||
if(adminpass != "")
|
||||
var hash = hash_pass(adminpass);
|
||||
@@ -450,7 +452,8 @@ io.on('connection', function(socket){
|
||||
removeplay:removeplay,
|
||||
shuffle:shuffling,
|
||||
longsongs:longsongs,
|
||||
adminpass:hash}}, function(err, docs){
|
||||
adminpass:hash,
|
||||
desc: description}}, function(err, docs){
|
||||
db.collection(coll).find({views:{$exists:true}}, function(err, docs)
|
||||
{
|
||||
io.to(coll).emit("conf", docs);
|
||||
@@ -692,7 +695,10 @@ function send_list(coll, socket, send, list_send, configs)
|
||||
|
||||
if(configs)
|
||||
{
|
||||
db.collection(coll).find({views:{$exists:true}}, function(err, conf){
|
||||
db.collection(coll).find({views:{$exists:true}}, function(err, conf){
|
||||
if(conf[0].desc === undefined)
|
||||
db.collection(coll).update({views:{$exists:true}}, {$set:{"desc":""}});
|
||||
//db.collection(coll).update({views:{$exists:true}}, {$set:{"desc":""}}, function(err, d){console.log(d)});
|
||||
io.to(coll).emit("conf", conf);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -261,6 +261,10 @@ hide mdi-action-visibility mdi-action-visibility-off
|
||||
|
||||
/*------------------- Channel page ---------------------------------------------------------------------------- */
|
||||
|
||||
#description, #desc-title{
|
||||
color:#444;
|
||||
}
|
||||
|
||||
#main-row{
|
||||
margin-bottom:-64px;
|
||||
}
|
||||
@@ -496,7 +500,7 @@ ul #chat-log{
|
||||
text-transform: none;
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
content: "\e684";/*"\e800";*/
|
||||
content: "\e686";/*"\e800";*/
|
||||
color:white;
|
||||
font-size:65px;
|
||||
position:absolute;
|
||||
|
||||
@@ -149,6 +149,11 @@ var Admin = {
|
||||
$("#admin-lock").addClass("mdi-action-lock");
|
||||
$("#admin-lock").removeClass("mdi-action-lock-open clickable");
|
||||
}
|
||||
|
||||
/*if(conf_array.desc !== undefined)
|
||||
{
|
||||
document.getElementById("description").innerHTML = conf_array.desc;
|
||||
}*/
|
||||
},
|
||||
|
||||
submitAdmin: function(form)
|
||||
|
||||
Reference in New Issue
Block a user