mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-13 22:54:25 +01:00
Fix PDF on older IE
This commit is contained in:
parent
512c6ebd43
commit
4705c6179c
@ -118,26 +118,12 @@
|
||||
return getPDFString(refreshPDFCB, force);
|
||||
} catch (exception) {
|
||||
if (location.href.indexOf('/view/')) {
|
||||
var url = location.href.replace('/view/', '/download/') + '?base64=true&silent=true';
|
||||
var url = location.href.replace('/view/', '/download/') + '?base64=true';
|
||||
$.get(url, function(result) {
|
||||
refreshPDFCB(result);
|
||||
})
|
||||
}
|
||||
}
|
||||
/*
|
||||
@if (true || isset($usePhantomJS) && $usePhantomJS)
|
||||
console.log(location.href);
|
||||
console.log(location.href.indexOf('/view/'));
|
||||
console.log();
|
||||
return false;
|
||||
$.get('http://ninja.dev/download/...?base64=true', function(result) {
|
||||
refreshPDFCB(result);
|
||||
})
|
||||
return false;
|
||||
@else
|
||||
return getPDFString(refreshPDFCB, force);
|
||||
@endif
|
||||
*/
|
||||
}
|
||||
|
||||
function refreshPDFCB(string) {
|
||||
|
@ -237,9 +237,15 @@
|
||||
});
|
||||
|
||||
function onDownloadClick() {
|
||||
var doc = generatePDF(invoice, invoice.invoice_design.javascript, true);
|
||||
var fileName = invoice.is_quote ? invoiceLabels.quote : invoiceLabels.invoice;
|
||||
doc.save(fileName + '-' + invoice.invoice_number + '.pdf');
|
||||
try {
|
||||
var doc = generatePDF(invoice, invoice.invoice_design.javascript, true);
|
||||
var fileName = invoice.is_quote ? invoiceLabels.quote : invoiceLabels.invoice;
|
||||
doc.save(fileName + '-' + invoice.invoice_number + '.pdf');
|
||||
} catch (exception) {
|
||||
if (location.href.indexOf('/view/')) {
|
||||
location.href = location.href.replace('/view/', '/download/');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function showCustomModal() {
|
||||
|
Loading…
Reference in New Issue
Block a user