diff --git a/lib/channel.js b/lib/channel.js index fb2524cb..7b164121 100644 --- a/lib/channel.js +++ b/lib/channel.js @@ -1605,7 +1605,7 @@ Channel.prototype.addMedia = function(data, user) { self.plqueue.queue(function (q) { if (self.dead) return; - db.getLibraryItem(self.name, data.id, + db.channels.getLibraryItem(self.name, data.id, function (err, item) { if (self.dead) return; diff --git a/templates/channel.jade b/templates/channel.jade index a453015a..ffe9c9bb 100644 --- a/templates/channel.jade +++ b/templates/channel.jade @@ -18,7 +18,7 @@ html(lang="en") +navloginlogout(cname) section#mainpage .container - .row + #motdrow.row .col-lg-12.col-md-12 #motdwrap.well button#togglemotd.close.pull-right(type="button") @@ -45,7 +45,7 @@ html(lang="en") #videowrap.col-lg-7.col-md-7 p#currenttitle Nothing Playling #ytapiplayer - .row + #controlsrow.row #leftcontrols.col-lg-5.col-md-5 button#newpollbtn.btn.btn-sm.btn-default New Poll #rightcontrols.col-lg-7.col-md-7 @@ -181,6 +181,8 @@ html(lang="en") // $('#channeloptions a[href="#cs-miscoptions"]').tab('show'); script(src="/assets/js/data.js") script(src="/assets/js/util.js") + script(src="/assets/js/player.js") script(src="/assets/js/paginator.js") script(src="/assets/js/ui.js") script(src="/assets/js/callbacks.js") + script(src="https://www.youtube.com/iframe_api") diff --git a/www/assets/js/ui.js b/www/assets/js/ui.js index e2190396..60d043a3 100644 --- a/www/assets/js/ui.js +++ b/www/assets/js/ui.js @@ -19,8 +19,6 @@ $(window).focus(function() { FOCUSED = false; }); -$("#editmotd").click(showMOTDEditor); - $("#togglemotd").click(function () { var hidden = $("#motd").css("display") === "none"; $("#motd").toggle(); diff --git a/www/assets/js/util.js b/www/assets/js/util.js index 5ecb975a..165c9d21 100644 --- a/www/assets/js/util.js +++ b/www/assets/js/util.js @@ -1486,42 +1486,29 @@ function addChatMessage(data) { /* layouts */ function fluidLayout() { - $(".row").each(function() { - $(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"); + $(".container").css("max-width", "100%"); } function synchtubeLayout() { $("#videowrap").detach().insertBefore($("#chatwrap")); - $("#rightpane-outer").detach().insertBefore($("#leftpane-outer")); + $("#rightcontrols").detach().insertBefore($("#leftcontrols")); + $("#rightpane").detach().insertBefore($("#leftpane")); $("#userlist").css("float", "right"); } function chatOnly() { - fluidLayout(); + //fluidLayout(); $("#toprow").remove() $("#announcements").remove(); $("#playlistrow").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 */ +// TODO fix function genPermissionsEditor() { $("#permedit").html(""); var form = $("
").addClass("form-horizontal") @@ -1694,7 +1681,7 @@ function errDialog(err) { .appendTo($("body")); $("
").appendTo(div); - $("