mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-28 20:39:35 +00:00
Adds buttons to all data tables that allow export via excel and CSV. Need to find a way to allow translations
This commit is contained in:
parent
851055bdb4
commit
35262a25f1
1 changed files with 16 additions and 6 deletions
|
|
@ -122,12 +122,22 @@ export default class extends Controller {
|
||||||
header: $(window).width() >= 768, //Only enable fixedHeaders on devices with big screen. Fixes scrolling issues on smartphones.
|
header: $(window).width() >= 768, //Only enable fixedHeaders on devices with big screen. Fixes scrolling issues on smartphones.
|
||||||
headerOffset: $("#navbar").outerHeight()
|
headerOffset: $("#navbar").outerHeight()
|
||||||
},
|
},
|
||||||
buttons: [{
|
buttons: [
|
||||||
"extend": 'colvis',
|
{
|
||||||
'className': 'mr-2 btn-outline-secondary',
|
"extend": 'colvis',
|
||||||
'columns': ':not(.no-colvis)',
|
'className': 'mr-2 btn-outline-secondary',
|
||||||
"text": "<i class='fa fa-cog'></i>"
|
'columns': ':not(.no-colvis)',
|
||||||
}],
|
"text": "<i class='fa fa-cog'></i>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'CSV',
|
||||||
|
action: $.fn.initDataTables.exportBtnAction('csv', settings),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Excel',
|
||||||
|
action: $.fn.initDataTables.exportBtnAction('excel', settings),
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
rowCallback: this._rowCallback.bind(this),
|
rowCallback: this._rowCallback.bind(this),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue