diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-02-14 19:28:05 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-02-14 19:28:05 +0000 |
commit | 6f3c5f67870a625b8be4de6e34e8d0d2f5d2b5e3 (patch) | |
tree | 3da8d75101aabe3c1d90d0582505ec1480c9d885 /railties/lib/generators/rails/app/templates/public/javascripts/effects.js | |
parent | 77bf78b3b78a41d4f2f6e733f5c9c00608c0adba (diff) | |
parent | a1b60696e2b13cbe94d748444cc0da37b190fbb8 (diff) | |
download | rails-6f3c5f67870a625b8be4de6e34e8d0d2f5d2b5e3.tar.gz rails-6f3c5f67870a625b8be4de6e34e8d0d2f5d2b5e3.tar.bz2 rails-6f3c5f67870a625b8be4de6e34e8d0d2f5d2b5e3.zip |
Merge remote branch 'mainstream/master'
Conflicts:
railties/README
railties/guides/source/active_support_core_extensions.textile
railties/guides/source/getting_started.textile
railties/lib/generators/rails/app/templates/README
Diffstat (limited to 'railties/lib/generators/rails/app/templates/public/javascripts/effects.js')
-rw-r--r-- | railties/lib/generators/rails/app/templates/public/javascripts/effects.js | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/railties/lib/generators/rails/app/templates/public/javascripts/effects.js b/railties/lib/generators/rails/app/templates/public/javascripts/effects.js index 5a639d2dea..066ee5909c 100644 --- a/railties/lib/generators/rails/app/templates/public/javascripts/effects.js +++ b/railties/lib/generators/rails/app/templates/public/javascripts/effects.js @@ -1,4 +1,6 @@ -// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// script.aculo.us effects.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009 + +// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) // Contributors: // Justin Palmer (http://encytemedia.com/) // Mark Pilgrim (http://diveintomark.org/) @@ -145,14 +147,13 @@ var Effect = { 'blind': ['BlindDown','BlindUp'], 'appear': ['Appear','Fade'] }, - toggle: function(element, effect) { + toggle: function(element, effect, options) { element = $(element); - effect = (effect || 'appear').toLowerCase(); - var options = Object.extend({ + effect = (effect || 'appear').toLowerCase(); + + return Effect[ Effect.PAIRS[ effect ][ element.visible() ? 1 : 0 ] ](element, Object.extend({ queue: { position:'end', scope:(element.id || 'global'), limit: 1 } - }, arguments[2] || { }); - Effect[element.visible() ? - Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options); + }, options || {})); } }; @@ -228,12 +229,6 @@ Effect.Queue = Effect.Queues.get('global'); Effect.Base = Class.create({ position: null, start: function(options) { - function codeForEvent(options,eventName){ - return ( - (options[eventName+'Internal'] ? 'this.options.'+eventName+'Internal(this);' : '') + - (options[eventName] ? 'this.options.'+eventName+'(this);' : '') - ); - } if (options && options.transition === false) options.transition = Effect.Transitions.linear; this.options = Object.extend(Object.extend({ },Effect.DefaultOptions), options || { }); this.currentFrame = 0; |