mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -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;
|
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',
|
classes: 'table table-responsive table-no-bordered',
|
||||||
ajaxOptions: {
|
ajaxOptions: {
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -75,9 +79,7 @@
|
||||||
export: 'fa-download',
|
export: 'fa-download',
|
||||||
clearSearch: 'fa-times'
|
clearSearch: 'fa-times'
|
||||||
},
|
},
|
||||||
exportOptions: {
|
exportOptions: export_options,
|
||||||
htmlContent: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
exportTypes: ['csv', 'excel', 'doc', 'txt','json', 'xml', 'pdf'],
|
exportTypes: ['csv', 'excel', 'doc', 'txt','json', 'xml', 'pdf'],
|
||||||
onLoadSuccess: function () {
|
onLoadSuccess: function () {
|
||||||
|
@ -85,7 +87,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue