mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 04:26:44 +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',
|
toggleId: '#category-menu-toggle',
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#view-list').hide();
|
|
||||||
|
|
||||||
$('#view-list').click(function() {
|
$('#view-list').click(function() {
|
||||||
$('#view-list').hide();
|
$('#view-list').hide();
|
||||||
$('#view-grid').show();
|
$('#view-grid').show();
|
||||||
|
|
||||||
$('#part-table').bootstrapTable('toggleCustomView');
|
$('#part-table').bootstrapTable('toggleCustomView');
|
||||||
|
inventreeSave('part-grid-view', '');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#view-grid').click(function() {
|
$('#view-grid').click(function() {
|
||||||
@ -190,6 +189,7 @@
|
|||||||
$('#view-list').show();
|
$('#view-list').show();
|
||||||
|
|
||||||
$('#part-table').bootstrapTable('toggleCustomView');
|
$('#part-table').bootstrapTable('toggleCustomView');
|
||||||
|
inventreeSave('part-grid-view', 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#cat-create").click(function() {
|
$("#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 %}
|
{% endblock %}
|
Loading…
x
Reference in New Issue
Block a user