continue work
This commit is contained in:
parent
556f9eb9e7
commit
fc63191773
|
@ -1605,7 +1605,7 @@ Channel.prototype.addMedia = function(data, user) {
|
||||||
self.plqueue.queue(function (q) {
|
self.plqueue.queue(function (q) {
|
||||||
if (self.dead)
|
if (self.dead)
|
||||||
return;
|
return;
|
||||||
db.getLibraryItem(self.name, data.id,
|
db.channels.getLibraryItem(self.name, data.id,
|
||||||
function (err, item) {
|
function (err, item) {
|
||||||
if (self.dead)
|
if (self.dead)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -18,7 +18,7 @@ html(lang="en")
|
||||||
+navloginlogout(cname)
|
+navloginlogout(cname)
|
||||||
section#mainpage
|
section#mainpage
|
||||||
.container
|
.container
|
||||||
.row
|
#motdrow.row
|
||||||
.col-lg-12.col-md-12
|
.col-lg-12.col-md-12
|
||||||
#motdwrap.well
|
#motdwrap.well
|
||||||
button#togglemotd.close.pull-right(type="button")
|
button#togglemotd.close.pull-right(type="button")
|
||||||
|
@ -45,7 +45,7 @@ html(lang="en")
|
||||||
#videowrap.col-lg-7.col-md-7
|
#videowrap.col-lg-7.col-md-7
|
||||||
p#currenttitle Nothing Playling
|
p#currenttitle Nothing Playling
|
||||||
#ytapiplayer
|
#ytapiplayer
|
||||||
.row
|
#controlsrow.row
|
||||||
#leftcontrols.col-lg-5.col-md-5
|
#leftcontrols.col-lg-5.col-md-5
|
||||||
button#newpollbtn.btn.btn-sm.btn-default New Poll
|
button#newpollbtn.btn.btn-sm.btn-default New Poll
|
||||||
#rightcontrols.col-lg-7.col-md-7
|
#rightcontrols.col-lg-7.col-md-7
|
||||||
|
@ -181,6 +181,8 @@ html(lang="en")
|
||||||
// $('#channeloptions a[href="#cs-miscoptions"]').tab('show');
|
// $('#channeloptions a[href="#cs-miscoptions"]').tab('show');
|
||||||
script(src="/assets/js/data.js")
|
script(src="/assets/js/data.js")
|
||||||
script(src="/assets/js/util.js")
|
script(src="/assets/js/util.js")
|
||||||
|
script(src="/assets/js/player.js")
|
||||||
script(src="/assets/js/paginator.js")
|
script(src="/assets/js/paginator.js")
|
||||||
script(src="/assets/js/ui.js")
|
script(src="/assets/js/ui.js")
|
||||||
script(src="/assets/js/callbacks.js")
|
script(src="/assets/js/callbacks.js")
|
||||||
|
script(src="https://www.youtube.com/iframe_api")
|
||||||
|
|
|
@ -19,8 +19,6 @@ $(window).focus(function() {
|
||||||
FOCUSED = false;
|
FOCUSED = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#editmotd").click(showMOTDEditor);
|
|
||||||
|
|
||||||
$("#togglemotd").click(function () {
|
$("#togglemotd").click(function () {
|
||||||
var hidden = $("#motd").css("display") === "none";
|
var hidden = $("#motd").css("display") === "none";
|
||||||
$("#motd").toggle();
|
$("#motd").toggle();
|
||||||
|
|
|
@ -1486,42 +1486,29 @@ function addChatMessage(data) {
|
||||||
/* layouts */
|
/* layouts */
|
||||||
|
|
||||||
function fluidLayout() {
|
function fluidLayout() {
|
||||||
$(".row").each(function() {
|
$(".container").css("max-width", "100%");
|
||||||
$(this).removeClass("row").addClass("row-fluid");
|
|
||||||
});
|
|
||||||
$(".container").each(function() {
|
|
||||||
$(this).removeClass("container").addClass("container-fluid");
|
|
||||||
});
|
|
||||||
// Video might not be there, but the playlist is
|
|
||||||
VWIDTH = $("#videowidth").css("width").replace("px", "");
|
|
||||||
VHEIGHT = ""+parseInt(parseInt(VWIDTH) * 9 / 16);
|
|
||||||
if($("#ytapiplayer").length > 0) {
|
|
||||||
$("#ytapiplayer").attr("width", VWIDTH);
|
|
||||||
$("#ytapiplayer").attr("height", VHEIGHT);
|
|
||||||
}
|
|
||||||
$("#messagebuffer").css("height", (VHEIGHT - 31) + "px");
|
|
||||||
$("#userlist").css("height", (VHEIGHT - 31) + "px");
|
|
||||||
$("#chatline").removeClass().addClass("span12");
|
|
||||||
$("#channelsettingswrap3").css("margin-left", "0");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function synchtubeLayout() {
|
function synchtubeLayout() {
|
||||||
$("#videowrap").detach().insertBefore($("#chatwrap"));
|
$("#videowrap").detach().insertBefore($("#chatwrap"));
|
||||||
$("#rightpane-outer").detach().insertBefore($("#leftpane-outer"));
|
$("#rightcontrols").detach().insertBefore($("#leftcontrols"));
|
||||||
|
$("#rightpane").detach().insertBefore($("#leftpane"));
|
||||||
$("#userlist").css("float", "right");
|
$("#userlist").css("float", "right");
|
||||||
}
|
}
|
||||||
|
|
||||||
function chatOnly() {
|
function chatOnly() {
|
||||||
fluidLayout();
|
//fluidLayout();
|
||||||
$("#toprow").remove()
|
$("#toprow").remove()
|
||||||
$("#announcements").remove();
|
$("#announcements").remove();
|
||||||
$("#playlistrow").remove();
|
$("#playlistrow").remove();
|
||||||
$("#videowrap").remove();
|
$("#videowrap").remove();
|
||||||
$("#chatwrap").removeClass("span5").addClass("span12");
|
$("#controlsrow").remove();
|
||||||
|
$("#chatwrap").removeClass("col-lg-5 col-md-5").addClass("col-lg-12 col-md-12");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* channel administration stuff */
|
/* channel administration stuff */
|
||||||
|
|
||||||
|
// TODO fix
|
||||||
function genPermissionsEditor() {
|
function genPermissionsEditor() {
|
||||||
$("#permedit").html("");
|
$("#permedit").html("");
|
||||||
var form = $("<form/>").addClass("form-horizontal")
|
var form = $("<form/>").addClass("form-horizontal")
|
||||||
|
@ -1694,7 +1681,7 @@ function errDialog(err) {
|
||||||
.appendTo($("body"));
|
.appendTo($("body"));
|
||||||
|
|
||||||
$("<br/>").appendTo(div);
|
$("<br/>").appendTo(div);
|
||||||
$("<button/>").addClass("btn btn-mini")
|
$("<button/>").addClass("btn btn-xs btn-default")
|
||||||
.css("width", "100%")
|
.css("width", "100%")
|
||||||
.text("OK")
|
.text("OK")
|
||||||
.click(function () { div.remove(); })
|
.click(function () { div.remove(); })
|
||||||
|
@ -1714,12 +1701,12 @@ function queueMessage(data, type) {
|
||||||
if (!data.msg || data.msg === true) {
|
if (!data.msg || data.msg === true) {
|
||||||
data.msg = "Queue failed. Check your link to make sure it is valid.";
|
data.msg = "Queue failed. Check your link to make sure it is valid.";
|
||||||
}
|
}
|
||||||
var ltype = "label-important";
|
var ltype = "label-danger";
|
||||||
var title = "Error";
|
var title = "Error";
|
||||||
if (type === "alert-warning")
|
if (type === "alert-warning") {
|
||||||
ltype = "label-warning";
|
ltype = "label-warning";
|
||||||
if (type === "alert-warning")
|
|
||||||
title = "Warning";
|
title = "Warning";
|
||||||
|
}
|
||||||
|
|
||||||
var alerts = $(".qfalert.qf-" + type);
|
var alerts = $(".qfalert.qf-" + type);
|
||||||
for (var i = 0; i < alerts.length; i++) {
|
for (var i = 0; i < alerts.length; i++) {
|
||||||
|
@ -1764,33 +1751,10 @@ function queueMessage(data, type) {
|
||||||
data.link + "</a>";
|
data.link + "</a>";
|
||||||
}
|
}
|
||||||
makeAlert(title, text, type)
|
makeAlert(title, text, type)
|
||||||
.addClass("span12 qfalert qf-" + type)
|
.addClass("qfalert qf-" + type)
|
||||||
.appendTo($("#queuefail"));
|
.appendTo($("#queuefail"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function showMOTDEditor() {
|
|
||||||
var motd = $("#motd");
|
|
||||||
motd.html("");
|
|
||||||
var text = $("<textarea/>")
|
|
||||||
.addClass("motdeditor input-block-level")
|
|
||||||
.attr("rows", "10")
|
|
||||||
.val(CHANNEL.motd_text)
|
|
||||||
.css("width", "100%")
|
|
||||||
.css("height", "100%")
|
|
||||||
.appendTo($("#motdwrap"))
|
|
||||||
.blur(function () {
|
|
||||||
socket.emit("setMotd", {
|
|
||||||
motd: text.val()
|
|
||||||
});
|
|
||||||
$("#motdwrap .motdeditor").remove();
|
|
||||||
$("#editmotd").show();
|
|
||||||
$("#togglemotd").show();
|
|
||||||
})
|
|
||||||
.focus();
|
|
||||||
$("#editmotd").hide();
|
|
||||||
$("#togglemotd").hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
function filterChannelLog() {
|
function filterChannelLog() {
|
||||||
var cc = $("#chanlog_contents");
|
var cc = $("#chanlog_contents");
|
||||||
if (!cc.data("log")) {
|
if (!cc.data("log")) {
|
||||||
|
|
Loading…
Reference in a new issue