mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add function to turn a set of visible columns into a settings string for saving to session
This commit is contained in:
parent
86e675dbbd
commit
9c2e959ab0
@ -80,6 +80,21 @@ function reloadTable(table, filters) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function visibleColumnString(columns) {
|
||||||
|
/* Generate a list of "visible" columns to save to file. */
|
||||||
|
|
||||||
|
var fields = [];
|
||||||
|
|
||||||
|
columns.forEach(function(column) {
|
||||||
|
if (column.switchable && column.visible) {
|
||||||
|
fields.push(column.field);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return fields.join(',');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Wrapper function for bootstrapTable.
|
/* Wrapper function for bootstrapTable.
|
||||||
* Sets some useful defaults, and manage persistent settings.
|
* Sets some useful defaults, and manage persistent settings.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user