mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Save toggle state to session
This commit is contained in:
parent
a2d912d374
commit
5049f17d0b
@ -562,12 +562,20 @@
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
// Callback function when the "part details" panel is shown
|
||||
$('#collapse-part-details').on('show.bs.collapse', function() {
|
||||
$('#toggle-details-button').html('{% trans "Hide Part Details" %}');
|
||||
inventreeSave('show-part-details', true);
|
||||
});
|
||||
|
||||
// Callback function when the "part details" panel is hidden
|
||||
$('#collapse-part-details').on('hide.bs.collapse', function() {
|
||||
$('#toggle-details-button').html('{% trans "Show Part Details" %}');
|
||||
inventreeSave('show-part-details', false);
|
||||
});
|
||||
|
||||
if (inventreeLoad('show-part-details', false).toString() == 'true') {
|
||||
$('#collapse-part-details').collapse('show');
|
||||
}
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user