mirror of https://github.com/calzoneman/sync.git
Add chatOnly and removeVideo
This commit is contained in:
parent
91aaed96fa
commit
f39e051699
|
@ -15,6 +15,12 @@ html(lang="en")
|
||||||
mixin navdefaultlinks(cname)
|
mixin navdefaultlinks(cname)
|
||||||
li: a(href="#", onclick="javascript:showUserOptions()") Options
|
li: a(href="#", onclick="javascript:showUserOptions()") Options
|
||||||
li: a#showchansettings(href="#", onclick="javascript:$('#channeloptions').modal()") Channel Settings
|
li: a#showchansettings(href="#", onclick="javascript:$('#channeloptions').modal()") Channel Settings
|
||||||
|
li.dropdown
|
||||||
|
a.dropdown-toggle(href="#", data-toggle="dropdown") Layout
|
||||||
|
b.caret
|
||||||
|
ul.dropdown-menu
|
||||||
|
li: a(href="javascript:chatOnly()") Chat Only
|
||||||
|
li: a(href="javascript:removeVideo()") Remove Video
|
||||||
mixin navloginlogout(cname)
|
mixin navloginlogout(cname)
|
||||||
section#mainpage
|
section#mainpage
|
||||||
.container
|
.container
|
||||||
|
|
|
@ -450,20 +450,6 @@ $("#shuffleplaylist").click(function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/* layout stuff */
|
|
||||||
/*
|
|
||||||
$(window).resize(function() {
|
|
||||||
VWIDTH = $("#videowidth").css("width").replace("px", "");
|
|
||||||
VHEIGHT = ""+parseInt(parseInt(VWIDTH) * 9 / 16);
|
|
||||||
$("#messagebuffer").css("height", (VHEIGHT - 31) + "px");
|
|
||||||
$("#userlist").css("height", (VHEIGHT - 31) + "px");
|
|
||||||
if($("#ytapiplayer").length > 0) {
|
|
||||||
$("#ytapiplayer").attr("width", VWIDTH);
|
|
||||||
$("#ytapiplayer").attr("height", VHEIGHT);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* load channel */
|
/* load channel */
|
||||||
|
|
||||||
var loc = document.location+"";
|
var loc = document.location+"";
|
||||||
|
|
|
@ -1465,14 +1465,39 @@ function hdLayout() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function chatOnly() {
|
function chatOnly() {
|
||||||
$("#toprow").remove()
|
var chat = $("#chatwrap").detach();
|
||||||
$("#playlistrow").remove();
|
|
||||||
removeVideo();
|
removeVideo();
|
||||||
$("#controlsrow").remove();
|
$("#wrap").remove();
|
||||||
$("#chatwrap").removeClass("col-lg-5 col-md-5").addClass("col-lg-12 col-md-12");
|
$("footer").remove();
|
||||||
|
chat.prependTo($("body"));
|
||||||
|
chat.css({
|
||||||
|
"min-height": "100%",
|
||||||
|
"min-width": "100%",
|
||||||
|
margin: "0",
|
||||||
|
padding: "0"
|
||||||
|
});
|
||||||
|
$("<span/>").addClass("label label-default pull-right pointer")
|
||||||
|
.text("User Options")
|
||||||
|
.appendTo($("#chatheader"))
|
||||||
|
.click(showUserOptions);
|
||||||
|
$("<span/>").addClass("label label-default pull-right pointer")
|
||||||
|
.text("Channel Settings")
|
||||||
|
.appendTo($("#chatheader"))
|
||||||
|
.click(function () {
|
||||||
|
$("#channeloptions").modal();
|
||||||
|
});
|
||||||
|
$("body").addClass("chatOnly");
|
||||||
|
resizeStuff();
|
||||||
}
|
}
|
||||||
|
|
||||||
function resizeStuff() {
|
function resizeStuff() {
|
||||||
|
if ($("body").hasClass("chatOnly")) {
|
||||||
|
var h = $("body").outerHeight() - $("#chatline").outerHeight() -
|
||||||
|
$("#chatheader").outerHeight();
|
||||||
|
$("#messagebuffer").outerHeight(h);
|
||||||
|
$("#userlist").outerHeight(h);
|
||||||
|
return;
|
||||||
|
}
|
||||||
VWIDTH = $("#videowrap").width() + "";
|
VWIDTH = $("#videowrap").width() + "";
|
||||||
VHEIGHT = Math.floor(parseInt(VWIDTH) * 9 / 16) + "";
|
VHEIGHT = Math.floor(parseInt(VWIDTH) * 9 / 16) + "";
|
||||||
$("#ytapiplayer").width(VWIDTH).height(VHEIGHT);
|
$("#ytapiplayer").width(VWIDTH).height(VHEIGHT);
|
||||||
|
@ -1499,6 +1524,7 @@ function removeVideo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#videowrap").remove();
|
$("#videowrap").remove();
|
||||||
|
$("#chatwrap").removeClass("col-lg-5 col-md-5").addClass("col-md-12");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* channel administration stuff */
|
/* channel administration stuff */
|
||||||
|
|
Loading…
Reference in New Issue