Fix fluid layout
This commit is contained in:
parent
574ef4435c
commit
bedf3afb61
2 changed files with 18 additions and 1 deletions
|
|
@ -1355,7 +1355,7 @@ function addChatMessage(data) {
|
|||
|
||||
function fluidLayout() {
|
||||
$(".container").removeClass("container").addClass("container-fluid");
|
||||
// TODO resize
|
||||
resizeStuff();
|
||||
}
|
||||
|
||||
function synchtubeLayout() {
|
||||
|
|
@ -1375,6 +1375,22 @@ function chatOnly() {
|
|||
$("#chatwrap").removeClass("col-lg-5 col-md-5").addClass("col-lg-12 col-md-12");
|
||||
}
|
||||
|
||||
function resizeStuff() {
|
||||
// Only execute if we are on a fluid layout
|
||||
if ($(".container-fluid").length === 0) {
|
||||
return;
|
||||
}
|
||||
VWIDTH = $("#videowrap").width() + "";
|
||||
VHEIGHT = Math.floor(parseInt(VWIDTH) * 9 / 16) + "";
|
||||
$("#ytapiplayer").width(VWIDTH).height(VHEIGHT);
|
||||
|
||||
var h = parseInt(VHEIGHT) - 33;
|
||||
$("#messagebuffer").height(h);
|
||||
$("#userlist").height(h);
|
||||
}
|
||||
|
||||
$(window).resize(resizeStuff);
|
||||
|
||||
/* channel administration stuff */
|
||||
|
||||
function genPermissionsEditor() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue