Datepicker: Updated to check for new or old style effects (see #7103).

This commit is contained in:
gnarf 2011-03-11 09:26:08 -06:00 committed by Scott González
parent d64c9efda5
commit ac0cc2fac5

View File

@ -656,7 +656,9 @@ $.extend(Datepicker.prototype, {
} }
}; };
inst.dpDiv.zIndex($(input).zIndex()+1); 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); inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
else else
inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess); inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
@ -781,7 +783,9 @@ $.extend(Datepicker.prototype, {
$.datepicker._tidyDialog(inst); $.datepicker._tidyDialog(inst);
this._curInst = null; 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); inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
else else
inst.dpDiv[(showAnim == 'slideDown' ? 'slideUp' : inst.dpDiv[(showAnim == 'slideDown' ? 'slideUp' :