Skip to content

Commit

Permalink
Merge branch 'master' of github.com:jquery/jquery-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
scottgonzalez committed Feb 8, 2011
2 parents 93916b4 + ce51ede commit fba3349
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 16 deletions.
4 changes: 2 additions & 2 deletions demos/spinner/currency.html
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
Expand All @@ -18,7 +18,7 @@
$(function() {
$("#currency").change(function() {
var current = $("#spinner").spinner("value");
Globalization.preferCulture($(this).val());
$.global.preferCulture($(this).val());
$("#spinner").spinner("value", current);
})

Expand Down
4 changes: 2 additions & 2 deletions demos/spinner/decimal.html
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
Expand All @@ -23,7 +23,7 @@

$("#culture").change(function() {
var current = $("#spinner").spinner("value");
Globalization.preferCulture($(this).val());
$.global.preferCulture($(this).val());
$("#spinner").spinner("value", current);
})
});
Expand Down
2 changes: 1 addition & 1 deletion demos/spinner/default.html
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
Expand Down
2 changes: 1 addition & 1 deletion demos/spinner/index.html
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>jQuery UI Spinner Demos</title>
Expand Down
2 changes: 1 addition & 1 deletion demos/spinner/latlong.html
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
Expand Down
2 changes: 1 addition & 1 deletion demos/spinner/overflow.html
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
Expand Down
9 changes: 4 additions & 5 deletions demos/spinner/time.html
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
Expand All @@ -24,21 +24,20 @@

_parse: function(value) {
if (typeof value == 'string') {
return +Globalization.parseDate(value)
return +$.global.parseDate(value)
}
return value;
},
_format: function() {
this.element.val( Globalization.format(new Date(this.options.value), "t") );
this.element.val( $.global.format(new Date(this.options.value), "t") );
}
})
$(function() {
$("#spinner").timespinner();


$("#culture").change(function() {
var current = $("#spinner").timespinner("value");
Globalization.preferCulture($(this).val());
$.global.preferCulture($(this).val());
$("#spinner").timespinner("value", current);
});
});
Expand Down
10 changes: 7 additions & 3 deletions ui/jquery.ui.spinner.js
Expand Up @@ -285,11 +285,16 @@ $.widget('ui.spinner', {
this.buttons.button("enable");
}
}
this._super( "_setOption", key, value );
// TODO see below
//this._super( "_setOption", key, value );
$.Widget.prototype._setOption.apply( this, arguments );
},

_setOptions: function( options ) {
this._super( "_setOptions", options );
// TODO _super doesn't handle inheritance with more then one subclass
// spinner subclass will have spinner as base, calling spinner._setOptions infinitely
//this._super( "_setOptions", options );
$.Widget.prototype._setOptions.apply( this, arguments );
if ( "value" in options ) {
this._format( this.options.value );
}
Expand All @@ -312,7 +317,6 @@ $.widget('ui.spinner', {
},

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

Expand Down

0 comments on commit fba3349

Please sign in to comment.