mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Merge pull request #10857 from uberbrady/fix_bs_tables_export_options
Fix bs tables export options
This commit is contained in:
commit
729b23c0cf
|
@ -30,7 +30,11 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
$('.snipe-table').bootstrapTable('destroy').bootstrapTable({
|
||||
$('.snipe-table').bootstrapTable('destroy').each(function () {
|
||||
export_options = JSON.parse($(this).attr('data-export-options'));
|
||||
export_options['htmlContent'] = true; //always enforce this on the given data-export-options (to prevent XSS)
|
||||
|
||||
$(this).bootstrapTable({
|
||||
classes: 'table table-responsive table-no-bordered',
|
||||
ajaxOptions: {
|
||||
headers: {
|
||||
|
@ -75,9 +79,7 @@
|
|||
export: 'fa-download',
|
||||
clearSearch: 'fa-times'
|
||||
},
|
||||
exportOptions: {
|
||||
htmlContent: true,
|
||||
},
|
||||
exportOptions: export_options,
|
||||
|
||||
exportTypes: ['csv', 'excel', 'doc', 'txt','json', 'xml', 'pdf'],
|
||||
onLoadSuccess: function () {
|
||||
|
@ -85,7 +87,7 @@
|
|||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue