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 */
|
||||
|
||||
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")) {
|
||||
function undoHDLayout() {
|
||||
$("body").removeClass("hd");
|
||||
$("#drinkbar").detach().removeClass().addClass("col-lg-12 col-md-12")
|
||||
.appendTo("#drinkbarwrap");
|
||||
|
@ -1629,11 +1608,39 @@ function compactLayout() {
|
|||
$("#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");
|
||||
handleVideoResize();
|
||||
}
|
||||
|
||||
function fluidLayout() {
|
||||
if ($("body").hasClass("hd")) {
|
||||
undoHDLayout();
|
||||
}
|
||||
$(".container").removeClass("container").addClass("container-fluid");
|
||||
$("footer .container-fluid").removeClass("container-fluid").addClass("container");
|
||||
$("body").addClass("fluid");
|
||||
|
@ -1641,6 +1648,9 @@ function fluidLayout() {
|
|||
}
|
||||
|
||||
function synchtubeLayout() {
|
||||
if ($("body").hasClass("hd")) {
|
||||
undoHDLayout();
|
||||
}
|
||||
if($("#userlisttoggle").hasClass("glyphicon-chevron-right")){
|
||||
$("#userlisttoggle").removeClass("glyphicon-chevron-right").addClass("glyphicon-chevron-left")
|
||||
}
|
||||
|
@ -1652,6 +1662,9 @@ function synchtubeLayout() {
|
|||
$("body").addClass("synchtube");
|
||||
}
|
||||
|
||||
/*
|
||||
* "HD" is kind of a misnomer. Should be renamed at some point.
|
||||
*/
|
||||
function hdLayout() {
|
||||
var videowrap = $("#videowrap"),
|
||||
chatwrap = $("#chatwrap"),
|
||||
|
|
Loading…
Reference in New Issue