mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Effects: Moved effects to $.effects.effect[] and deprecated use of $.effects[]. Fixes #7103 - Effects: Move effects to $.effects.effect[].
This commit is contained in:
parent
56b7ec134d
commit
d64c9efda5
2
ui/jquery.effects.blind.js
vendored
2
ui/jquery.effects.blind.js
vendored
@ -12,7 +12,7 @@
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.blind = function( o ) {
|
||||
$.effects.effect.blind = function( o ) {
|
||||
|
||||
return this.queue( function() {
|
||||
|
||||
|
2
ui/jquery.effects.bounce.js
vendored
2
ui/jquery.effects.bounce.js
vendored
@ -14,7 +14,7 @@
|
||||
|
||||
var rshowhide = /show|hide/;
|
||||
|
||||
$.effects.bounce = function(o) {
|
||||
$.effects.effect.bounce = function(o) {
|
||||
|
||||
return this.queue(function() {
|
||||
|
||||
|
2
ui/jquery.effects.clip.js
vendored
2
ui/jquery.effects.clip.js
vendored
@ -12,7 +12,7 @@
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.clip = function( o ) {
|
||||
$.effects.effect.clip = function( o ) {
|
||||
|
||||
return this.queue( function() {
|
||||
|
||||
|
33
ui/jquery.effects.core.js
vendored
33
ui/jquery.effects.core.js
vendored
@ -9,7 +9,11 @@
|
||||
*/
|
||||
;jQuery.effects || (function($, undefined) {
|
||||
|
||||
$.effects = {};
|
||||
var backCompat = $.uiBackCompat !== false;
|
||||
|
||||
$.effects = {
|
||||
effect: {}
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
/****************************** COLOR ANIMATIONS ******************************/
|
||||
@ -493,7 +497,11 @@ function standardSpeed( speed ) {
|
||||
}
|
||||
|
||||
// invalid strings - treat as "normal" speed
|
||||
if ( typeof speed === "string" && !$.effects[ speed ] ) {
|
||||
if ( typeof speed === "string" && !$.effects.effect[ speed ] ) {
|
||||
// TODO: remove in 2.0 (#7115)
|
||||
if ( backCompat && $.effects[ speed ] ) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -504,9 +512,12 @@ $.fn.extend({
|
||||
effect: function( effect, options, speed, callback ) {
|
||||
var args = _normalizeArguments.apply( this, arguments ),
|
||||
mode = args.mode,
|
||||
effectMethod = $.effects[ args.effect ];
|
||||
effectMethod = $.effects.effect[ args.effect ],
|
||||
|
||||
if ( $.fx.off || !effectMethod ) {
|
||||
// DEPRECATED: remove in 2.0 (#7115)
|
||||
oldEffectMethod = !effectMethod && backCompat && $.effects[ args.effect ];
|
||||
|
||||
if ( $.fx.off || !( effectMethod || oldEffectMethod ) ) {
|
||||
// delegate to the original method (e.g., .show()) if possible
|
||||
if ( mode ) {
|
||||
return this[ mode ]( args.duration, args.complete );
|
||||
@ -518,7 +529,19 @@ $.fn.extend({
|
||||
});
|
||||
}
|
||||
}
|
||||
return effectMethod.call( this, args );
|
||||
|
||||
// TODO: remove this check in 2.0, effectMethod will always be true
|
||||
if ( effectMethod ) {
|
||||
return effectMethod.call( this, args );
|
||||
} else {
|
||||
// DEPRECATED: remove in 2.0 (#7115)
|
||||
return oldEffectMethod.call(this, {
|
||||
options: args,
|
||||
duration: args.duration,
|
||||
callback: args.complete,
|
||||
mode: args.mode
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
_show: $.fn.show,
|
||||
|
2
ui/jquery.effects.drop.js
vendored
2
ui/jquery.effects.drop.js
vendored
@ -12,7 +12,7 @@
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.drop = function( o ) {
|
||||
$.effects.effect.drop = function( o ) {
|
||||
|
||||
return this.queue( function() {
|
||||
|
||||
|
2
ui/jquery.effects.explode.js
vendored
2
ui/jquery.effects.explode.js
vendored
@ -12,7 +12,7 @@
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.explode = function( o ) {
|
||||
$.effects.effect.explode = function( o ) {
|
||||
|
||||
return this.queue( function( next ) {
|
||||
|
||||
|
2
ui/jquery.effects.fade.js
vendored
2
ui/jquery.effects.fade.js
vendored
@ -12,7 +12,7 @@
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.fade = function( o ) {
|
||||
$.effects.effect.fade = function( o ) {
|
||||
return this.queue( function() {
|
||||
var el = $( this ),
|
||||
mode = $.effects.setMode( el, o.mode || 'hide' );
|
||||
|
2
ui/jquery.effects.fold.js
vendored
2
ui/jquery.effects.fold.js
vendored
@ -12,7 +12,7 @@
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.fold = function( o ) {
|
||||
$.effects.effect.fold = function( o ) {
|
||||
|
||||
return this.queue( function() {
|
||||
|
||||
|
2
ui/jquery.effects.highlight.js
vendored
2
ui/jquery.effects.highlight.js
vendored
@ -12,7 +12,7 @@
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.highlight = function( o ) {
|
||||
$.effects.effect.highlight = function( o ) {
|
||||
return this.queue( function() {
|
||||
var elem = $( this ),
|
||||
props = [ 'backgroundImage', 'backgroundColor', 'opacity' ],
|
||||
|
2
ui/jquery.effects.pulsate.js
vendored
2
ui/jquery.effects.pulsate.js
vendored
@ -12,7 +12,7 @@
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.pulsate = function( o ) {
|
||||
$.effects.effect.pulsate = function( o ) {
|
||||
return this.queue( function() {
|
||||
var elem = $( this ),
|
||||
mode = $.effects.setMode( elem, o.mode || 'show' ),
|
||||
|
6
ui/jquery.effects.scale.js
vendored
6
ui/jquery.effects.scale.js
vendored
@ -12,7 +12,7 @@
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.puff = function( o ) {
|
||||
$.effects.effect.puff = function( o ) {
|
||||
return this.queue( function() {
|
||||
var elem = $( this ),
|
||||
mode = $.effects.setMode( elem, o.mode || 'hide' ),
|
||||
@ -40,7 +40,7 @@ $.effects.puff = function( o ) {
|
||||
});
|
||||
};
|
||||
|
||||
$.effects.scale = function( o ) {
|
||||
$.effects.effect.scale = function( o ) {
|
||||
|
||||
return this.queue( function() {
|
||||
|
||||
@ -92,7 +92,7 @@ $.effects.scale = function( o ) {
|
||||
|
||||
};
|
||||
|
||||
$.effects.size = function( o ) {
|
||||
$.effects.effect.size = function( o ) {
|
||||
|
||||
return this.queue( function() {
|
||||
// Create element
|
||||
|
2
ui/jquery.effects.shake.js
vendored
2
ui/jquery.effects.shake.js
vendored
@ -12,7 +12,7 @@
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.shake = function( o ) {
|
||||
$.effects.effect.shake = function( o ) {
|
||||
|
||||
return this.queue( function() {
|
||||
|
||||
|
2
ui/jquery.effects.slide.js
vendored
2
ui/jquery.effects.slide.js
vendored
@ -12,7 +12,7 @@
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.slide = function( o ) {
|
||||
$.effects.effect.slide = function( o ) {
|
||||
|
||||
return this.queue( function() {
|
||||
|
||||
|
2
ui/jquery.effects.transfer.js
vendored
2
ui/jquery.effects.transfer.js
vendored
@ -12,7 +12,7 @@
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.effects.transfer = function( o ) {
|
||||
$.effects.effect.transfer = function( o ) {
|
||||
|
||||
return this.queue( function() {
|
||||
var elem = $( this ),
|
||||
|
Loading…
Reference in New Issue
Block a user