mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Simply forceJS code
This commit is contained in:
parent
68d3322032
commit
fa6ccc6015
@ -117,10 +117,11 @@
|
||||
function refreshPDFCB(string) {
|
||||
if (!string) return;
|
||||
PDFJS.workerSrc = '{{ asset('js/pdf_viewer.worker.js') }}';
|
||||
var forceJS = {{ Auth::check() && Auth::user()->force_pdfjs ? 'false' : 'true' }};
|
||||
// Temporarily workaround for: https://code.google.com/p/chromium/issues/detail?id=574648
|
||||
if (forceJS && (isFirefox || (isChrome && (!isChrome48 || {{ isset($viewPDF) && $viewPDF ? 'true' : 'false' }})))) {
|
||||
var forceJS = {{ Auth::check() && Auth::user()->force_pdfjs ? 'true' : 'false' }};
|
||||
// Use the browser's built in PDF viewer
|
||||
if ((isChrome || isFirefox) && ! forceJS) {
|
||||
$('#theFrame').attr('src', string).show();
|
||||
// Use PDFJS to view the PDF
|
||||
} else {
|
||||
if (isRefreshing) {
|
||||
needsRefresh = true;
|
||||
|
@ -285,7 +285,7 @@
|
||||
|
||||
</script>
|
||||
|
||||
@include('invoices.pdf', ['account' => $invoice->client->account, 'viewPDF' => true])
|
||||
@include('invoices.pdf', ['account' => $invoice->client->account])
|
||||
|
||||
<p> </p>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user