mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-18 09:04:35 +01:00
bug fixes
This commit is contained in:
parent
b89b1eb45e
commit
f9e7959218
@ -11,7 +11,7 @@
|
||||
{{ $totalIncome }}
|
||||
</div>
|
||||
<div class="in-thin">
|
||||
in total income
|
||||
in total revenue
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -469,6 +469,7 @@
|
||||
var $input = $('select#client');
|
||||
$input.combobox().on('change', function(e) {
|
||||
var clientId = parseInt($('input[name=client]').val(), 10);
|
||||
console.log('CHANGE: %s', clientId);
|
||||
if (clientId > 0) {
|
||||
model.loadClient(clientMap[clientId]);
|
||||
} else {
|
||||
@ -580,6 +581,7 @@
|
||||
*/
|
||||
|
||||
var isRefreshing = false;
|
||||
var needsRefresh = false;
|
||||
function refreshPDF() {
|
||||
var invoice = createInvoiceModel();
|
||||
var doc = generatePDF(invoice);
|
||||
@ -590,6 +592,7 @@
|
||||
$('#theFrame').attr('src', string).show();
|
||||
} else {
|
||||
if (isRefreshing) {
|
||||
needsRefresh = true;
|
||||
return;
|
||||
}
|
||||
isRefreshing = true;
|
||||
@ -609,6 +612,10 @@
|
||||
page.render({canvasContext: context, viewport: viewport});
|
||||
$('#theCanvas').show();
|
||||
isRefreshing = false;
|
||||
if (needsRefresh) {
|
||||
needsRefresh = false;
|
||||
refreshPDF();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user