Skip to content
Permalink
Browse files

Spinner: Update to latest jquery-global plugin, removing the currency

workaround.
  • Loading branch information
jzaefferer committed Jan 18, 2011
1 parent ca818be commit 6a79c708526b846ccbcdf9578efc168c23261182
Showing with 2 additions and 8 deletions.
  1. +2 −8 ui/jquery.ui.spinner.js
@@ -305,20 +305,14 @@ $.widget('ui.spinner', {
_parse: function(val) {
var input = val;
if (typeof val == 'string') {
// special case for currency formatting until Globalization handles currencies
if (this.options.numberformat == "C" && window.Globalization) {
// parseFloat should accept number format, including currency
var culture = Globalization.culture || Globalization.cultures['default'];
val = val.replace(culture.numberFormat.currency.symbol, "");
}
val = window.Globalization && this.options.numberformat ? Globalization.parseFloat(val) : +val;
val = $.global && this.options.numberformat ? $.global.parseFloat(val) : +val;
}
return isNaN(val) ? null : val;
},

_format: function(num) {
var num = this.options.value;
this.element.val( window.Globalization && this.options.numberformat ? Globalization.format(num, this.options.numberformat) : num );
this.element.val( $.global && this.options.numberformat ? $.global.format(num, this.options.numberformat) : num );
},

destroy: function() {

0 comments on commit 6a79c70

Please sign in to comment.
You can’t perform that action at this time.