use sidebar-wrapper for styleing

This commit is contained in:
Matthias 2021-12-07 00:26:36 +01:00
parent f375ba96ae
commit 388b42a407
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076
2 changed files with 4 additions and 4 deletions

View File

@ -74,8 +74,8 @@
<div class='main body wrapper container-fluid inventree-body'>
<div class='row flex-nowrap inventree-body'>
<div class='col-auto px-1 sidetree-wrapper' style='display: none;'>
<div id='sidetree' class='collapse collapse-horizontal show border-end' style='display: none;'>
<div class='col-auto px-1 sidebar-wrapper'>
<div id='sidetree' class='collapse collapse-horizontal show border' style='display: none;'>
{% block sidetree %}
{% endblock %}
</div>

View File

@ -181,10 +181,10 @@ function enableSidetree(label) {
function setSidetreeState(label, state) {
if (state == 'collapsed') {
$('.sidetree-wrapper').hide(100);
$('#sidetree').hide(100);
$(`#sidetree-toggle-icon`).removeClass('fa-chevron-left').addClass('fa-chevron-right');
} else {
$('.sidetree-wrapper').show(100);
$('#sidetree').show(100);
$(`#sidetree-toggle-icon`).removeClass('fa-chevron-right').addClass('fa-chevron-left');
}
localStorage.setItem(`inventree-tree-state-${label}`, state);