mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Update to latest jquery-global plugin
This commit is contained in:
parent
67b070f97a
commit
ca818beca5
10
external/jquery.global.js
vendored
10
external/jquery.global.js
vendored
@ -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 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user