mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix download button if live preview is disabled
This commit is contained in:
parent
84ac76cff1
commit
0938c4cb1a
@ -580,14 +580,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
|
|
||||||
@if (Auth::user()->account->live_preview)
|
@include('invoices.pdf', ['account' => Auth::user()->account, 'hide_pdf' => ! Auth::user()->account->live_preview])
|
||||||
@include('invoices.pdf', ['account' => Auth::user()->account])
|
|
||||||
@else
|
|
||||||
<script type="text/javascript">
|
|
||||||
var invoiceLabels = {!! json_encode($account->getInvoiceLabels()) !!};
|
|
||||||
function refreshPDF() {}
|
|
||||||
</script>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@if (!Auth::user()->account->isPro())
|
@if (!Auth::user()->account->isPro())
|
||||||
<div style="font-size:larger">
|
<div style="font-size:larger">
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
|
@if (empty($hide_pdf))
|
||||||
<iframe id="theFrame" style="display:block" frameborder="1" width="100%" height="{{ isset($pdfHeight) ? $pdfHeight : 1180 }}px"></iframe>
|
<iframe id="theFrame" style="display:block" frameborder="1" width="100%" height="{{ isset($pdfHeight) ? $pdfHeight : 1180 }}px"></iframe>
|
||||||
<div id="theCanvasDiv" style="display:none;width:100%;background-color:#525659;border:solid 2px #9a9a9a;padding-top:40px;text-align:center">
|
<div id="theCanvasDiv" style="display:none;width:100%;background-color:#525659;border:solid 2px #9a9a9a;padding-top:40px;text-align:center">
|
||||||
<canvas id="theCanvas" style="max-width:100%;border:solid 1px #CCCCCC;"></canvas>
|
<canvas id="theCanvas" style="max-width:100%;border:solid 1px #CCCCCC;"></canvas>
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
@if (!Utils::isNinja() || !Utils::isPro())
|
@if (!Utils::isNinja() || !Utils::isPro())
|
||||||
<div class="modal fade" id="moreDesignsModal" tabindex="-1" role="dialog" aria-labelledby="moreDesignsModalLabel" aria-hidden="true">
|
<div class="modal fade" id="moreDesignsModal" tabindex="-1" role="dialog" aria-labelledby="moreDesignsModalLabel" aria-hidden="true">
|
||||||
@ -112,12 +114,14 @@
|
|||||||
var needsRefresh = false;
|
var needsRefresh = false;
|
||||||
|
|
||||||
function refreshPDF(force) {
|
function refreshPDF(force) {
|
||||||
//console.log('refresh PDF - force: ' + force + ' ' + (new Date()).getTime())
|
|
||||||
return getPDFString(refreshPDFCB, force);
|
return getPDFString(refreshPDFCB, force);
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshPDFCB(string) {
|
function refreshPDFCB(string) {
|
||||||
if (!string) return;
|
if (!string) return;
|
||||||
|
@if ( !empty($hide_pdf))
|
||||||
|
return;
|
||||||
|
@endif
|
||||||
PDFJS.workerSrc = '{{ asset('js/pdf_viewer.worker.js') }}';
|
PDFJS.workerSrc = '{{ asset('js/pdf_viewer.worker.js') }}';
|
||||||
var forceJS = {{ Auth::check() && Auth::user()->force_pdfjs ? 'true' : 'false' }};
|
var forceJS = {{ Auth::check() && Auth::user()->force_pdfjs ? 'true' : 'false' }};
|
||||||
// Use the browser's built in PDF viewer
|
// Use the browser's built in PDF viewer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user