r2607 - Merged r2480 to 1.7.2 (fixes #4473 - effects.core corrupts jQuery toggle functionality)

r2607 - Merged r2480 to 1.7.2 (fixes #4473 - effects.core corrupts jQuery toggle functionality)


Author: rdworth
Date: Tue May 26 03:58:23 2009
New Revision: 2607
Modified:
branches/1.7.2/ (props changed)
branches/1.7.2/tests/visual/accordion/ (props changed)
branches/1.7.2/tests/visual/datepicker/ (props changed)
branches/1.7.2/tests/visual/resizable/ (props changed)
branches/1.7.2/tests/visual/selectable/ (props changed)
branches/1.7.2/tests/visual/slider/ (props changed)
branches/1.7.2/ui/effects.core.js
branches/1.7.2/ui/i18n/ui.datepicker-ro.js (props changed)
branches/1.7.2/ui/i18n/ui.datepicker-sq.js (props changed)
branches/1.7.2/ui/i18n/ui.datepicker-uk.js (props changed)
branches/1.7.2/ui/ui.accordion.js (props changed)
branches/1.7.2/ui/ui.datepicker.js (props changed)
branches/1.7.2/ui/ui.droppable.js (props changed)
branches/1.7.2/ui/ui.resizable.js (props changed)
branches/1.7.2/ui/ui.selectable.js (props changed)
branches/1.7.2/ui/ui.slider.js (props changed)
Log:
Merged r2480 to 1.7.2 (fixes #4473 - effects.core corrupts jQuery toggle
functionality)
Modified: branches/1.7.2/ui/effects.core.js
==============================================================================
--- branches/1.7.2/ui/effects.core.js    (original)
+++ branches/1.7.2/ui/effects.core.js    Tue May 26 03:58:23 2009
@@ -175,9 +175,11 @@
    },
    toggle: function(){
-        if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|
normal|fast)/).test(arguments[0])) || (arguments[0].constructor ==
Function))
+        if(!arguments[0] ||
+            (arguments[0].constructor == Number || (/(slow|normal|
fast)/).test(arguments[0])) ||
+            ($.isFunction(arguments[0]) || typeof arguments[0] == 'boolean')) {
            return this.__toggle.apply(this, arguments);
-        else {
+        } else {
            return this.effect.apply(this,
_normalizeArguments(arguments, 'toggle'));
        }
    },