aboutsummaryrefslogtreecommitdiffstats
path: root/external
diff options
context:
space:
mode:
authorjzaefferer <joern.zaefferer@gmail.com>2011-01-18 12:08:22 +0100
committerjzaefferer <joern.zaefferer@gmail.com>2011-01-18 12:08:22 +0100
commitca818beca59cd69fa790a10ace64d4dfa631ba20 (patch)
tree2eb636533c7373e2f60cc342dcb24271af7bf615 /external
parent67b070f97a6dc4907cbb5e69b8899c0b5c716684 (diff)
downloadjquery-ui-ca818beca59cd69fa790a10ace64d4dfa631ba20.tar.gz
jquery-ui-ca818beca59cd69fa790a10ace64d4dfa631ba20.zip
Update to latest jquery-global plugin
Diffstat (limited to 'external')
-rw-r--r--external/jquery.global.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/external/jquery.global.js b/external/jquery.global.js
index fcaacf9c7..8aac5fdbe 100644
--- a/external/jquery.global.js
+++ b/external/jquery.global.js
@@ -151,14 +151,18 @@ Globalization.format = function(value, format, culture) {
Globalization.parseInt = function(value, radix, culture) {
return Math.floor( this.parseFloat( value, radix, culture ) );
}
-Globalization.parseCurrency = function(value, culture) {
- return this.parseFloat(value.replace(/[^\d,.-]/g, ""), 10, culture);
-}
Globalization.parseFloat = function(value, radix, culture) {
culture = this.findClosestCulture( culture );
var ret = NaN,
nf = culture.numberFormat;
+ if (value.indexOf(culture.numberFormat.currency.symbol) > -1) {
+ // remove currency symbol
+ value = value.replace(culture.numberFormat.currency.symbol, "");
+ // replace decimal seperator
+ value = value.replace(culture.numberFormat.currency["."], culture.numberFormat["."]);
+ }
+
// trim leading and trailing whitespace
value = trim( value );