Skip to content

Commit 1272548

Browse files
committed
clean up unused vars in ui directory
1 parent 563595e commit 1272548

9 files changed

+34
-34
lines changed

ui/.jshintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"onevar": true,
1111
"trailing": true,
1212
"undef": true,
13+
"unused": true,
1314
"predef": [
1415
"Globalize"
1516
]

ui/jquery.ui.accordion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ if ( $.uiBackCompat !== false ) {
603603
_create.call( this );
604604
},
605605

606-
_setOption: function( key, value ) {
606+
_setOption: function( key ) {
607607
if ( key === "autoHeight" || key === "clearStyle" || key === "fillSpace" ) {
608608
this.options.heightStyle = this._mergeHeightStyle();
609609
}

ui/jquery.ui.autocomplete.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ $.widget( "ui.autocomplete", {
359359
url: url,
360360
data: request,
361361
dataType: "json",
362-
success: function( data, status ) {
362+
success: function( data ) {
363363
response( data );
364364
},
365365
error: function() {
@@ -541,7 +541,7 @@ $.widget( "ui.autocomplete", {
541541
return this.menu.element;
542542
},
543543

544-
_value: function( value ) {
544+
_value: function() {
545545
return this.valueMethod.apply( this.element, arguments );
546546
},
547547

ui/jquery.ui.dialog.js

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ $.widget("ui.dialog", {
8888
options = this.options,
8989

9090
title = options.title || " ",
91+
uiDialog,
92+
uiDialogTitlebar,
93+
uiDialogTitlebarClose,
94+
uiDialogTitle,
95+
uiDialogButtonPane;
9196

9297
uiDialog = ( this.uiDialog = $( "<div>" ) )
9398
.addClass( uiDialogClasses + options.dialogClass )
@@ -108,13 +113,13 @@ $.widget("ui.dialog", {
108113
.mousedown(function( event ) {
109114
that.moveToTop( false, event );
110115
})
111-
.appendTo( "body" ),
116+
.appendTo( "body" );
112117

113-
uiDialogContent = this.element
118+
this.element
114119
.show()
115120
.removeAttr( "title" )
116121
.addClass( "ui-dialog-content ui-widget-content" )
117-
.appendTo( uiDialog ),
122+
.appendTo( uiDialog );
118123

119124
uiDialogTitlebar = ( this.uiDialogTitlebar = $( "<div>" ) )
120125
.addClass( "ui-dialog-titlebar ui-widget-header " +
@@ -123,7 +128,7 @@ $.widget("ui.dialog", {
123128
// Dialog isn't getting focus when dragging (#8063)
124129
uiDialog.focus();
125130
})
126-
.prependTo( uiDialog ),
131+
.prependTo( uiDialog );
127132

128133
uiDialogTitlebarClose = $( "<a href='#'></a>" )
129134
.addClass( "ui-dialog-titlebar-close ui-corner-all" )
@@ -132,23 +137,23 @@ $.widget("ui.dialog", {
132137
event.preventDefault();
133138
that.close( event );
134139
})
135-
.appendTo( uiDialogTitlebar ),
140+
.appendTo( uiDialogTitlebar );
136141

137-
uiDialogTitlebarCloseText = ( this.uiDialogTitlebarCloseText = $( "<span>" ) )
142+
( this.uiDialogTitlebarCloseText = $( "<span>" ) )
138143
.addClass( "ui-icon ui-icon-closethick" )
139144
.text( options.closeText )
140-
.appendTo( uiDialogTitlebarClose ),
145+
.appendTo( uiDialogTitlebarClose );
141146

142147
uiDialogTitle = $( "<span>" )
143148
.uniqueId()
144149
.addClass( "ui-dialog-title" )
145150
.html( title )
146-
.prependTo( uiDialogTitlebar ),
151+
.prependTo( uiDialogTitlebar );
147152

148153
uiDialogButtonPane = ( this.uiDialogButtonPane = $( "<div>" ) )
149-
.addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" ),
154+
.addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" );
150155

151-
uiButtonSet = ( this.uiButtonSet = $( "<div>" ) )
156+
( this.uiButtonSet = $( "<div>" ) )
152157
.addClass( "ui-dialog-buttonset" )
153158
.appendTo( uiDialogButtonPane );
154159

@@ -350,8 +355,7 @@ $.widget("ui.dialog", {
350355
},
351356

352357
_createButtons: function( buttons ) {
353-
var uiDialogButtonPane, uiButtonSet,
354-
that = this,
358+
var that = this,
355359
hasButtons = false;
356360

357361
// if we already have a button pane, remove it

ui/jquery.ui.effect.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,7 @@ color.fn = jQuery.extend( color.prototype, {
245245

246246
var inst = this,
247247
type = jQuery.type( red ),
248-
rgba = this._rgba = [],
249-
source;
248+
rgba = this._rgba = [];
250249

251250
// more than 1 argument specified - assume ( red, green, blue, alpha )
252251
if ( green !== undefined ) {
@@ -427,7 +426,7 @@ color.fn = jQuery.extend( color.prototype, {
427426
rgba.push( ~~( alpha * 255 ) );
428427
}
429428

430-
return "#" + jQuery.map( rgba, function( v, i ) {
429+
return "#" + jQuery.map( rgba, function( v ) {
431430

432431
// default to 0 when nulls exist
433432
v = ( v || 0 ).toString( 16 );
@@ -501,8 +500,7 @@ spaces.hsla.from = function ( hsla ) {
501500
l = hsla[ 2 ],
502501
a = hsla[ 3 ],
503502
q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
504-
p = 2 * l - q,
505-
r, g, b;
503+
p = 2 * l - q;
506504

507505
return [
508506
Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
@@ -710,7 +708,6 @@ function getElementStyles() {
710708
this.currentStyle,
711709
newStyle = {},
712710
key,
713-
camelCase,
714711
len;
715712

716713
// webkit enumerates style porperties
@@ -1114,7 +1111,7 @@ function standardSpeed( speed ) {
11141111
}
11151112

11161113
$.fn.extend({
1117-
effect: function( effect, options, speed, callback ) {
1114+
effect: function() {
11181115
var args = _normalizeArguments.apply( this, arguments ),
11191116
mode = args.mode,
11201117
queue = args.queue,

ui/jquery.ui.slider.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ $.widget( "ui.slider", $.ui.mouse, {
278278
return true;
279279
},
280280

281-
_mouseStart: function( event ) {
281+
_mouseStart: function() {
282282
return true;
283283
},
284284

@@ -591,7 +591,7 @@ $.widget( "ui.slider", $.ui.mouse, {
591591
_set = {};
592592

593593
if ( this.options.values && this.options.values.length ) {
594-
this.handles.each(function( i, j ) {
594+
this.handles.each(function( i ) {
595595
valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;
596596
_set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
597597
$( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );

ui/jquery.ui.tabs.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ $.widget( "ui.tabs", {
4545
},
4646

4747
_create: function() {
48-
var panel,
49-
that = this,
48+
var that = this,
5049
options = this.options,
5150
active = options.active,
5251
locationHash = location.hash.substring( 1 );
@@ -295,8 +294,7 @@ $.widget( "ui.tabs", {
295294
},
296295

297296
refresh: function() {
298-
var next,
299-
options = this.options,
297+
var options = this.options,
300298
lis = this.tablist.children( ":has(a[href])" );
301299

302300
// get disabled tabs from class attribute from HTML
@@ -922,7 +920,7 @@ if ( $.uiBackCompat !== false ) {
922920
this._super();
923921
},
924922

925-
url: function( index, url ){
923+
url: function( index ){
926924
this.anchors.eq( index ).removeData( "cache.tabs" );
927925
this._superApply( arguments );
928926
}
@@ -1158,7 +1156,7 @@ if ( $.uiBackCompat !== false ) {
11581156
}
11591157
},
11601158

1161-
_eventHandler: function( event ) {
1159+
_eventHandler: function() {
11621160
this._superApply( arguments );
11631161
this.options.selected = this.options.active;
11641162
if ( this.options.selected === false ) {
@@ -1254,7 +1252,7 @@ if ( $.uiBackCompat !== false ) {
12541252
this._cookie( this.options.active, this.options.cookie );
12551253
}
12561254
},
1257-
_eventHandler: function( event ) {
1255+
_eventHandler: function() {
12581256
this._superApply( arguments );
12591257
if ( this.options.cookie ) {
12601258
this._cookie( this.options.active, this.options.cookie );

ui/jquery.ui.tooltip.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ $.widget( "ui.tooltip", {
284284
this.close( fakeEvent, true );
285285
}
286286
},
287-
remove: function( event ) {
287+
remove: function() {
288288
this._removeTooltip( tooltip );
289289
}
290290
};
@@ -297,7 +297,7 @@ $.widget( "ui.tooltip", {
297297
this._on( target, events );
298298
},
299299

300-
close: function( event, force ) {
300+
close: function( event ) {
301301
var that = this,
302302
target = $( event ? event.currentTarget : this.element ),
303303
tooltip = this._find( target );

ui/jquery.ui.widget.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ $.widget.bridge = function( name, object ) {
200200
};
201201
};
202202

203-
$.Widget = function( options, element ) {};
203+
$.Widget = function() {};
204204
$.Widget._childConstructors = [];
205205

206206
$.Widget.prototype = {

0 commit comments

Comments
 (0)