aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfelix <felix8a@gmail.com>2012-03-29 14:59:19 -0700
committerScott González <scott.gonzalez@gmail.com>2012-03-29 18:12:47 -0400
commit6fb584e7007bb7dc539d9c7266d17833c52a7830 (patch)
tree49363a28343e96046ca43dbedaae9cdf22df805c
parentc45911c98df6af6bb679fe256ae23bab4e7f036f (diff)
downloadjquery-ui-6fb584e7007bb7dc539d9c7266d17833c52a7830.tar.gz
jquery-ui-6fb584e7007bb7dc539d9c7266d17833c52a7830.zip
Fixes #6979 - Several components are leaking variables into the global scope.
-rw-r--r--ui/jquery.effects.core.js2
-rw-r--r--ui/jquery.effects.pulsate.js4
-rw-r--r--ui/jquery.effects.scale.js2
-rw-r--r--ui/jquery.ui.autocomplete.js2
-rw-r--r--ui/jquery.ui.tabs.js1
5 files changed, 5 insertions, 6 deletions
diff --git a/ui/jquery.effects.core.js b/ui/jquery.effects.core.js
index 27bbe7c31..b3f99a534 100644
--- a/ui/jquery.effects.core.js
+++ b/ui/jquery.effects.core.js
@@ -419,7 +419,7 @@ $.extend($.effects, {
setTransition: function(element, list, factor, value) {
value = value || {};
$.each(list, function(i, x){
- unit = element.cssUnit(x);
+ var unit = element.cssUnit(x);
if (unit[0] > 0) value[x] = unit[0] * factor + unit[1];
});
return value;
diff --git a/ui/jquery.effects.pulsate.js b/ui/jquery.effects.pulsate.js
index c8a9f4e7c..8ba93df89 100644
--- a/ui/jquery.effects.pulsate.js
+++ b/ui/jquery.effects.pulsate.js
@@ -15,8 +15,8 @@
$.effects.pulsate = function(o) {
return this.queue(function() {
var elem = $(this),
- mode = $.effects.setMode(elem, o.options.mode || 'show');
- times = ((o.options.times || 5) * 2) - 1;
+ mode = $.effects.setMode(elem, o.options.mode || 'show'),
+ times = ((o.options.times || 5) * 2) - 1,
duration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2,
isVisible = elem.is(':visible'),
animateTo = 0;
diff --git a/ui/jquery.effects.scale.js b/ui/jquery.effects.scale.js
index ef4a9654e..aa3e09d02 100644
--- a/ui/jquery.effects.scale.js
+++ b/ui/jquery.effects.scale.js
@@ -140,7 +140,7 @@ $.effects.size = function(o) {
hProps = hProps.concat(['marginLeft','marginRight']); // Add margins
props2 = props.concat(vProps).concat(hProps); // Concat
el.find("*[width]").each(function(){
- child = $(this);
+ var child = $(this);
if (restore) $.effects.save(child, props2);
var c_original = {height: child.height(), width: child.width()}; // Save original
child.from = {height: c_original.height * factor.from.y, width: c_original.width * factor.from.x};
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js
index 60358f824..c2dc88984 100644
--- a/ui/jquery.ui.autocomplete.js
+++ b/ui/jquery.ui.autocomplete.js
@@ -594,7 +594,7 @@ $.widget("ui.menu", {
}
var base = this.active.offset().top,
- height = this.element.height();
+ height = this.element.height(),
result = this.element.children(".ui-menu-item").filter(function() {
var close = $(this).offset().top - base + height - $(this).height();
// TODO improve approximation
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js
index 5bb544889..3fd6bef77 100644
--- a/ui/jquery.ui.tabs.js
+++ b/ui/jquery.ui.tabs.js
@@ -733,7 +733,6 @@ $.extend( $.ui.tabs.prototype, {
}
}
: function( e ) {
- t = o.selected;
rotate();
});