Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

clean up unused vars in ui directory

  • Loading branch information...
commit 12725480cb58e70865e5aa6e735009b6b035c8f3 1 parent 563595e
@mikesherov mikesherov authored
View
1  ui/.jshintrc
@@ -10,6 +10,7 @@
"onevar": true,
"trailing": true,
"undef": true,
+ "unused": true,
"predef": [
"Globalize"
]
View
2  ui/jquery.ui.accordion.js
@@ -603,7 +603,7 @@ if ( $.uiBackCompat !== false ) {
_create.call( this );
},
- _setOption: function( key, value ) {
+ _setOption: function( key ) {
if ( key === "autoHeight" || key === "clearStyle" || key === "fillSpace" ) {
this.options.heightStyle = this._mergeHeightStyle();
}
View
4 ui/jquery.ui.autocomplete.js
@@ -359,7 +359,7 @@ $.widget( "ui.autocomplete", {
url: url,
data: request,
dataType: "json",
- success: function( data, status ) {
+ success: function( data ) {
response( data );
},
error: function() {
@@ -541,7 +541,7 @@ $.widget( "ui.autocomplete", {
return this.menu.element;
},
- _value: function( value ) {
+ _value: function() {
return this.valueMethod.apply( this.element, arguments );
},
View
28 ui/jquery.ui.dialog.js
@@ -88,6 +88,11 @@ $.widget("ui.dialog", {
options = this.options,
title = options.title || " ",
+ uiDialog,
+ uiDialogTitlebar,
+ uiDialogTitlebarClose,
+ uiDialogTitle,
+ uiDialogButtonPane;
uiDialog = ( this.uiDialog = $( "<div>" ) )
.addClass( uiDialogClasses + options.dialogClass )
@@ -108,13 +113,13 @@ $.widget("ui.dialog", {
.mousedown(function( event ) {
that.moveToTop( false, event );
})
- .appendTo( "body" ),
+ .appendTo( "body" );
- uiDialogContent = this.element
+ this.element
.show()
.removeAttr( "title" )
.addClass( "ui-dialog-content ui-widget-content" )
- .appendTo( uiDialog ),
+ .appendTo( uiDialog );
uiDialogTitlebar = ( this.uiDialogTitlebar = $( "<div>" ) )
.addClass( "ui-dialog-titlebar ui-widget-header " +
@@ -123,7 +128,7 @@ $.widget("ui.dialog", {
// Dialog isn't getting focus when dragging (#8063)
uiDialog.focus();
})
- .prependTo( uiDialog ),
+ .prependTo( uiDialog );
uiDialogTitlebarClose = $( "<a href='#'></a>" )
.addClass( "ui-dialog-titlebar-close ui-corner-all" )
@@ -132,23 +137,23 @@ $.widget("ui.dialog", {
event.preventDefault();
that.close( event );
})
- .appendTo( uiDialogTitlebar ),
+ .appendTo( uiDialogTitlebar );
- uiDialogTitlebarCloseText = ( this.uiDialogTitlebarCloseText = $( "<span>" ) )
+ ( this.uiDialogTitlebarCloseText = $( "<span>" ) )
.addClass( "ui-icon ui-icon-closethick" )
.text( options.closeText )
- .appendTo( uiDialogTitlebarClose ),
+ .appendTo( uiDialogTitlebarClose );
uiDialogTitle = $( "<span>" )
.uniqueId()
.addClass( "ui-dialog-title" )
.html( title )
- .prependTo( uiDialogTitlebar ),
+ .prependTo( uiDialogTitlebar );
uiDialogButtonPane = ( this.uiDialogButtonPane = $( "<div>" ) )
- .addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" ),
+ .addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" );
- uiButtonSet = ( this.uiButtonSet = $( "<div>" ) )
+ ( this.uiButtonSet = $( "<div>" ) )
.addClass( "ui-dialog-buttonset" )
.appendTo( uiDialogButtonPane );
@@ -350,8 +355,7 @@ $.widget("ui.dialog", {
},
_createButtons: function( buttons ) {
- var uiDialogButtonPane, uiButtonSet,
- that = this,
+ var that = this,
hasButtons = false;
// if we already have a button pane, remove it
View
11 ui/jquery.ui.effect.js
@@ -245,8 +245,7 @@ color.fn = jQuery.extend( color.prototype, {
var inst = this,
type = jQuery.type( red ),
- rgba = this._rgba = [],
- source;
+ rgba = this._rgba = [];
// more than 1 argument specified - assume ( red, green, blue, alpha )
if ( green !== undefined ) {
@@ -427,7 +426,7 @@ color.fn = jQuery.extend( color.prototype, {
rgba.push( ~~( alpha * 255 ) );
}
- return "#" + jQuery.map( rgba, function( v, i ) {
+ return "#" + jQuery.map( rgba, function( v ) {
// default to 0 when nulls exist
v = ( v || 0 ).toString( 16 );
@@ -501,8 +500,7 @@ spaces.hsla.from = function ( hsla ) {
l = hsla[ 2 ],
a = hsla[ 3 ],
q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
- p = 2 * l - q,
- r, g, b;
+ p = 2 * l - q;
return [
Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
@@ -710,7 +708,6 @@ function getElementStyles() {
this.currentStyle,
newStyle = {},
key,
- camelCase,
len;
// webkit enumerates style porperties
@@ -1114,7 +1111,7 @@ function standardSpeed( speed ) {
}
$.fn.extend({
- effect: function( effect, options, speed, callback ) {
+ effect: function() {
var args = _normalizeArguments.apply( this, arguments ),
mode = args.mode,
queue = args.queue,
View
4 ui/jquery.ui.slider.js
@@ -278,7 +278,7 @@ $.widget( "ui.slider", $.ui.mouse, {
return true;
},
- _mouseStart: function( event ) {
+ _mouseStart: function() {
return true;
},
@@ -591,7 +591,7 @@ $.widget( "ui.slider", $.ui.mouse, {
_set = {};
if ( this.options.values && this.options.values.length ) {
- this.handles.each(function( i, j ) {
+ this.handles.each(function( i ) {
valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;
_set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
$( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
View
12 ui/jquery.ui.tabs.js
@@ -45,8 +45,7 @@ $.widget( "ui.tabs", {
},
_create: function() {
- var panel,
- that = this,
+ var that = this,
options = this.options,
active = options.active,
locationHash = location.hash.substring( 1 );
@@ -295,8 +294,7 @@ $.widget( "ui.tabs", {
},
refresh: function() {
- var next,
- options = this.options,
+ var options = this.options,
lis = this.tablist.children( ":has(a[href])" );
// get disabled tabs from class attribute from HTML
@@ -922,7 +920,7 @@ if ( $.uiBackCompat !== false ) {
this._super();
},
- url: function( index, url ){
+ url: function( index ){
this.anchors.eq( index ).removeData( "cache.tabs" );
this._superApply( arguments );
}
@@ -1158,7 +1156,7 @@ if ( $.uiBackCompat !== false ) {
}
},
- _eventHandler: function( event ) {
+ _eventHandler: function() {
this._superApply( arguments );
this.options.selected = this.options.active;
if ( this.options.selected === false ) {
@@ -1254,7 +1252,7 @@ if ( $.uiBackCompat !== false ) {
this._cookie( this.options.active, this.options.cookie );
}
},
- _eventHandler: function( event ) {
+ _eventHandler: function() {
this._superApply( arguments );
if ( this.options.cookie ) {
this._cookie( this.options.active, this.options.cookie );
View
4 ui/jquery.ui.tooltip.js
@@ -284,7 +284,7 @@ $.widget( "ui.tooltip", {
this.close( fakeEvent, true );
}
},
- remove: function( event ) {
+ remove: function() {
this._removeTooltip( tooltip );
}
};
@@ -297,7 +297,7 @@ $.widget( "ui.tooltip", {
this._on( target, events );
},
- close: function( event, force ) {
+ close: function( event ) {
var that = this,
target = $( event ? event.currentTarget : this.element ),
tooltip = this._find( target );
View
2  ui/jquery.ui.widget.js
@@ -200,7 +200,7 @@ $.widget.bridge = function( name, object ) {
};
};
-$.Widget = function( options, element ) {};
+$.Widget = function() {};
$.Widget._childConstructors = [];
$.Widget.prototype = {
Please sign in to comment.
Something went wrong with that request. Please try again.