mirror of https://github.com/calzoneman/sync.git
Tweaks to ACP and channel options
This commit is contained in:
parent
6944ea930e
commit
0365de5a1a
29
user.js
29
user.js
|
@ -241,8 +241,8 @@ User.prototype.handleAdm = function(data) {
|
||||||
var chans = [];
|
var chans = [];
|
||||||
for(var chan in Server.channels) {
|
for(var chan in Server.channels) {
|
||||||
var nowplaying = "-";
|
var nowplaying = "-";
|
||||||
if(Server.channels[chan].currentMedia != null)
|
if(Server.channels[chan].media != null)
|
||||||
nowplaying = Server.channels[chan].currentMedia.title;
|
nowplaying = Server.channels[chan].media.title;
|
||||||
chans.push({
|
chans.push({
|
||||||
name: chan,
|
name: chan,
|
||||||
usercount: Server.channels[chan].users.length,
|
usercount: Server.channels[chan].users.length,
|
||||||
|
@ -254,31 +254,6 @@ User.prototype.handleAdm = function(data) {
|
||||||
chans: chans
|
chans: chans
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if(data.cmd == "listusers") {
|
|
||||||
var users = [];
|
|
||||||
var dbusers = Database.listUsers();
|
|
||||||
if(!dbusers)
|
|
||||||
return;
|
|
||||||
for(var i = 0; i < dbusers.length; i++) {
|
|
||||||
users[i] = {
|
|
||||||
name: dbusers[i].uname,
|
|
||||||
rank: dbusers[i].global_rank
|
|
||||||
};
|
|
||||||
}
|
|
||||||
this.socket.emit("adm", {
|
|
||||||
cmd: "listusers",
|
|
||||||
users: users
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else if(data.cmd == "listchannelranks") {
|
|
||||||
if(data.chan == undefined)
|
|
||||||
return;
|
|
||||||
this.socket.emit("adm", {
|
|
||||||
cmd: "listchannelranks",
|
|
||||||
ranks: Database.listChannelRanks(data.chan)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Attempt to login
|
// Attempt to login
|
||||||
|
|
|
@ -48,6 +48,9 @@ function initCallbacks() {
|
||||||
cmd: "listchannels"
|
cmd: "listchannels"
|
||||||
});
|
});
|
||||||
}, 10000);
|
}, 10000);
|
||||||
|
socket.emit("adm", {
|
||||||
|
cmd: "listchannels"
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,9 +57,9 @@ function initCallbacks() {
|
||||||
$("#opt_pagetitle").attr("placeholder", opts.pagetitle);
|
$("#opt_pagetitle").attr("placeholder", opts.pagetitle);
|
||||||
document.title = opts.pagetitle;
|
document.title = opts.pagetitle;
|
||||||
PAGETITLE = opts.pagetitle;
|
PAGETITLE = opts.pagetitle;
|
||||||
$("#opt_customcss").attr("placeholder", opts.customcss);
|
$("#opt_customcss").val(opts.customcss);
|
||||||
$("#customCss").remove();
|
$("#customCss").remove();
|
||||||
if(opts.customcss != "") {
|
if(opts.customcss.trim() != "") {
|
||||||
$("<link/>").attr("rel", "stylesheet")
|
$("<link/>").attr("rel", "stylesheet")
|
||||||
.attr("href", opts.customcss)
|
.attr("href", opts.customcss)
|
||||||
.attr("id", "customCss")
|
.attr("id", "customCss")
|
||||||
|
|
|
@ -268,8 +268,6 @@ $("#opt_submit").click(function() {
|
||||||
if(ptitle == "")
|
if(ptitle == "")
|
||||||
ptitle = $("#opt_pagetitle").attr("placeholder")
|
ptitle = $("#opt_pagetitle").attr("placeholder")
|
||||||
var css = $("#opt_customcss").val();
|
var css = $("#opt_customcss").val();
|
||||||
if(css == "")
|
|
||||||
css = $("#opt_customcss").attr("placeholder");
|
|
||||||
opts = {
|
opts = {
|
||||||
qopen_allow_qnext: $("#opt_qopen_allow_qnext").prop("checked"),
|
qopen_allow_qnext: $("#opt_qopen_allow_qnext").prop("checked"),
|
||||||
qopen_allow_move: $("#opt_qopen_allow_move").prop("checked"),
|
qopen_allow_move: $("#opt_qopen_allow_move").prop("checked"),
|
||||||
|
|
Loading…
Reference in New Issue