Sidenav toggles

This commit is contained in:
Oliver 2018-04-29 20:30:34 +10:00
parent 3403af18c8
commit 9cc0780367
2 changed files with 7 additions and 2 deletions

View File

@ -5,5 +5,5 @@ function openSideNav() {
function closeSideNav() {
document.getElementById("sidenav").style.width = "0";
document.getElementById("inventree-content").style.marginLeft = "0";
document.getElementById("inventree-content").style.marginLeft = "50px";
}

View File

@ -62,7 +62,12 @@ $(document).ready(function () {
"#stock-tree");
$('#logo').click(function() {
openSideNav();
if ($("#sidenav").width() == 0) {
openSideNav();
}
else {
closeSideNav();
}
});
{% block js_ready %}