mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 12:42:36 +01:00
Prevent numbers from wrapping
This commit is contained in:
parent
f95cdd2c32
commit
6d9e4cfe1d
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -145,6 +145,9 @@ function GetPdfMake(invoice, javascript, callback) {
|
||||
}
|
||||
}
|
||||
|
||||
// support setting noWrap as a style
|
||||
dd.styles.noWrap = {'noWrap': true};
|
||||
|
||||
// set page size
|
||||
dd.pageSize = invoice.account.page_size;
|
||||
|
||||
@ -1101,11 +1104,17 @@ NINJA.prepareDataPairs = function(oldData, section) {
|
||||
}
|
||||
|
||||
NINJA.processItem = function(item, section) {
|
||||
if (item.style && item.style instanceof Array) {
|
||||
item.style.push(section);
|
||||
} else {
|
||||
item.style = [section];
|
||||
if (! item.style) {
|
||||
item.style = [];
|
||||
}
|
||||
|
||||
item.style.push(section);
|
||||
|
||||
// make sure numbers aren't wrapped
|
||||
if (item.text && item.text.match && item.text.match(/\d\.\d\d|\d,\d\d/)) {
|
||||
item.style.push('noWrap');
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user