HcpShadow / jquery-numberformatter

Automatically exported from code.google.com/p/jquery-numberformatter
0 stars 0 forks source link

$._roundNumber is not a function (with Richfaces) #54

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Import jquery-numberformatter in a project using Richfaces (tested with 
3.3.3Final)
2. Call formatNumber (e.g. jQuery(element).formatNumber({format:"#,###.##", 
locale:"fr"});) witch uses toFixed function.
3. Console shows "$._roundNumber is not a function" (Firebug)

Correction:
Replace

Number.prototype.toFixed = function(precision) {
        return $._roundNumber(this, precision);
    };

by:
Number.prototype.toFixed = function(precision) {
        return jQuery._roundNumber(this, precision);
    };

Using :
jsf 1.2
Richfaces  3.3.3Final
Firefox 7.0
jquery-numberformatter 1.2.2

Original issue reported on code.google.com by jcfe...@gmail.com on 7 Oct 2011 at 9:08

GoogleCodeExporter commented 8 years ago
Sorry, duplicate with Issue 43... Didn't see before searching "roundNumber"

Original comment by jcfe...@gmail.com on 7 Oct 2011 at 9:13

GoogleCodeExporter commented 8 years ago
No worries, closed as dup.

Original comment by apar...@gmail.com on 4 Mar 2012 at 12:45