mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Use the new system of datatables-select 2.0 where checkboxes are true checkbox fields
This commit is contained in:
parent
4295141fb6
commit
b7ce91e2d8
4 changed files with 1554 additions and 24 deletions
|
@ -98,6 +98,15 @@
|
|||
dtOpts = config.options(dtOpts);
|
||||
}
|
||||
|
||||
//Choose the column where the className contains "select-column" and apply the select extension to its render field
|
||||
//Added for Part-DB
|
||||
for (let column of dtOpts.columns) {
|
||||
if (column.className && column.className.includes('dt-select')) {
|
||||
column.render = $.fn.dataTable.render.select();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
root.html(data.template);
|
||||
dt = $('table', root).DataTable(dtOpts);
|
||||
if (config.state !== 'none') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue