diff --git a/templates/channel.jade b/templates/channel.jade index a28e703a..c0f1aa9d 100644 --- a/templates/channel.jade +++ b/templates/channel.jade @@ -38,7 +38,7 @@ html(lang="en") #main.row #chatwrap.col-lg-5.col-md-5 #chatheader - i#userlisttoggle.glyphicon.glyphicon-chevron-right.pull-left.pointer(title="Show/Hide Userlist") + i#userlisttoggle.glyphicon.glyphicon-chevron-down.pull-left.pointer(title="Show/Hide Userlist") span#usercount.pointer Not Connected span#modflair.label.label-default.pull-right.pointer M span#adminflair.label.label-default.pull-right.pointer A diff --git a/www/js/ui.js b/www/js/ui.js index ccdca705..287bfb77 100644 --- a/www/js/ui.js +++ b/www/js/ui.js @@ -707,10 +707,13 @@ $("#cs-emotes-import").click(function () { }); var toggleUserlist = function () { + var direction = !USEROPTS.layout.match(/synchtube/) ? "glyphicon-chevron-right" : "glyphicon-chevron-left" if ($("#userlist").css("display") === "none") { $("#userlist").show(); + $("#userlisttoggle").removeClass(direction).addClass("glyphicon-chevron-down"); } else { $("#userlist").hide(); + $("#userlisttoggle").removeClass("glyphicon-chevron-down").addClass(direction); } scrollChat(); }; diff --git a/www/js/util.js b/www/js/util.js index 7b6947b3..cc758276 100644 --- a/www/js/util.js +++ b/www/js/util.js @@ -1502,19 +1502,26 @@ function pingMessage(isHighlight) { function compactLayout() { /* Undo synchtube layout */ if ($("body").hasClass("synchtube")) { + $("body").removeClass("synchtube") $("#chatwrap").detach().insertBefore($("#videowrap")); $("#leftcontrols").detach().insertBefore($("#rightcontrols")); $("#leftpane").detach().insertBefore($("#rightpane")); $("#userlist").css("float", "left"); + if($("#userlisttoggle").hasClass("glyphicon-chevron-left")){ + $("#userlisttoggle").removeClass("glyphicon-chevron-left").addClass("glyphicon-chevron-right") + } + $("#userlisttoggle").removeClass("pull-right").addClass("pull-left") } /* Undo fluid layout */ if ($("body").hasClass("fluid")) { + $("body").removeClass("fluid") $(".container-fluid").removeClass("container-fluid").addClass("container"); } /* Undo HD layout */ if ($("body").hasClass("hd")) { + $("body").removeClass("hd"); $("#drinkbar").detach().removeClass().addClass("col-lg-12 col-md-12") .appendTo("#drinkbarwrap"); $("#chatwrap").detach().removeClass().addClass("col-lg-5 col-md-5") @@ -1544,7 +1551,6 @@ function compactLayout() { $("#mainpage").css("padding-top", "60px"); $("#queue").css("max-height", "500px"); $("#messagebuffer, #userlist").css("max-height", ""); - $("body").removeClass("hd"); } $("body").addClass("compact"); @@ -1559,6 +1565,10 @@ function fluidLayout() { } function synchtubeLayout() { + if($("#userlisttoggle").hasClass("glyphicon-chevron-right")){ + $("#userlisttoggle").removeClass("glyphicon-chevron-right").addClass("glyphicon-chevron-left") + } + $("#userlisttoggle").removeClass("pull-left").addClass("pull-right") $("#videowrap").detach().insertBefore($("#chatwrap")); $("#rightcontrols").detach().insertBefore($("#leftcontrols")); $("#rightpane").detach().insertBefore($("#leftpane"));