hide some elements, notifications zone, bug fixes
This commit is contained in:
@@ -36,6 +36,44 @@ $(document).ready(function () {
|
||||
});
|
||||
});
|
||||
|
||||
function toggleNotifications() {
|
||||
if ($("#dropdownNotifications").hasClass("is-visible")) {
|
||||
event.preventDefault();
|
||||
$("#dropdownNotifications").removeClass("is-visible");
|
||||
$("#dropdownNotifications").css("display", "none");
|
||||
} else {
|
||||
event.preventDefault();
|
||||
$("#dropdownNotifications").css("display", "inline-flex");
|
||||
setTimeout(function () {
|
||||
$("#dropdownNotifications").addClass("is-visible");
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on("click", function (event) {
|
||||
if ($(event.target).closest("#notificationsIcon").length) {
|
||||
return;
|
||||
} else {
|
||||
if (!$(event.target).closest(".dropdown-account").length) {
|
||||
$("#dropdownNotifications").removeClass("is-visible");
|
||||
setTimeout(function () {
|
||||
$("#dropdownNotifications").css("display", "none");
|
||||
}, 200);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
$(document).keydown(function (e) {
|
||||
if (e.key === "Escape" || e.key === "Esc") {
|
||||
$("#dropdownNotifications").removeClass("is-visible");
|
||||
setTimeout(function () {
|
||||
$("#dropdownNotifications").css("display", "none");
|
||||
}, 200);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function setTheme(theme) {
|
||||
document.documentElement.setAttribute("data-theme", theme);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user