Temporariy change to work around Chrome 48 bug

This commit is contained in:
Hillel Coren 2016-02-14 20:14:24 +02:00
parent b28c712a8e
commit 205c67a968
2 changed files with 4 additions and 2 deletions

View File

@ -98,7 +98,9 @@
function refreshPDFCB(string) { function refreshPDFCB(string) {
if (!string) return; if (!string) return;
PDFJS.workerSrc = '{{ asset('js/pdf_viewer.worker.js') }}'; PDFJS.workerSrc = '{{ asset('js/pdf_viewer.worker.js') }}';
if ({{ Auth::check() && Auth::user()->force_pdfjs ? 'false' : 'true' }} && (isFirefox || (isChrome && !isChrome48))) { 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' }})))) {
$('#theFrame').attr('src', string).show(); $('#theFrame').attr('src', string).show();
} else { } else {
if (isRefreshing) { if (isRefreshing) {

View File

@ -85,7 +85,7 @@
</script> </script>
@include('invoices.pdf', ['account' => $invoice->client->account]) @include('invoices.pdf', ['account' => $invoice->client->account, 'viewPDF' => true])
<p>&nbsp;</p> <p>&nbsp;</p>
<p>&nbsp;</p> <p>&nbsp;</p>