Skip to content

Commit 5801a7e

Browse files
committed
Spinner: Prefix variables with component name.
1 parent 47db52b commit 5801a7e

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

ui/jquery.ui.slider.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,8 @@ $.widget( "ui.slider", $.ui.mouse, {
638638
break;
639639
case $.ui.keyCode.PAGE_UP:
640640
newVal = this._trimAlignValue(
641-
curVal + ( (this._valueMax() - this._valueMin()) / this.numPages ) );
641+
curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages )
642+
);
642643
break;
643644
case $.ui.keyCode.PAGE_DOWN:
644645
newVal = this._trimAlignValue(

ui/jquery.ui.spinner.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
(function( $ ) {
1717

18-
function modifier( fn ) {
18+
function spinner_modifier( fn ) {
1919
return function() {
2020
var previous = this.element.val();
2121
fn.apply( this, arguments );
@@ -391,7 +391,7 @@ $.widget( "ui.spinner", {
391391
}
392392
},
393393

394-
_setOptions: modifier(function( options ) {
394+
_setOptions: spinner_modifier(function( options ) {
395395
this._super( options );
396396
this._value( this.element.val() );
397397
}),
@@ -462,7 +462,7 @@ $.widget( "ui.spinner", {
462462
this.uiSpinner.replaceWith( this.element );
463463
},
464464

465-
stepUp: modifier(function( steps ) {
465+
stepUp: spinner_modifier(function( steps ) {
466466
this._stepUp( steps );
467467
}),
468468
_stepUp: function( steps ) {
@@ -472,7 +472,7 @@ $.widget( "ui.spinner", {
472472
}
473473
},
474474

475-
stepDown: modifier(function( steps ) {
475+
stepDown: spinner_modifier(function( steps ) {
476476
this._stepDown( steps );
477477
}),
478478
_stepDown: function( steps ) {
@@ -482,19 +482,19 @@ $.widget( "ui.spinner", {
482482
}
483483
},
484484

485-
pageUp: modifier(function( pages ) {
485+
pageUp: spinner_modifier(function( pages ) {
486486
this._stepUp( (pages || 1) * this.options.page );
487487
}),
488488

489-
pageDown: modifier(function( pages ) {
489+
pageDown: spinner_modifier(function( pages ) {
490490
this._stepDown( (pages || 1) * this.options.page );
491491
}),
492492

493493
value: function( newVal ) {
494494
if ( !arguments.length ) {
495495
return this._parse( this.element.val() );
496496
}
497-
modifier( this._value ).call( this, newVal );
497+
spinner_modifier( this._value ).call( this, newVal );
498498
},
499499

500500
widget: function() {

0 commit comments

Comments
 (0)