diff options
author | Alexander Schmitz <arschmitz@gmail.com> | 2015-08-21 00:04:59 -0400 |
---|---|---|
committer | Alexander Schmitz <arschmitz@gmail.com> | 2015-08-21 08:06:22 -0400 |
commit | 2626be45337b8edb7be1958e4534db0ef435de56 (patch) | |
tree | b8173701629511decb1a96ed497cf3e96480c263 | |
parent | 063885f592e6558d377968006ef7fe8ce192362c (diff) | |
download | jquery-ui-2626be45337b8edb7be1958e4534db0ef435de56.tar.gz jquery-ui-2626be45337b8edb7be1958e4534db0ef435de56.zip |
Spinner: Style updates
Ref #14246
Ref gh-1588
-rw-r--r-- | tests/unit/spinner/common-deprecated.js | 2 | ||||
-rw-r--r-- | tests/unit/spinner/common.js | 2 | ||||
-rw-r--r-- | tests/unit/spinner/options.js | 2 | ||||
-rw-r--r-- | ui/widgets/spinner.js | 22 |
4 files changed, 14 insertions, 14 deletions
diff --git a/tests/unit/spinner/common-deprecated.js b/tests/unit/spinner/common-deprecated.js index 8ff50fa25..ece9adeac 100644 --- a/tests/unit/spinner/common-deprecated.js +++ b/tests/unit/spinner/common-deprecated.js @@ -23,7 +23,7 @@ common.testWidget( "spinner", { page: 10, step: 1, - // callbacks + // Callbacks change: null, create: null, spin: null, diff --git a/tests/unit/spinner/common.js b/tests/unit/spinner/common.js index 8ff50fa25..ece9adeac 100644 --- a/tests/unit/spinner/common.js +++ b/tests/unit/spinner/common.js @@ -23,7 +23,7 @@ common.testWidget( "spinner", { page: 10, step: 1, - // callbacks + // Callbacks change: null, create: null, spin: null, diff --git a/tests/unit/spinner/options.js b/tests/unit/spinner/options.js index d43c968cd..c3a9f74a2 100644 --- a/tests/unit/spinner/options.js +++ b/tests/unit/spinner/options.js @@ -147,7 +147,7 @@ test( "culture, null", function() { element.spinner( "stepUp" ); equal( element.val(), "¥1", "formatted after step" ); - // reset culture + // Reset culture Globalize.culture( "default" ); }); diff --git a/ui/widgets/spinner.js b/ui/widgets/spinner.js index bc0535700..712d99bad 100644 --- a/ui/widgets/spinner.js +++ b/ui/widgets/spinner.js @@ -91,7 +91,7 @@ $.widget( "ui.spinner", { this._on( this._events ); this._refresh(); - // turning off autocomplete prevents the browser from remembering the + // Turning off autocomplete prevents the browser from remembering the // value when navigating through history, so we re-enable autocomplete // if the page is unloaded before the widget is destroyed. #7790 this._on( this.window, { @@ -178,11 +178,11 @@ $.widget( "ui.spinner", { } } - // ensure focus is on (or stays on) the text field + // Ensure focus is on (or stays on) the text field event.preventDefault(); checkFocus.call( this ); - // support: IE + // Support: IE // IE doesn't prevent moving focus even with event.preventDefault() // so we set a flag to know when we should ignore the blur event // and check (again) if focus moved off of the input. @@ -242,7 +242,7 @@ $.widget( "ui.spinner", { this.element.attr( "role", "spinbutton" ); - // button bindings + // Button bindings this.buttons = this.uiSpinner.children( "a" ) .attr( "tabIndex", -1 ) .button(); @@ -264,7 +264,7 @@ $.widget( "ui.spinner", { this.uiSpinner.height( this.uiSpinner.height() ); } - // disable spinner if element was already disabled + // Disable spinner if element was already disabled if ( this.options.disabled ) { this.disable(); } @@ -360,7 +360,7 @@ $.widget( "ui.spinner", { var base, aboveMin, options = this.options; - // make sure we're at a valid step + // Make sure we're at a valid step // - find out where we are relative to the base (min or 0) base = options.min !== null ? options.min : 0; aboveMin = value - base; @@ -369,10 +369,10 @@ $.widget( "ui.spinner", { // - rounding is based on 0, so adjust back to our base value = base + aboveMin; - // fix precision from bad JS floating point math + // Fix precision from bad JS floating point math value = parseFloat( value.toFixed( this._precision() ) ); - // clamp the value + // Clamp the value if ( options.max !== null && value > options.max ) { return options.max; } @@ -461,16 +461,16 @@ $.widget( "ui.spinner", { isValid: function() { var value = this.value(); - // null is invalid + // Null is invalid if ( value === null ) { return false; } - // if value gets adjusted, it's invalid + // If value gets adjusted, it's invalid return value === this._adjustValue( value ); }, - // update the value without triggering change + // Update the value without triggering change _value: function( value, allowAny ) { var parsed; if ( value !== "" ) { |