Add function to download exported files

This commit is contained in:
JonnyWong16 2020-08-03 14:45:53 -07:00
parent 6334ffa197
commit deb49d7ff9
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
3 changed files with 72 additions and 4 deletions

View file

@ -116,3 +116,12 @@ export_table_options = {
}
}
};
$('.export_table').on('click', '> tbody > tr > td > button.btn-download', function (e) {
var tr = $(this).closest('tr');
var row = export_table.row(tr);
var rowData = row.data();
e.preventDefault();
window.location.href = 'download_export?row_id=' + rowData['row_id'];
});