1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Allow notification display when video playing

Users can interact with notifications in windowed mode
This commit is contained in:
Tim Hobbs 2014-03-17 16:59:25 -07:00
parent 37fb510a2d
commit d48854dda8
3 changed files with 24 additions and 4 deletions

View file

@ -292,7 +292,7 @@ var Dashboard = {
options.id = options.id || "notification" + new Date().getTime() + parseInt(Math.random());
var footer = $("#footer").show();
var footer = $("#footer").css("height", "50px");
var parentElem = $('#footerNotifications', footer);
@ -309,7 +309,16 @@ var Dashboard = {
}
if (options.forceShow) {
elem.show();
elem.slideDown(400);
}
var videoBackdrop = $("#videoBackdrop");
var isPlaying = false;
if (videoBackdrop.is(":visible")) {
videoBackdrop.css("bottom", "48px");
isPlaying = true;
}
elem.html(options.html).trigger("create");
@ -329,9 +338,13 @@ var Dashboard = {
footer.on("notification.remove notification.hide", function (e) {
setTimeout(function () { // give the DOM time to catch up
console.log("html", parentElem.html() == "", this);
if (parentElem.html() == "") {
footer.slideUp();
if (!isPlaying) {
footer.slideUp();
} else {
footer.css({ height: "0" });
videoBackdrop.animate({ bottom: "0" }, 400);
}
}
}, 50);
});