updates to url and filter

This commit is contained in:
rlx 2011-11-10 22:47:38 +00:00
commit d2a2ddb66e
4 changed files with 73 additions and 19 deletions

View file

@ -548,7 +548,8 @@ Ox.formatValue = function(num, str, bin) {
/*@
Ox.formatUnit <f> Formats a number with a unit
@*/
Ox.formatUnit = function(num, str, dec) {
Ox.formatUnit = function(num, str, dec, factor) {
dec = Ox.isUndefined(dec) ? 3 : dec;
return Ox.formatNumber(num, dec) + (str == '%' ? '' : ' ') + str;
factor = Ox.isUndefined(factor) ? 1 : factor;
return Ox.formatNumber(num * factor, dec) + (str == '%' ? '' : ' ') + str;
};