mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-21 08:51:34 +02:00
Minor fixes
This commit is contained in:
parent
d5669fdbf9
commit
44dfa56c31
@ -1179,7 +1179,7 @@ $LANG = array(
|
|||||||
'preview' => 'Preview',
|
'preview' => 'Preview',
|
||||||
'list_vendors' => 'List Vendors',
|
'list_vendors' => 'List Vendors',
|
||||||
'add_users_not_supported' => 'Upgrade to the Enterprise plan to add additional users to your account.',
|
'add_users_not_supported' => 'Upgrade to the Enterprise plan to add additional users to your account.',
|
||||||
'enterprise_plan_features' => 'The Enterprise plan adds support for multiple users and file attachments.',
|
'enterprise_plan_features' => 'The Enterprise plan adds support for multiple users and file attachments, :link to see the full list of features.',
|
||||||
'return_to_app' => 'Return to app',
|
'return_to_app' => 'Return to app',
|
||||||
|
|
||||||
'update_font_cache' => 'Please force refresh the page to update the font cache.',
|
'update_font_cache' => 'Please force refresh the page to update the font cache.',
|
||||||
|
@ -10,16 +10,16 @@
|
|||||||
@foreach ($account->getFontFolders() as $font)
|
@foreach ($account->getFontFolders() as $font)
|
||||||
<script src="{{ asset('js/vfs_fonts/'.$font.'.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/vfs_fonts/'.$font.'.js') }}" type="text/javascript"></script>
|
||||||
@endforeach
|
@endforeach
|
||||||
<script src="{{ asset('pdf.built.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('pdf.built.js') }}?no_cache={{ NINJA_VERSION }}" type="text/javascript"></script>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
|
||||||
select.form-control {
|
select.form-control {
|
||||||
background: #FFFFFF !important;
|
background: #FFFFFF !important;
|
||||||
margin-right: 12px;
|
margin-right: 12px;
|
||||||
}
|
}
|
||||||
table {
|
table {
|
||||||
background: #FFFFFF !important;
|
background: #FFFFFF !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* http://stackoverflow.com/questions/4810841/how-can-i-pretty-print-json-using-javascript */
|
/* http://stackoverflow.com/questions/4810841/how-can-i-pretty-print-json-using-javascript */
|
||||||
@ -34,13 +34,13 @@
|
|||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
@parent
|
@parent
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var invoiceDesigns = {!! $invoiceDesigns !!};
|
var invoiceDesigns = {!! $invoiceDesigns !!};
|
||||||
var invoiceFonts = {!! $invoiceFonts !!};
|
var invoiceFonts = {!! $invoiceFonts !!};
|
||||||
var invoice = {!! json_encode($invoice) !!};
|
var invoice = {!! json_encode($invoice) !!};
|
||||||
var sections = ['content', 'styles', 'defaultStyle', 'pageMargins', 'header', 'footer'];
|
var sections = ['content', 'styles', 'defaultStyle', 'pageMargins', 'header', 'footer'];
|
||||||
var customDesign = origCustomDesign = {!! $customDesign ?: 'JSON.parse(invoiceDesigns[0].javascript);' !!};
|
var customDesign = origCustomDesign = {!! $customDesign ?: 'JSON.parse(invoiceDesigns[0].javascript);' !!};
|
||||||
|
|
||||||
@ -66,9 +66,9 @@
|
|||||||
function getDesignJavascript() {
|
function getDesignJavascript() {
|
||||||
var id = $('#invoice_design_id').val();
|
var id = $('#invoice_design_id').val();
|
||||||
if (id == '-1') {
|
if (id == '-1') {
|
||||||
showMoreDesigns();
|
showMoreDesigns();
|
||||||
$('#invoice_design_id').val(1);
|
$('#invoice_design_id').val(1);
|
||||||
return invoiceDesigns[0].javascript;
|
return invoiceDesigns[0].javascript;
|
||||||
} else if (customDesign) {
|
} else if (customDesign) {
|
||||||
return JSON.stringify(customDesign);
|
return JSON.stringify(customDesign);
|
||||||
} else {
|
} else {
|
||||||
@ -83,12 +83,12 @@
|
|||||||
|
|
||||||
// the function throws an error if the editor is in code view
|
// the function throws an error if the editor is in code view
|
||||||
try {
|
try {
|
||||||
editor.expandAll();
|
editor.expandAll();
|
||||||
} catch(err) {}
|
} catch(err) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveEditor(data)
|
function saveEditor(data)
|
||||||
{
|
{
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
customDesign[editorSection] = editor.get();
|
customDesign[editorSection] = editor.get();
|
||||||
clearError();
|
clearError();
|
||||||
@ -98,7 +98,7 @@
|
|||||||
|
|
||||||
function onSelectChange()
|
function onSelectChange()
|
||||||
{
|
{
|
||||||
var id = $('#invoice_design_id').val();
|
var id = $('#invoice_design_id').val();
|
||||||
if (parseInt(id)) {
|
if (parseInt(id)) {
|
||||||
var design = _.find(invoiceDesigns, function(design){ return design.id == id});
|
var design = _.find(invoiceDesigns, function(design){ return design.id == id});
|
||||||
customDesign = JSON.parse(design.javascript);
|
customDesign = JSON.parse(design.javascript);
|
||||||
@ -135,7 +135,7 @@
|
|||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
clearError();
|
clearError();
|
||||||
|
|
||||||
var container = document.getElementById("jsoneditor");
|
var container = document.getElementById("jsoneditor");
|
||||||
var options = {
|
var options = {
|
||||||
mode: 'form',
|
mode: 'form',
|
||||||
@ -146,7 +146,7 @@
|
|||||||
};
|
};
|
||||||
window.editor = new JSONEditor(container, options);
|
window.editor = new JSONEditor(container, options);
|
||||||
loadEditor('content');
|
loadEditor('content');
|
||||||
|
|
||||||
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||||
var target = $(e.target).attr("href") // activated tab
|
var target = $(e.target).attr("href") // activated tab
|
||||||
target = target.substring(1); // strip leading #
|
target = target.substring(1); // strip leading #
|
||||||
@ -161,13 +161,13 @@
|
|||||||
@endif
|
@endif
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
|
||||||
{!! Former::open()->addClass('warn-on-exit') !!}
|
{!! Former::open()->addClass('warn-on-exit') !!}
|
||||||
{!! Former::populateField('invoice_design_id', $account->invoice_design_id) !!}
|
{!! Former::populateField('invoice_design_id', $account->invoice_design_id) !!}
|
||||||
|
|
||||||
<div style="display:none">
|
<div style="display:none">
|
||||||
@ -199,16 +199,16 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
@if (!Auth::user()->hasFeature(FEATURE_CUSTOMIZE_INVOICE_DESIGN))
|
@if (!Auth::user()->hasFeature(FEATURE_CUSTOMIZE_INVOICE_DESIGN))
|
||||||
$(function() {
|
$(function() {
|
||||||
$('form.warn-on-exit input, .save-button').prop('disabled', true);
|
$('form.warn-on-exit input, .save-button').prop('disabled', true);
|
||||||
});
|
});
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
function showHelp() {
|
function showHelp() {
|
||||||
$('#helpModal').modal('show');
|
$('#helpModal').modal('show');
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{!! Former::close() !!}
|
{!! Former::close() !!}
|
||||||
|
|
||||||
@ -231,9 +231,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer" style="margin-top: 0px">
|
<div class="modal-footer" style="margin-top: 0px">
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.close') }}</button>
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.close') }}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -249,4 +249,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
@ -7,28 +7,28 @@
|
|||||||
@foreach ($account->getFontFolders() as $font)
|
@foreach ($account->getFontFolders() as $font)
|
||||||
<script src="{{ asset('js/vfs_fonts/'.$font.'.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/vfs_fonts/'.$font.'.js') }}" type="text/javascript"></script>
|
||||||
@endforeach
|
@endforeach
|
||||||
<script src="{{ asset('pdf.built.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('pdf.built.js') }}?no_cache={{ NINJA_VERSION }}" type="text/javascript"></script>
|
||||||
<script src="{{ asset('js/lightbox.min.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/lightbox.min.js') }}" type="text/javascript"></script>
|
||||||
<link href="{{ asset('css/lightbox.css') }}" rel="stylesheet" type="text/css"/>
|
<link href="{{ asset('css/lightbox.css') }}" rel="stylesheet" type="text/css"/>
|
||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
@parent
|
@parent
|
||||||
@include('accounts.nav', ['selected' => ACCOUNT_INVOICE_DESIGN, 'advanced' => true])
|
@include('accounts.nav', ['selected' => ACCOUNT_INVOICE_DESIGN, 'advanced' => true])
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var invoiceDesigns = {!! $invoiceDesigns !!};
|
var invoiceDesigns = {!! $invoiceDesigns !!};
|
||||||
var invoiceFonts = {!! $invoiceFonts !!};
|
var invoiceFonts = {!! $invoiceFonts !!};
|
||||||
var invoice = {!! json_encode($invoice) !!};
|
var invoice = {!! json_encode($invoice) !!};
|
||||||
|
|
||||||
function getDesignJavascript() {
|
function getDesignJavascript() {
|
||||||
var id = $('#invoice_design_id').val();
|
var id = $('#invoice_design_id').val();
|
||||||
if (id == '-1') {
|
if (id == '-1') {
|
||||||
showMoreDesigns();
|
showMoreDesigns();
|
||||||
$('#invoice_design_id').val(1);
|
$('#invoice_design_id').val(1);
|
||||||
return invoiceDesigns[0].javascript;
|
return invoiceDesigns[0].javascript;
|
||||||
} else {
|
} else {
|
||||||
var design = _.find(invoiceDesigns, function(design){ return design.id == id});
|
var design = _.find(invoiceDesigns, function(design){ return design.id == id});
|
||||||
return design ? design.javascript : '';
|
return design ? design.javascript : '';
|
||||||
}
|
}
|
||||||
@ -44,7 +44,7 @@
|
|||||||
jQuery.getScript({!! json_encode(asset('js/vfs_fonts/%s.js')) !!}.replace('%s', fontFolder), function(){window.loadingFonts=false;ninjaLoadFontVfs();refreshPDF()})
|
jQuery.getScript({!! json_encode(asset('js/vfs_fonts/%s.js')) !!}.replace('%s', fontFolder), function(){window.loadingFonts=false;ninjaLoadFontVfs();refreshPDF()})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPDFString(cb) {
|
function getPDFString(cb) {
|
||||||
invoice.features = {
|
invoice.features = {
|
||||||
customize_invoice_design:{{ Auth::user()->hasFeature(FEATURE_CUSTOMIZE_INVOICE_DESIGN) ? 'true' : 'false' }},
|
customize_invoice_design:{{ Auth::user()->hasFeature(FEATURE_CUSTOMIZE_INVOICE_DESIGN) ? 'true' : 'false' }},
|
||||||
@ -56,21 +56,21 @@
|
|||||||
invoice.account.hide_paid_to_date = $('#hide_paid_to_date').is(":checked");
|
invoice.account.hide_paid_to_date = $('#hide_paid_to_date').is(":checked");
|
||||||
invoice.invoice_design_id = $('#invoice_design_id').val();
|
invoice.invoice_design_id = $('#invoice_design_id').val();
|
||||||
invoice.account.page_size = $('#page_size option:selected').text();
|
invoice.account.page_size = $('#page_size option:selected').text();
|
||||||
|
|
||||||
NINJA.primaryColor = $('#primary_color').val();
|
NINJA.primaryColor = $('#primary_color').val();
|
||||||
NINJA.secondaryColor = $('#secondary_color').val();
|
NINJA.secondaryColor = $('#secondary_color').val();
|
||||||
NINJA.fontSize = parseInt($('#font_size').val());
|
NINJA.fontSize = parseInt($('#font_size').val());
|
||||||
NINJA.headerFont = $('#header_font_id option:selected').text();
|
NINJA.headerFont = $('#header_font_id option:selected').text();
|
||||||
NINJA.bodyFont = $('#body_font_id option:selected').text();
|
NINJA.bodyFont = $('#body_font_id option:selected').text();
|
||||||
|
|
||||||
var fields = [
|
var fields = [
|
||||||
'item',
|
'item',
|
||||||
'description',
|
'description',
|
||||||
'unit_cost',
|
'unit_cost',
|
||||||
'quantity',
|
'quantity',
|
||||||
'line_total',
|
'line_total',
|
||||||
'terms',
|
'terms',
|
||||||
'balance_due',
|
'balance_due',
|
||||||
'partial_due'
|
'partial_due'
|
||||||
];
|
];
|
||||||
invoiceLabels.old = {};
|
invoiceLabels.old = {};
|
||||||
@ -88,7 +88,7 @@
|
|||||||
generatePDF(invoice, getDesignJavascript(), true, cb);
|
generatePDF(invoice, getDesignJavascript(), true, cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
var options = {
|
var options = {
|
||||||
preferredFormat: 'hex',
|
preferredFormat: 'hex',
|
||||||
disabled: {!! Auth::user()->hasFeature(FEATURE_CUSTOMIZE_INVOICE_DESIGN) ? 'false' : 'true' !!},
|
disabled: {!! Auth::user()->hasFeature(FEATURE_CUSTOMIZE_INVOICE_DESIGN) ? 'false' : 'true' !!},
|
||||||
@ -102,19 +102,19 @@
|
|||||||
$('#secondary_color').spectrum(options);
|
$('#secondary_color').spectrum(options);
|
||||||
$('#header_font_id').change(function(){loadFont($('#header_font_id').val())});
|
$('#header_font_id').change(function(){loadFont($('#header_font_id').val())});
|
||||||
$('#body_font_id').change(function(){loadFont($('#body_font_id').val())});
|
$('#body_font_id').change(function(){loadFont($('#body_font_id').val())});
|
||||||
|
|
||||||
|
|
||||||
refreshPDF();
|
refreshPDF();
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
{!! Former::open()->addClass('warn-on-exit')->onchange('if(!window.loadingFonts)refreshPDF()') !!}
|
{!! Former::open()->addClass('warn-on-exit')->onchange('if(!window.loadingFonts)refreshPDF()') !!}
|
||||||
|
|
||||||
{!! Former::populateField('invoice_design_id', $account->invoice_design_id) !!}
|
{!! Former::populateField('invoice_design_id', $account->invoice_design_id) !!}
|
||||||
{!! Former::populateField('body_font_id', $account->body_font_id) !!}
|
{!! Former::populateField('body_font_id', $account->body_font_id) !!}
|
||||||
{!! Former::populateField('header_font_id', $account->header_font_id) !!}
|
{!! Former::populateField('header_font_id', $account->header_font_id) !!}
|
||||||
@ -158,7 +158,7 @@
|
|||||||
{!! Former::select('invoice_design_id')
|
{!! Former::select('invoice_design_id')
|
||||||
->fromQuery($invoiceDesigns, 'name', 'id')
|
->fromQuery($invoiceDesigns, 'name', 'id')
|
||||||
->addOption(trans('texts.more_designs') . '...', '-1') !!}
|
->addOption(trans('texts.more_designs') . '...', '-1') !!}
|
||||||
@else
|
@else
|
||||||
{!! Former::select('invoice_design_id')
|
{!! Former::select('invoice_design_id')
|
||||||
->fromQuery($invoiceDesigns, 'name', 'id') !!}
|
->fromQuery($invoiceDesigns, 'name', 'id') !!}
|
||||||
@endif
|
@endif
|
||||||
@ -167,7 +167,7 @@
|
|||||||
{!! Former::select('header_font_id')
|
{!! Former::select('header_font_id')
|
||||||
->fromQuery($invoiceFonts, 'name', 'id') !!}
|
->fromQuery($invoiceFonts, 'name', 'id') !!}
|
||||||
|
|
||||||
{!! Former::checkbox('live_preview')->text(trans('texts.enable')) !!}
|
{!! Former::checkbox('live_preview')->text(trans('texts.enable')) !!}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@ -177,7 +177,7 @@
|
|||||||
|
|
||||||
{!! Former::select('page_size')
|
{!! Former::select('page_size')
|
||||||
->options($pageSizes) !!}
|
->options($pageSizes) !!}
|
||||||
|
|
||||||
{!! Former::text('font_size')
|
{!! Former::text('font_size')
|
||||||
->type('number')
|
->type('number')
|
||||||
->min('0')
|
->min('0')
|
||||||
@ -253,7 +253,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
{!! Former::actions(
|
{!! Former::actions(
|
||||||
Button::primary(trans('texts.customize'))
|
Button::primary(trans('texts.customize'))
|
||||||
->appendIcon(Icon::create('edit'))
|
->appendIcon(Icon::create('edit'))
|
||||||
->asLinkTo(URL::to('/settings/customize_design'))
|
->asLinkTo(URL::to('/settings/customize_design'))
|
||||||
@ -267,10 +267,10 @@
|
|||||||
|
|
||||||
@if (!Auth::user()->hasFeature(FEATURE_CUSTOMIZE_INVOICE_DESIGN))
|
@if (!Auth::user()->hasFeature(FEATURE_CUSTOMIZE_INVOICE_DESIGN))
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
$('form.warn-on-exit input, .save-button').prop('disabled', true);
|
$('form.warn-on-exit input, .save-button').prop('disabled', true);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
{!! Former::close() !!}
|
{!! Former::close() !!}
|
||||||
@ -282,4 +282,4 @@
|
|||||||
@include('invoices.pdf', ['account' => Auth::user()->account, 'pdfHeight' => 800])
|
@include('invoices.pdf', ['account' => Auth::user()->account, 'pdfHeight' => 800])
|
||||||
|
|
||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
@ -129,7 +129,7 @@
|
|||||||
{!! Former::select('plan_term')
|
{!! Former::select('plan_term')
|
||||||
->addOption(trans('texts.plan_term_yearly'), PLAN_TERM_YEARLY)
|
->addOption(trans('texts.plan_term_yearly'), PLAN_TERM_YEARLY)
|
||||||
->addOption(trans('texts.plan_term_monthly'), PLAN_TERM_MONTHLY)
|
->addOption(trans('texts.plan_term_monthly'), PLAN_TERM_MONTHLY)
|
||||||
->inlineHelp(trans('texts.enterprise_plan_features')) !!}
|
->inlineHelp(trans('texts.enterprise_plan_features', ['link' => link_to(NINJA_WEB_URL . '/plans-pricing', trans('texts.click_here'), ['target' => '_blank'])])) !!}
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer" style="margin-top: 0px">
|
<div class="modal-footer" style="margin-top: 0px">
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.go_back') }}</button>
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.go_back') }}</button>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
@foreach ($account->getFontFolders() as $font)
|
@foreach ($account->getFontFolders() as $font)
|
||||||
<script src="{{ asset('js/vfs_fonts/'.$font.'.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/vfs_fonts/'.$font.'.js') }}" type="text/javascript"></script>
|
||||||
@endforeach
|
@endforeach
|
||||||
<script src="{{ asset('pdf.built.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('pdf.built.js') }}?no_cache={{ NINJA_VERSION }}" type="text/javascript"></script>
|
||||||
<script src="{{ asset('js/lightbox.min.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/lightbox.min.js') }}" type="text/javascript"></script>
|
||||||
<link href="{{ asset('css/lightbox.css') }}" rel="stylesheet" type="text/css"/>
|
<link href="{{ asset('css/lightbox.css') }}" rel="stylesheet" type="text/css"/>
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
@foreach (Auth::user()->account->getFontFolders() as $font)
|
@foreach (Auth::user()->account->getFontFolders() as $font)
|
||||||
<script src="{{ asset('js/vfs_fonts/'.$font.'.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/vfs_fonts/'.$font.'.js') }}" type="text/javascript"></script>
|
||||||
@endforeach
|
@endforeach
|
||||||
<script src="{{ asset('pdf.built.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('pdf.built.js') }}?no_cache={{ NINJA_VERSION }}" type="text/javascript"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
@ -15,7 +15,7 @@
|
|||||||
var invoiceFonts = {!! $invoiceFonts !!};
|
var invoiceFonts = {!! $invoiceFonts !!};
|
||||||
var currentInvoice = {!! $invoice !!};
|
var currentInvoice = {!! $invoice !!};
|
||||||
var versionsJson = {!! $versionsJson !!};
|
var versionsJson = {!! $versionsJson !!};
|
||||||
|
|
||||||
function getPDFString(cb) {
|
function getPDFString(cb) {
|
||||||
|
|
||||||
var version = $('#version').val();
|
var version = $('#version').val();
|
||||||
@ -34,15 +34,15 @@
|
|||||||
if (!invoiceDesign) {
|
if (!invoiceDesign) {
|
||||||
invoiceDesign = invoiceDesigns[0];
|
invoiceDesign = invoiceDesigns[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
generatePDF(invoice, invoiceDesign.javascript, true, cb);
|
generatePDF(invoice, invoiceDesign.javascript, true, cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
refreshPDF();
|
refreshPDF();
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@ -50,13 +50,13 @@
|
|||||||
|
|
||||||
{!! Former::open()->addClass('form-inline')->onchange('refreshPDF()') !!}
|
{!! Former::open()->addClass('form-inline')->onchange('refreshPDF()') !!}
|
||||||
{!! Former::select('version')->options($versionsSelect)->label(trans('select_version'))->style('background-color: white !important') !!}
|
{!! Former::select('version')->options($versionsSelect)->label(trans('select_version'))->style('background-color: white !important') !!}
|
||||||
{!! Button::primary(trans('texts.edit_' . $invoice->getEntityType()))->asLinkTo(URL::to('/' . $invoice->getEntityType() . 's/' . $invoice->public_id . '/edit'))->withAttributes(array('class' => 'pull-right')) !!}
|
{!! Button::primary(trans('texts.edit_' . $invoice->getEntityType()))->asLinkTo(URL::to('/' . $invoice->getEntityType() . 's/' . $invoice->public_id . '/edit'))->withAttributes(array('class' => 'pull-right')) !!}
|
||||||
{!! Former::close() !!}
|
{!! Former::close() !!}
|
||||||
|
|
||||||
<br/> <br/>
|
<br/> <br/>
|
||||||
|
|
||||||
@include('invoices.pdf', ['account' => Auth::user()->account, 'pdfHeight' => 800])
|
@include('invoices.pdf', ['account' => Auth::user()->account, 'pdfHeight' => 800])
|
||||||
|
|
||||||
@if (Utils::hasFeature(FEATURE_DOCUMENTS) && $invoice->account->invoice_embed_documents)
|
@if (Utils::hasFeature(FEATURE_DOCUMENTS) && $invoice->account->invoice_embed_documents)
|
||||||
@foreach ($invoice->documents as $document)
|
@foreach ($invoice->documents as $document)
|
||||||
@if($document->isPDFEmbeddable())
|
@if($document->isPDFEmbeddable())
|
||||||
@ -71,4 +71,4 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
@stop
|
@stop
|
||||||
|
@ -4,15 +4,15 @@
|
|||||||
@parent
|
@parent
|
||||||
|
|
||||||
@include('money_script')
|
@include('money_script')
|
||||||
|
|
||||||
@foreach ($invoice->client->account->getFontFolders() as $font)
|
@foreach ($invoice->client->account->getFontFolders() as $font)
|
||||||
<script src="{{ asset('js/vfs_fonts/'.$font.'.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/vfs_fonts/'.$font.'.js') }}" type="text/javascript"></script>
|
||||||
@endforeach
|
@endforeach
|
||||||
<script src="{{ asset('pdf.built.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('pdf.built.js') }}?no_cache={{ NINJA_VERSION }}" type="text/javascript"></script>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body {
|
body {
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@stop
|
@stop
|
||||||
@ -39,8 +39,8 @@
|
|||||||
{!! DropdownButton::success(trans('texts.pay_now'))->withContents($paymentTypes)->large() !!}
|
{!! DropdownButton::success(trans('texts.pay_now'))->withContents($paymentTypes)->large() !!}
|
||||||
@else
|
@else
|
||||||
<a href='{!! $paymentURL !!}' class="btn btn-success btn-lg">{{ trans('texts.pay_now') }}</a>
|
<a href='{!! $paymentURL !!}' class="btn btn-success btn-lg">{{ trans('texts.pay_now') }}</a>
|
||||||
@endif
|
@endif
|
||||||
@else
|
@else
|
||||||
{!! Button::normal(trans('texts.download_pdf'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}
|
{!! Button::normal(trans('texts.download_pdf'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@ -67,7 +67,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($account->hasFeature(FEATURE_DOCUMENTS) && $account->invoice_embed_documents)
|
@if ($account->hasFeature(FEATURE_DOCUMENTS) && $account->invoice_embed_documents)
|
||||||
@foreach ($invoice->documents as $document)
|
@foreach ($invoice->documents as $document)
|
||||||
@if($document->isPDFEmbeddable())
|
@if($document->isPDFEmbeddable())
|
||||||
@ -107,16 +107,16 @@
|
|||||||
doc.getDataUrl(function(pdfString) {
|
doc.getDataUrl(function(pdfString) {
|
||||||
document.write(pdfString);
|
document.write(pdfString);
|
||||||
document.close();
|
document.close();
|
||||||
|
|
||||||
if (window.hasOwnProperty('pjsc_meta')) {
|
if (window.hasOwnProperty('pjsc_meta')) {
|
||||||
window['pjsc_meta'].remainingTasks--;
|
window['pjsc_meta'].remainingTasks--;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@else
|
@else
|
||||||
refreshPDF();
|
refreshPDF();
|
||||||
@endif
|
@endif
|
||||||
});
|
});
|
||||||
|
|
||||||
function onDownloadClick() {
|
function onDownloadClick() {
|
||||||
var doc = generatePDF(invoice, invoice.invoice_design.javascript, true);
|
var doc = generatePDF(invoice, invoice.invoice_design.javascript, true);
|
||||||
var fileName = invoice.is_quote ? invoiceLabels.quote : invoiceLabels.invoice;
|
var fileName = invoice.is_quote ? invoiceLabels.quote : invoiceLabels.invoice;
|
||||||
|
Loading…
Reference in New Issue
Block a user