mirror of https://github.com/calzoneman/sync.git
CSS fixes
This commit is contained in:
parent
9f18a6978e
commit
7310dabedf
|
@ -9,8 +9,9 @@ mixin rcheckbox(id, label)
|
||||||
.form-group
|
.form-group
|
||||||
.col-sm-8.col-sm-offset-4
|
.col-sm-8.col-sm-offset-4
|
||||||
.checkbox
|
.checkbox
|
||||||
label.control-label(for=id)= label
|
label(for=id)
|
||||||
input(type="checkbox", id=id)
|
input(type="checkbox", id=id)
|
||||||
|
= label
|
||||||
|
|
||||||
mixin textbox(id, label, placeholder)
|
mixin textbox(id, label, placeholder)
|
||||||
.form-group
|
.form-group
|
||||||
|
@ -32,8 +33,9 @@ mixin rcheckbox-auto(id, label)
|
||||||
.form-group
|
.form-group
|
||||||
.col-sm-8.col-sm-offset-4
|
.col-sm-8.col-sm-offset-4
|
||||||
.checkbox
|
.checkbox
|
||||||
label.control-label(for=id)= label
|
label(for=id)
|
||||||
input.cs-checkbox(type="checkbox", id=id)
|
input.cs-checkbox(type="checkbox", id=id)
|
||||||
|
= label
|
||||||
|
|
||||||
mixin textbox-auto(id, label, placeholder)
|
mixin textbox-auto(id, label, placeholder)
|
||||||
.form-group
|
.form-group
|
||||||
|
|
|
@ -9,8 +9,9 @@ mixin rcheckbox(id, label)
|
||||||
.form-group
|
.form-group
|
||||||
.col-sm-8.col-sm-offset-4
|
.col-sm-8.col-sm-offset-4
|
||||||
.checkbox
|
.checkbox
|
||||||
label.control-label(for=id)= label
|
label(for=id)
|
||||||
input(type="checkbox", id=id)
|
input(type="checkbox", id=id)
|
||||||
|
= label
|
||||||
|
|
||||||
mixin textbox(id, label, placeholder)
|
mixin textbox(id, label, placeholder)
|
||||||
.form-group
|
.form-group
|
||||||
|
@ -77,7 +78,7 @@ mixin us-playback
|
||||||
mixin rcheckbox("us-playlistbuttons", "Hide playlist buttons by default")
|
mixin rcheckbox("us-playlistbuttons", "Hide playlist buttons by default")
|
||||||
mixin rcheckbox("us-oldbtns", "Old style playlist buttons")
|
mixin rcheckbox("us-oldbtns", "Old style playlist buttons")
|
||||||
.form-group
|
.form-group
|
||||||
label.control-label.col-sm-4(for="#us-default-quality") Default YouTube/Vimeo/Dailymotion quality
|
label.control-label.col-sm-4(for="#us-default-quality") Quality Preference
|
||||||
.col-sm-8
|
.col-sm-8
|
||||||
select#us-default-quality.form-control
|
select#us-default-quality.form-control
|
||||||
option(value="auto") Auto
|
option(value="auto") Auto
|
||||||
|
|
|
@ -590,3 +590,11 @@ table td {
|
||||||
max-width: 200px;
|
max-width: 200px;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#cs-chatfilters table .form-group {
|
||||||
|
max-width: 25%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cs-chatfilters table .form-group > input {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
12
www/js/ui.js
12
www/js/ui.js
|
@ -766,12 +766,6 @@ applyOpts();
|
||||||
});
|
});
|
||||||
|
|
||||||
mr.observe($("#videowrap").find(".embed-responsive")[0], { childList: true });
|
mr.observe($("#videowrap").find(".embed-responsive")[0], { childList: true });
|
||||||
|
|
||||||
var mr2 = new MutationObserver(function (records) {
|
|
||||||
handleVideoResize();
|
|
||||||
});
|
|
||||||
|
|
||||||
mr2.observe(document.body, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* DOMNodeInserted is deprecated. This code is here only as a fallback
|
* DOMNodeInserted is deprecated. This code is here only as a fallback
|
||||||
|
@ -780,11 +774,5 @@ applyOpts();
|
||||||
$("#videowrap").find(".embed-responsive")[0].addEventListener("DOMNodeInserted", function (ev) {
|
$("#videowrap").find(".embed-responsive")[0].addEventListener("DOMNodeInserted", function (ev) {
|
||||||
if (ev.target.id === "ytapiplayer") handleVideoResize();
|
if (ev.target.id === "ytapiplayer") handleVideoResize();
|
||||||
});
|
});
|
||||||
|
|
||||||
document.body.addEventListener("DOMAttrModified", function (ev) {
|
|
||||||
if (ev.target !== document.body || ev.attrName !== "class") return;
|
|
||||||
console.log(ev);
|
|
||||||
handleVideoResize();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -1532,12 +1532,14 @@ function compactLayout() {
|
||||||
}
|
}
|
||||||
|
|
||||||
$("body").addClass("compact");
|
$("body").addClass("compact");
|
||||||
|
handleVideoResize();
|
||||||
}
|
}
|
||||||
|
|
||||||
function fluidLayout() {
|
function fluidLayout() {
|
||||||
$(".container").removeClass("container").addClass("container-fluid");
|
$(".container").removeClass("container").addClass("container-fluid");
|
||||||
$("footer .container-fluid").removeClass("container-fluid").addClass("container");
|
$("footer .container-fluid").removeClass("container-fluid").addClass("container");
|
||||||
$("body").addClass("fluid");
|
$("body").addClass("fluid");
|
||||||
|
handleVideoResize();
|
||||||
}
|
}
|
||||||
|
|
||||||
function synchtubeLayout() {
|
function synchtubeLayout() {
|
||||||
|
@ -1601,6 +1603,7 @@ function hdLayout() {
|
||||||
$("#mainpage").css("padding-top", "0");
|
$("#mainpage").css("padding-top", "0");
|
||||||
|
|
||||||
$("body").addClass("hd");
|
$("body").addClass("hd");
|
||||||
|
handleVideoResize();
|
||||||
}
|
}
|
||||||
|
|
||||||
function chatOnly() {
|
function chatOnly() {
|
||||||
|
@ -1644,7 +1647,7 @@ function handleWindowResize() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleVideoResize() {
|
function handleVideoResize() {
|
||||||
console.trace();
|
//console.trace();
|
||||||
var intv, ticks = 0;
|
var intv, ticks = 0;
|
||||||
var resize = function () {
|
var resize = function () {
|
||||||
if (++ticks > 10) clearInterval(intv);
|
if (++ticks > 10) clearInterval(intv);
|
||||||
|
@ -1652,7 +1655,7 @@ function handleVideoResize() {
|
||||||
clearInterval(intv);
|
clearInterval(intv);
|
||||||
|
|
||||||
var height = $("#ytapiplayer").height() - $("#chatline").outerHeight() - 2;
|
var height = $("#ytapiplayer").height() - $("#chatline").outerHeight() - 2;
|
||||||
//console.log(height);
|
console.log(height);
|
||||||
$("#messagebuffer").height(height);
|
$("#messagebuffer").height(height);
|
||||||
$("#userlist").height(height);
|
$("#userlist").height(height);
|
||||||
|
|
||||||
|
@ -2267,8 +2270,7 @@ function formatCSChatFilterList() {
|
||||||
.appendTo(wrap);
|
.appendTo(wrap);
|
||||||
var addTextbox = function (placeholder) {
|
var addTextbox = function (placeholder) {
|
||||||
var div = $("<div/>").addClass("form-group").appendTo(form)
|
var div = $("<div/>").addClass("form-group").appendTo(form)
|
||||||
.css("margin-right", "10px")
|
.css("margin-right", "10px");
|
||||||
.css("max-width", "25%");
|
|
||||||
var input = $("<input/>").addClass("form-control")
|
var input = $("<input/>").addClass("form-control")
|
||||||
.attr("type", "text")
|
.attr("type", "text")
|
||||||
.attr("placeholder", placeholder)
|
.attr("placeholder", placeholder)
|
||||||
|
|
Loading…
Reference in New Issue