mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Save grid / list selection to local storage settings
This commit is contained in:
parent
e846c744f4
commit
f1ca17286f
@ -176,13 +176,12 @@
|
||||
toggleId: '#category-menu-toggle',
|
||||
});
|
||||
|
||||
$('#view-list').hide();
|
||||
|
||||
$('#view-list').click(function() {
|
||||
$('#view-list').hide();
|
||||
$('#view-grid').show();
|
||||
|
||||
$('#part-table').bootstrapTable('toggleCustomView');
|
||||
inventreeSave('part-grid-view', '');
|
||||
});
|
||||
|
||||
$('#view-grid').click(function() {
|
||||
@ -190,6 +189,7 @@
|
||||
$('#view-list').show();
|
||||
|
||||
$('#part-table').bootstrapTable('toggleCustomView');
|
||||
inventreeSave('part-grid-view', 1);
|
||||
});
|
||||
|
||||
$("#cat-create").click(function() {
|
||||
@ -300,4 +300,11 @@
|
||||
},
|
||||
);
|
||||
|
||||
if (inventreeLoad("part-grid-view")) {
|
||||
$('#view-grid').hide();
|
||||
$('#part-table').bootstrapTable('toggleCustomView');
|
||||
} else {
|
||||
$('#view-list').hide();
|
||||
}
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user