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