mirror of https://github.com/calzoneman/sync.git
Add a small toggle for the MOTD
This commit is contained in:
parent
abc9c398f4
commit
75ea06ed76
|
@ -1,3 +1,7 @@
|
|||
Wed Oct 02 22:25 2013 CDT
|
||||
* www/channel.html, www/assets/js/ui.js, www/assets/js/callbacks.js:
|
||||
Add a small toggle for the MOTD
|
||||
|
||||
Wed Oct 02 09:35 2013 CDT
|
||||
* lib/channel.js: Fix the use of the wrong variable when checking for
|
||||
maximum video length
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -48,9 +48,11 @@
|
|||
<div class="container" id="mainpage">
|
||||
<!-- top row (MOTD, drink count) -->
|
||||
<div class="row-fluid" id="toprow">
|
||||
<div class="well span12" id="motd">
|
||||
<div class="well" id="motdwrap">
|
||||
<button class="close pull-right" id="togglemotd"><i class="icon-minus"></i></button>
|
||||
<div id="motd"></div>
|
||||
</div>
|
||||
<div class="span12" id="drinkbar">
|
||||
<div id="drinkbar">
|
||||
<h1 id="drinkcount"></h1>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue