Add an in-place MOTD editor
This commit is contained in:
parent
436df375c7
commit
d09d7ad64e
6 changed files with 48 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue