]> source.dussan.org Git - jquery-ui.git/commitdiff
Datepicker: Updated to check for new or old style effects (see #7103).
authorgnarf <gnarf@gnarf.net>
Fri, 11 Mar 2011 15:26:08 +0000 (09:26 -0600)
committerScott González <scott.gonzalez@gmail.com>
Tue, 15 Mar 2011 13:02:21 +0000 (09:02 -0400)
ui/jquery.ui.datepicker.js

index 8dd9bf3dc75ae16bdc71bc71b6b3671b8036f70f..670955f648eeab8fcdf6b33fcbf02a2e0844fb4e 100644 (file)
@@ -656,7 +656,9 @@ $.extend(Datepicker.prototype, {
                                }
                        };
                        inst.dpDiv.zIndex($(input).zIndex()+1);
-                       if ($.effects && $.effects[showAnim])
+
+                       // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
+                       if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) )
                                inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
                        else
                                inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
@@ -781,7 +783,9 @@ $.extend(Datepicker.prototype, {
                                $.datepicker._tidyDialog(inst);
                                this._curInst = null;
                        };
-                       if ($.effects && $.effects[showAnim])
+
+                       // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
+                       if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) )
                                inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
                        else
                                inst.dpDiv[(showAnim == 'slideDown' ? 'slideUp' :