mirror of https://github.com/calzoneman/sync.git
Undo HD layout before applying synchtube, fluid (#549)
This commit is contained in:
parent
be4011cda1
commit
865a7453d9
|
@ -1575,28 +1575,7 @@ function pingMessage(isHighlight) {
|
||||||
|
|
||||||
/* layouts */
|
/* layouts */
|
||||||
|
|
||||||
function compactLayout() {
|
function undoHDLayout() {
|
||||||
/* 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");
|
$("body").removeClass("hd");
|
||||||
$("#drinkbar").detach().removeClass().addClass("col-lg-12 col-md-12")
|
$("#drinkbar").detach().removeClass().addClass("col-lg-12 col-md-12")
|
||||||
.appendTo("#drinkbarwrap");
|
.appendTo("#drinkbarwrap");
|
||||||
|
@ -1627,6 +1606,31 @@ function compactLayout() {
|
||||||
$("#mainpage").css("padding-top", "60px");
|
$("#mainpage").css("padding-top", "60px");
|
||||||
$("#queue").css("max-height", "500px");
|
$("#queue").css("max-height", "500px");
|
||||||
$("#messagebuffer, #userlist").css("max-height", "");
|
$("#messagebuffer, #userlist").css("max-height", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
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")) {
|
||||||
|
undoHDLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
$("body").addClass("compact");
|
$("body").addClass("compact");
|
||||||
|
@ -1634,6 +1638,9 @@ function compactLayout() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function fluidLayout() {
|
function fluidLayout() {
|
||||||
|
if ($("body").hasClass("hd")) {
|
||||||
|
undoHDLayout();
|
||||||
|
}
|
||||||
$(".container").removeClass("container").addClass("container-fluid");
|
$(".container").removeClass("container").addClass("container-fluid");
|
||||||
$("footer .container-fluid").removeClass("container-fluid").addClass("container");
|
$("footer .container-fluid").removeClass("container-fluid").addClass("container");
|
||||||
$("body").addClass("fluid");
|
$("body").addClass("fluid");
|
||||||
|
@ -1641,6 +1648,9 @@ function fluidLayout() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function synchtubeLayout() {
|
function synchtubeLayout() {
|
||||||
|
if ($("body").hasClass("hd")) {
|
||||||
|
undoHDLayout();
|
||||||
|
}
|
||||||
if($("#userlisttoggle").hasClass("glyphicon-chevron-right")){
|
if($("#userlisttoggle").hasClass("glyphicon-chevron-right")){
|
||||||
$("#userlisttoggle").removeClass("glyphicon-chevron-right").addClass("glyphicon-chevron-left")
|
$("#userlisttoggle").removeClass("glyphicon-chevron-right").addClass("glyphicon-chevron-left")
|
||||||
}
|
}
|
||||||
|
@ -1652,6 +1662,9 @@ function synchtubeLayout() {
|
||||||
$("body").addClass("synchtube");
|
$("body").addClass("synchtube");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* "HD" is kind of a misnomer. Should be renamed at some point.
|
||||||
|
*/
|
||||||
function hdLayout() {
|
function hdLayout() {
|
||||||
var videowrap = $("#videowrap"),
|
var videowrap = $("#videowrap"),
|
||||||
chatwrap = $("#chatwrap"),
|
chatwrap = $("#chatwrap"),
|
||||||
|
|
Loading…
Reference in New Issue