diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-10-25 09:25:40 -0400 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-10-25 09:29:11 -0400 |
commit | b8e0de2444f38e69ad229f404651c9e331a9ac17 (patch) | |
tree | 3c7df0b91f81832c6ee8886fb8bd4407b8380fd5 /ui | |
parent | 7678b90ae843c2db48b29ed0e933764ef1d4214e (diff) | |
download | jquery-ui-b8e0de2444f38e69ad229f404651c9e331a9ac17.tar.gz jquery-ui-b8e0de2444f38e69ad229f404651c9e331a9ac17.zip |
Effects: Remove deprecated $.effects[]. Fixes #7115 - Effects: Remove support for effects in $.effects[].
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.datepicker.js | 3 | ||||
-rw-r--r-- | ui/jquery.ui.effect.js | 34 | ||||
-rw-r--r-- | ui/jquery.ui.widget.js | 2 |
3 files changed, 7 insertions, 32 deletions
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index 7dacbc7c1..97a45139f 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -693,8 +693,7 @@ $.extend(Datepicker.prototype, { inst.dpDiv.zIndex($(input).zIndex()+1); $.datepicker._datepickerShowing = true; - // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed - if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) + if ( $.effects && $.effects.effect[ showAnim ] ) inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess); else inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess); diff --git a/ui/jquery.ui.effect.js b/ui/jquery.ui.effect.js index 37ca48795..5cd33886f 100644 --- a/ui/jquery.ui.effect.js +++ b/ui/jquery.ui.effect.js @@ -10,9 +10,7 @@ */ ;(jQuery.effects || (function($, undefined) { -var backCompat = $.uiBackCompat !== false, - // prefix used for storing data on .data() - dataSpace = "ui-effects-"; +var dataSpace = "ui-effects-"; $.effects = { effect: {} @@ -1099,15 +1097,7 @@ function standardSpeed( speed ) { } // invalid strings - treat as "normal" speed - if ( typeof speed === "string" && !$.effects.effect[ speed ] ) { - // TODO: remove in 2.0 (#7115) - if ( backCompat && $.effects[ speed ] ) { - return false; - } - return true; - } - - return false; + return typeof speed === "string" && !$.effects.effect[ speed ]; } $.fn.extend({ @@ -1115,12 +1105,9 @@ $.fn.extend({ var args = _normalizeArguments.apply( this, arguments ), mode = args.mode, queue = args.queue, - effectMethod = $.effects.effect[ args.effect ], + effectMethod = $.effects.effect[ args.effect ]; - // DEPRECATED: remove in 2.0 (#7115) - oldEffectMethod = !effectMethod && backCompat && $.effects[ args.effect ]; - - if ( $.fx.off || !( effectMethod || oldEffectMethod ) ) { + if ( $.fx.off || !effectMethod ) { // delegate to the original method (e.g., .show()) if possible if ( mode ) { return this[ mode ]( args.duration, args.complete ); @@ -1156,18 +1143,7 @@ $.fn.extend({ } } - // TODO: remove this check in 2.0, effectMethod will always be true - if ( effectMethod ) { - return queue === false ? this.each( run ) : this.queue( queue || "fx", run ); - } else { - // DEPRECATED: remove in 2.0 (#7115) - return oldEffectMethod.call(this, { - options: args, - duration: args.duration, - callback: args.complete, - mode: args.mode - }); - } + return queue === false ? this.each( run ) : this.queue( queue || "fx", run ); }, _show: $.fn.show, diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index 6e8150be7..00f36fe67 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -491,7 +491,7 @@ $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { if ( options.delay ) { element.delay( options.delay ); } - if ( hasOptions && $.effects && ( $.effects.effect[ effectName ] || $.uiBackCompat !== false && $.effects[ effectName ] ) ) { + if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { element[ method ]( options ); } else if ( effectName !== method && element[ effectName ] ) { element[ effectName ]( options.duration, options.easing, callback ); |