mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 21:34:30 -04: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
|
// set page size
|
||||||
dd.pageSize = invoice.account.page_size;
|
dd.pageSize = invoice.account.page_size;
|
||||||
|
|
||||||
@ -1101,11 +1104,17 @@ NINJA.prepareDataPairs = function(oldData, section) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
NINJA.processItem = function(item, section) {
|
NINJA.processItem = function(item, section) {
|
||||||
if (item.style && item.style instanceof Array) {
|
if (! item.style) {
|
||||||
item.style.push(section);
|
item.style = [];
|
||||||
} else {
|
|
||||||
item.style = [section];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user