mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Toggle sidebar, overrides SB Admin 2 behavior
This commit is contained in:
parent
10c680a31a
commit
b5ffdb47ec
@ -258,6 +258,27 @@ var themes = {
|
|||||||
"terminal" : "terminal.css",
|
"terminal" : "terminal.css",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Toggles the sidebar navigation.
|
||||||
|
// Overrides the default SB Admin 2 behavior
|
||||||
|
$("#sidebarToggleTopbar").on('click', function(e) {
|
||||||
|
$("body").toggleClass("sidebar-toggled");
|
||||||
|
$(".sidebar").toggleClass("toggled");
|
||||||
|
$(".sidebar").toggleClass("d-none");
|
||||||
|
});
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
if ($(window).width() < 768) {
|
||||||
|
$('.sidebar').addClass('toggled');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(window).resize(function() {
|
||||||
|
if ($(window).width() > 768) {
|
||||||
|
$('.sidebar').removeClass('d-none');
|
||||||
|
$('.sidebar').removeClass('toggled');
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
$(document)
|
$(document)
|
||||||
.ajaxSend(setCSRFTokenHeader)
|
.ajaxSend(setCSRFTokenHeader)
|
||||||
.ready(contentLoaded)
|
.ready(contentLoaded)
|
||||||
|
Loading…
Reference in New Issue
Block a user