Fix polls, MOTD/CSS/JS text
This commit is contained in:
parent
db1682fc35
commit
e52307cdfa
4 changed files with 130 additions and 119 deletions
|
|
@ -99,7 +99,9 @@ Callbacks = {
|
|||
},
|
||||
|
||||
setMotd: function(data) {
|
||||
CHANNEL.motd = data.html;
|
||||
$("#motd").html(data.html);
|
||||
$("#motdtext").val(CHANNEL.motd);
|
||||
if(data.motd != "")
|
||||
$("#motd").show();
|
||||
else
|
||||
|
|
@ -336,6 +338,9 @@ Callbacks = {
|
|||
$("#chancss").remove();
|
||||
$("#chanjs").remove();
|
||||
|
||||
CHANNEL.css = data.css;
|
||||
CHANNEL.js = data.js;
|
||||
|
||||
$("#csstext").val(data.css);
|
||||
$("#jstext").val(data.js);
|
||||
|
||||
|
|
@ -811,6 +816,7 @@ Callbacks = {
|
|||
for(var i = 0; i < data.options.length; i++) {
|
||||
(function(i) {
|
||||
var callback = function() {
|
||||
console.log("vote", i);
|
||||
socket.emit("vote", {
|
||||
option: i
|
||||
});
|
||||
|
|
@ -830,7 +836,7 @@ Callbacks = {
|
|||
},
|
||||
|
||||
updatePoll: function(data) {
|
||||
var poll = $("#pollcontainer .active");
|
||||
var poll = $("#pollwrap .active");
|
||||
var i = 0;
|
||||
poll.find(".option button").each(function() {
|
||||
$(this).text(data.counts[i]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue