aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2012-10-23 09:36:42 -0500
committerCorey Frang <gnarf@gnarf.net>2012-10-23 09:37:46 -0500
commite1230997aa14dae6f35326c8ba20bfe2428507c2 (patch)
treef00984f5fbbf12f175c0994c497513a2d8e8ee26 /ui
parent7af1ec727bcca8367e804cea77b9dd238b1c0d69 (diff)
downloadjquery-ui-e1230997aa14dae6f35326c8ba20bfe2428507c2.tar.gz
jquery-ui-e1230997aa14dae6f35326c8ba20bfe2428507c2.zip
Build: Enable "unused" option in jshint - Remove unused variables from codebase. - Closes gh-788
Squashed commit of the following: commit 7f19f92c646f180bc067bb24123175251a64a9d6 Author: Mike Sherov <mike.sherov@gmail.com> Date: Tue Oct 23 10:34:28 2012 -0400 put back in fake args for signatures that we want to keep commit 257505a9e69da0c53e3a989dab87a13112045a29 Author: Mike Sherov <mike.sherov@gmail.com> Date: Tue Oct 23 08:10:20 2012 -0400 changes per @scott_gonzalez commit 12725480cb58e70865e5aa6e735009b6b035c8f3 Author: Mike Sherov <mike.sherov@gmail.com> Date: Mon Oct 22 22:54:05 2012 -0400 clean up unused vars in ui directory commit 563595e7aee5d4a5c096b2d1de655abdf920aacd Author: Mike Sherov <mike.sherov@gmail.com> Date: Mon Oct 22 22:37:42 2012 -0400 clean up unused vars in grunt and tests
Diffstat (limited to 'ui')
-rw-r--r--ui/.jshintrc1
-rw-r--r--ui/jquery.ui.accordion.js2
-rw-r--r--ui/jquery.ui.autocomplete.js4
-rw-r--r--ui/jquery.ui.dialog.js28
-rw-r--r--ui/jquery.ui.effect.js11
-rw-r--r--ui/jquery.ui.slider.js4
-rw-r--r--ui/jquery.ui.tabs.js12
-rw-r--r--ui/jquery.ui.tooltip.js4
-rw-r--r--ui/jquery.ui.widget.js2
9 files changed, 34 insertions, 34 deletions
diff --git a/ui/.jshintrc b/ui/.jshintrc
index 26b808774..edf09721b 100644
--- a/ui/.jshintrc
+++ b/ui/.jshintrc
@@ -10,6 +10,7 @@
"onevar": true,
"trailing": true,
"undef": true,
+ "unused": true,
"predef": [
"Globalize"
]
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js
index a23d5e66d..108647419 100644
--- a/ui/jquery.ui.accordion.js
+++ b/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();
}
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js
index aec12bf8f..7bacca006 100644
--- a/ui/jquery.ui.autocomplete.js
+++ b/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 );
},
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js
index e234464ad..f2e3f945f 100644
--- a/ui/jquery.ui.dialog.js
+++ b/ui/jquery.ui.dialog.js
@@ -88,6 +88,11 @@ $.widget("ui.dialog", {
options = this.options,
title = options.title || "&#160;",
+ 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
diff --git a/ui/jquery.ui.effect.js b/ui/jquery.ui.effect.js
index 8d875746e..37ca48795 100644
--- a/ui/jquery.ui.effect.js
+++ b/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( /* effect, options, speed, callback */ ) {
var args = _normalizeArguments.apply( this, arguments ),
mode = args.mode,
queue = args.queue,
diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js
index eb0f7fc15..18f7113d4 100644
--- a/ui/jquery.ui.slider.js
+++ b/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 );
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js
index 05456374d..0d920c3a1 100644
--- a/ui/jquery.ui.tabs.js
+++ b/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 );
diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js
index 4a17f1f20..43788a082 100644
--- a/ui/jquery.ui.tooltip.js
+++ b/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 );
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js
index 96cc6071c..59fd81b9e 100644
--- a/ui/jquery.ui.widget.js
+++ b/ui/jquery.ui.widget.js
@@ -200,7 +200,7 @@ $.widget.bridge = function( name, object ) {
};
};
-$.Widget = function( options, element ) {};
+$.Widget = function( /* options, element */ ) {};
$.Widget._childConstructors = [];
$.Widget.prototype = {