r2063 - trunk/ui
r2063 - trunk/ui
Author: paul.bakaus
Date: Tue Feb 10 05:11:34 2009
New Revision: 2063
Modified:
trunk/ui/effects.explode.js
trunk/ui/effects.fold.js
trunk/ui/effects.scale.js
trunk/ui/effects.transfer.js
trunk/ui/ui.accordion.js
trunk/ui/ui.resizable.js
trunk/ui/ui.tabs.js
Log:
all: fixed jslint warnings
Modified: trunk/ui/effects.explode.js
==============================================================================
--- trunk/ui/effects.explode.js (original)
+++ trunk/ui/effects.explode.js Tue Feb 10 05:11:34 2009
@@ -24,8 +24,8 @@
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);
Modified: trunk/ui/effects.fold.js
==============================================================================
--- trunk/ui/effects.fold.js (original)
+++ trunk/ui/effects.fold.js Tue Feb 10 05:11:34 2009
@@ -32,7 +32,7 @@
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
Modified: trunk/ui/effects.scale.js
==============================================================================
--- trunk/ui/effects.scale.js (original)
+++ trunk/ui/effects.scale.js Tue Feb 10 05:11:34 2009
@@ -22,7 +22,7 @@
// 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 @@
// 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
Modified: trunk/ui/effects.transfer.js
==============================================================================
--- trunk/ui/effects.transfer.js (original)
+++ trunk/ui/effects.transfer.js Tue Feb 10 05:11:34 2009
@@ -31,8 +31,8 @@
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 @@
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
Modified: trunk/ui/ui.accordion.js
==============================================================================
--- trunk/ui/ui.accordion.js (original)
+++ trunk/ui/ui.accordion.js Tue Feb 10 05:11:34 2009
@@ -423,7 +423,7 @@
// 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';
Modified: trunk/ui/ui.resizable.js
==============================================================================
--- trunk/ui/ui.resizable.js (original)
+++ trunk/ui/ui.resizable.js Tue Feb 10 05:11:34 2009
@@ -350,7 +350,7 @@
_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,
Modified: trunk/ui/ui.tabs.js
==============================================================================
--- trunk/ui/ui.tabs.js (original)
+++ trunk/ui/ui.tabs.js Tue Feb 10 05:11:34 2009
@@ -409,7 +409,7 @@
}
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 @@
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();