Change userlist chevron appearance on toggle.

Change userlist chevron placement for Synchtube layout
This commit is contained in:
Xaekai 2015-02-04 23:14:51 -08:00
parent c8b1afffc0
commit 0b2ae90d3f
2 changed files with 14 additions and 1 deletions

View File

@ -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();
};

View File

@ -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-left").addClass("pull-right")
}
/* 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-right").addClass("pull-left")
$("#videowrap").detach().insertBefore($("#chatwrap"));
$("#rightcontrols").detach().insertBefore($("#leftcontrols"));
$("#rightpane").detach().insertBefore($("#leftpane"));