Add a small toggle for the MOTD
This commit is contained in:
parent
abc9c398f4
commit
75ea06ed76
4 changed files with 29 additions and 4 deletions
|
|
@ -173,10 +173,15 @@ Callbacks = {
|
|||
CHANNEL.motd_text = data.motd;
|
||||
$("#motd").html(data.html);
|
||||
$("#motdtext").val(CHANNEL.motd_text);
|
||||
if(data.motd != "")
|
||||
if(data.motd != "") {
|
||||
$("#motdwrap").show();
|
||||
$("#motd").show();
|
||||
$("#togglemotd").find(".icon-plus")
|
||||
.removeClass("icon-plus")
|
||||
.addClass("icon-minus");
|
||||
}
|
||||
else
|
||||
$("#motd").hide();
|
||||
$("#motdwrap").hide();
|
||||
},
|
||||
|
||||
chatFilters: function(entries) {
|
||||
|
|
|
|||
|
|
@ -45,6 +45,20 @@ generateToggle("#librarytoggle", "#librarywrap");
|
|||
generateToggle("#userpltoggle", "#userplaylistwrap");
|
||||
generateToggle("#playlisttoggle", "#playlist_controls");
|
||||
|
||||
$("#togglemotd").click(function () {
|
||||
var hidden = $("#motd").css("display") === "none";
|
||||
$("#motd").toggle();
|
||||
if (hidden) {
|
||||
$("#togglemotd").find(".icon-plus")
|
||||
.removeClass("icon-plus")
|
||||
.addClass("icon-minus");
|
||||
} else {
|
||||
$("#togglemotd").find(".icon-minus")
|
||||
.removeClass("icon-minus")
|
||||
.addClass("icon-plus");
|
||||
}
|
||||
});
|
||||
|
||||
/* navbar stuff */
|
||||
$("#optlink").click(showOptionsMenu);
|
||||
$("#chatonly").click(chatOnly);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue