mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-10-05 01:44:18 +00:00
all: fixed jslint warnings
This commit is contained in:
parent
2e0f967680
commit
51c338b9ed
@ -24,8 +24,8 @@ $.effects.explode = function(o) {
|
||||
var offset = el.offset();
|
||||
|
||||
//Substract the margins - not fixing the problem yet.
|
||||
offset.top -= parseInt(el.css("marginTop")) || 0;
|
||||
offset.left -= parseInt(el.css("marginLeft")) || 0;
|
||||
offset.top -= parseInt(el.css("marginTop"),10) || 0;
|
||||
offset.left -= parseInt(el.css("marginLeft"),10) || 0;
|
||||
|
||||
var width = el.outerWidth(true);
|
||||
var height = el.outerHeight(true);
|
||||
|
@ -32,7 +32,7 @@ $.effects.fold = function(o) {
|
||||
var ref = widthFirst ? ['width', 'height'] : ['height', 'width'];
|
||||
var distance = widthFirst ? [wrapper.width(), wrapper.height()] : [wrapper.height(), wrapper.width()];
|
||||
var percent = /([0-9]+)%/.exec(size);
|
||||
if(percent) size = parseInt(percent[1]) / 100 * distance[mode == 'hide' ? 0 : 1];
|
||||
if(percent) size = parseInt(percent[1],10) / 100 * distance[mode == 'hide' ? 0 : 1];
|
||||
if(mode == 'show') wrapper.css(horizFirst ? {height: 0, width: size} : {height: size, width: 0}); // Shift
|
||||
|
||||
// Animation
|
||||
|
@ -22,7 +22,7 @@ $.effects.puff = function(o) {
|
||||
// Set options
|
||||
var options = $.extend(true, {}, o.options);
|
||||
var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
|
||||
var percent = parseInt(o.options.percent) || 150; // Set default puff percent
|
||||
var percent = parseInt(o.options.percent,10) || 150; // Set default puff percent
|
||||
options.fade = true; // It's not a puff if it doesn't fade! :)
|
||||
var original = {height: el.height(), width: el.width()}; // Save original
|
||||
|
||||
@ -52,7 +52,7 @@ $.effects.scale = function(o) {
|
||||
// Set options
|
||||
var options = $.extend(true, {}, o.options);
|
||||
var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
|
||||
var percent = parseInt(o.options.percent) || (parseInt(o.options.percent) == 0 ? 0 : (mode == 'hide' ? 0 : 100)); // Set default scaling percent
|
||||
var percent = parseInt(o.options.percent,10) || (parseInt(o.options.percent,10) == 0 ? 0 : (mode == 'hide' ? 0 : 100)); // Set default scaling percent
|
||||
var direction = o.options.direction || 'both'; // Set default axis
|
||||
var origin = o.options.origin; // The origin of the scaling
|
||||
if (mode != 'effect') { // Set default origin and restore for show/hide
|
||||
|
@ -31,8 +31,8 @@ $.effects.transfer = function(o) {
|
||||
transfer.css({
|
||||
top: position.top,
|
||||
left: position.left,
|
||||
height: el.outerHeight() - parseInt(transfer.css('borderTopWidth')) - parseInt(transfer.css('borderBottomWidth')),
|
||||
width: el.outerWidth() - parseInt(transfer.css('borderLeftWidth')) - parseInt(transfer.css('borderRightWidth')),
|
||||
height: el.outerHeight() - parseInt(transfer.css('borderTopWidth'),10) - parseInt(transfer.css('borderBottomWidth'),10),
|
||||
width: el.outerWidth() - parseInt(transfer.css('borderLeftWidth'),10) - parseInt(transfer.css('borderRightWidth'),10),
|
||||
position: 'absolute'
|
||||
});
|
||||
|
||||
@ -41,8 +41,8 @@ $.effects.transfer = function(o) {
|
||||
animation = {
|
||||
top: position.top,
|
||||
left: position.left,
|
||||
height: target.outerHeight() - parseInt(transfer.css('borderTopWidth')) - parseInt(transfer.css('borderBottomWidth')),
|
||||
width: target.outerWidth() - parseInt(transfer.css('borderLeftWidth')) - parseInt(transfer.css('borderRightWidth'))
|
||||
height: target.outerHeight() - parseInt(transfer.css('borderTopWidth'),10) - parseInt(transfer.css('borderBottomWidth'),10),
|
||||
width: target.outerWidth() - parseInt(transfer.css('borderLeftWidth'),10) - parseInt(transfer.css('borderRightWidth'),10)
|
||||
};
|
||||
|
||||
// Animate
|
||||
|
@ -423,7 +423,7 @@ $.extend($.ui.accordion, {
|
||||
// fix width before calculating height of hidden element
|
||||
var s = options.toShow;
|
||||
originalWidth = s[0].style.width;
|
||||
s.width( parseInt(s.parent().width()) - parseInt(s.css("paddingLeft")) - parseInt(s.css("paddingRight")) - parseInt(s.css("borderLeftWidth")) - parseInt(s.css("borderRightWidth")) );
|
||||
s.width( parseInt(s.parent().width(),10) - parseInt(s.css("paddingLeft"),10) - parseInt(s.css("paddingRight"),10) - parseInt(s.css("borderLeftWidth"),10) - parseInt(s.css("borderRightWidth"),10) );
|
||||
|
||||
$.each(fxAttrs, function(i, prop) {
|
||||
hideProps[prop] = 'hide';
|
||||
|
@ -350,7 +350,7 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, {
|
||||
_respectSize: function(data, event) {
|
||||
|
||||
var isNumber = function(value) {
|
||||
return !isNaN(parseInt(value, 10))
|
||||
return !isNaN(parseInt(value, 10));
|
||||
};
|
||||
|
||||
var el = this.helper, o = this.options, pRatio = this._aspectRatio || event.shiftKey, a = this.axis,
|
||||
|
@ -409,7 +409,7 @@ $.widget("ui.tabs", {
|
||||
}
|
||||
|
||||
o.disabled = $.map(o.disabled,
|
||||
function(n, i) { return n >= index ? ++n : n });
|
||||
function(n, i) { return n >= index ? ++n : n; });
|
||||
|
||||
this._tabify();
|
||||
|
||||
@ -437,7 +437,7 @@ $.widget("ui.tabs", {
|
||||
this.select(index + (index + 1 < this.$tabs.length ? 1 : -1));
|
||||
|
||||
o.disabled = $.map($.grep(o.disabled, function(n, i) { return n != index; }),
|
||||
function(n, i) { return n >= index ? --n : n });
|
||||
function(n, i) { return n >= index ? --n : n; });
|
||||
|
||||
this._tabify();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user