1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-27 16:23:19 +01:00

Fix sidebar plugin per pulsanti disabilitati

This commit is contained in:
Dasc3er 2021-08-31 14:15:43 +02:00
parent 10d6b8c9a7
commit d2d1de95d4

View File

@ -87,8 +87,13 @@ $(document).ready(function () {
// Gestione click sulla sidebar per evitare chiusura
$(".control-sidebar").on("click", function (e) {
if (largeScreen && e.target.tagName === 'A' && $(".main-footer").hasClass("with-control-sidebar")) {
toggleControlSidebar();
const target = $(e.target);
if (largeScreen && $(".main-footer").hasClass("with-control-sidebar")) {
if (e.target.tagName === 'A') {
toggleControlSidebar();
} else if (e.target.tagName === 'LI' && target.find("a").hasClass("disabled")) {
toggleControlSidebar();
}
}
});