Update vouchers.volt

Line 221 ff:
added support for download generated voucher file with MS-Internet Explorer

(cherry picked from commit a1762818095c9315ae0ec2c3d00da7e0753703f8)
This commit is contained in:
Stephanowicz 2017-09-20 17:23:59 +02:00 committed by Franco Fichtner
parent 4621c7ba38
commit 29bc90e3fd

View File

@ -219,7 +219,13 @@ POSSIBILITY OF SUCH DAMAGE.
.appendTo('body');
$('#downloadFile').ready(function() {
$('#downloadFile').get(0).click();
if ( window.navigator.msSaveOrOpenBlob && window.Blob ) {
var blob = new Blob( [ output_data ], { type: "text/csv" } );
navigator.msSaveOrOpenBlob( blob, voucher_groupname.toLowerCase() + '.csv' );
}
else {
$('#downloadFile').get(0).click();
}
});
$("#generateVouchers").modal('hide');