From 51c338b9edc14fe5b05138f3fc4093c4459c30ea Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Tue, 10 Feb 2009 13:11:34 +0000 Subject: [PATCH] all: fixed jslint warnings --- ui/effects.explode.js | 4 ++-- ui/effects.fold.js | 2 +- ui/effects.scale.js | 4 ++-- ui/effects.transfer.js | 8 ++++---- ui/ui.accordion.js | 2 +- ui/ui.resizable.js | 2 +- ui/ui.tabs.js | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ui/effects.explode.js b/ui/effects.explode.js index 0578ec51b..6d43ae4fd 100644 --- a/ui/effects.explode.js +++ b/ui/effects.explode.js @@ -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); diff --git a/ui/effects.fold.js b/ui/effects.fold.js index d073362c4..a5e9bd7ae 100644 --- a/ui/effects.fold.js +++ b/ui/effects.fold.js @@ -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 diff --git a/ui/effects.scale.js b/ui/effects.scale.js index e6309fd6c..f03de1ad1 100644 --- a/ui/effects.scale.js +++ b/ui/effects.scale.js @@ -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 diff --git a/ui/effects.transfer.js b/ui/effects.transfer.js index 7c535da0b..09142bdad 100644 --- a/ui/effects.transfer.js +++ b/ui/effects.transfer.js @@ -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 diff --git a/ui/ui.accordion.js b/ui/ui.accordion.js index 679f7a017..4da135f71 100644 --- a/ui/ui.accordion.js +++ b/ui/ui.accordion.js @@ -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'; diff --git a/ui/ui.resizable.js b/ui/ui.resizable.js index 971808e98..a0503c456 100644 --- a/ui/ui.resizable.js +++ b/ui/ui.resizable.js @@ -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, diff --git a/ui/ui.tabs.js b/ui/ui.tabs.js index 94fc4b7b1..0938a9204 100644 --- a/ui/ui.tabs.js +++ b/ui/ui.tabs.js @@ -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(); -- 2.39.5