diff options
author | Scott González <scott.gonzalez@gmail.com> | 2013-10-23 08:15:12 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2013-10-24 09:19:42 -0400 |
commit | 5801a7ef653116b1376a8b5e4a94b56753fb8464 (patch) | |
tree | eb67a2c87cad0703eaeb27dce7c2f829a1332568 /ui | |
parent | 47db52b9c98a5c593eb86e5b75309568d11b3bef (diff) | |
download | jquery-ui-5801a7ef653116b1376a8b5e4a94b56753fb8464.tar.gz jquery-ui-5801a7ef653116b1376a8b5e4a94b56753fb8464.zip |
Spinner: Prefix variables with component name.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.slider.js | 3 | ||||
-rw-r--r-- | ui/jquery.ui.spinner.js | 14 |
2 files changed, 9 insertions, 8 deletions
diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js index c2398b881..10efc4bf8 100644 --- a/ui/jquery.ui.slider.js +++ b/ui/jquery.ui.slider.js @@ -638,7 +638,8 @@ $.widget( "ui.slider", $.ui.mouse, { break; case $.ui.keyCode.PAGE_UP: newVal = this._trimAlignValue( - curVal + ( (this._valueMax() - this._valueMin()) / this.numPages ) ); + curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages ) + ); break; case $.ui.keyCode.PAGE_DOWN: newVal = this._trimAlignValue( diff --git a/ui/jquery.ui.spinner.js b/ui/jquery.ui.spinner.js index 3bbd35f88..870b3328a 100644 --- a/ui/jquery.ui.spinner.js +++ b/ui/jquery.ui.spinner.js @@ -15,7 +15,7 @@ */ (function( $ ) { -function modifier( fn ) { +function spinner_modifier( fn ) { return function() { var previous = this.element.val(); fn.apply( this, arguments ); @@ -391,7 +391,7 @@ $.widget( "ui.spinner", { } }, - _setOptions: modifier(function( options ) { + _setOptions: spinner_modifier(function( options ) { this._super( options ); this._value( this.element.val() ); }), @@ -462,7 +462,7 @@ $.widget( "ui.spinner", { this.uiSpinner.replaceWith( this.element ); }, - stepUp: modifier(function( steps ) { + stepUp: spinner_modifier(function( steps ) { this._stepUp( steps ); }), _stepUp: function( steps ) { @@ -472,7 +472,7 @@ $.widget( "ui.spinner", { } }, - stepDown: modifier(function( steps ) { + stepDown: spinner_modifier(function( steps ) { this._stepDown( steps ); }), _stepDown: function( steps ) { @@ -482,11 +482,11 @@ $.widget( "ui.spinner", { } }, - pageUp: modifier(function( pages ) { + pageUp: spinner_modifier(function( pages ) { this._stepUp( (pages || 1) * this.options.page ); }), - pageDown: modifier(function( pages ) { + pageDown: spinner_modifier(function( pages ) { this._stepDown( (pages || 1) * this.options.page ); }), @@ -494,7 +494,7 @@ $.widget( "ui.spinner", { if ( !arguments.length ) { return this._parse( this.element.val() ); } - modifier( this._value ).call( this, newVal ); + spinner_modifier( this._value ).call( this, newVal ); }, widget: function() { |