Add an in-place MOTD editor

This commit is contained in:
calzoneman 2013-11-13 22:36:43 -06:00
parent 436df375c7
commit d09d7ad64e
6 changed files with 48 additions and 2 deletions

View file

@ -171,7 +171,11 @@ Callbacks = {
setMotd: function(data) {
CHANNEL.motd = data.html;
CHANNEL.motd_text = data.motd;
$("#motd").html(data.html);
if ($("#motdwrap").find(".motdeditor").length > 0) {
$("#motdwrap .motdeditor").val(CHANNEL.motd_text);
} else {
$("#motd").html(CHANNEL.motd);
}
$("#motdtext").val(CHANNEL.motd_text);
if(data.motd != "") {
$("#motdwrap").show();