mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Effects can just be used through the callbacks
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1014 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
f7b89667ac
commit
92088a920b
3 changed files with 1 additions and 12 deletions
|
@ -160,7 +160,6 @@ module ActionView
|
|||
js_options['asynchronous'] = options[:type] != :synchronous
|
||||
js_options['method'] = options[:method] if options[:method]
|
||||
js_options['insertion'] = "Insertion.#{options[:position].to_s.camelize}" if options[:position]
|
||||
js_options['effect'] = "Effect.#{options[:effect].to_s.camelize}" if options[:effect]
|
||||
|
||||
if options[:form]
|
||||
js_options['parameters'] = 'Form.serialize(this)'
|
||||
|
|
|
@ -204,10 +204,6 @@ Ajax.Updater.prototype = (new Ajax.Base()).extend({
|
|||
this.request.transport.responseText);
|
||||
}
|
||||
|
||||
if (this.options.effect) {
|
||||
new this.options.effect(this.container);
|
||||
}
|
||||
|
||||
if (this.onComplete) {
|
||||
setTimeout((function() {this.onComplete(this.request)}).bind(this), 10);
|
||||
}
|
||||
|
|
8
railties/html/javascripts/prototype.js
vendored
8
railties/html/javascripts/prototype.js
vendored
|
@ -197,19 +197,13 @@ Ajax.Updater.prototype = (new Ajax.Base()).extend({
|
|||
},
|
||||
|
||||
updateContent: function() {
|
||||
this.container.innerHTML = this.request.transport.responseText;
|
||||
|
||||
if (this.options.insertion) {
|
||||
if (!this.options.insertion) {
|
||||
this.container.innerHTML = this.request.transport.responseText;
|
||||
} else {
|
||||
new this.options.insertion(this.container,
|
||||
this.request.transport.responseText);
|
||||
}
|
||||
|
||||
if (this.options.effect) {
|
||||
new this.options.effect(this.container);
|
||||
}
|
||||
|
||||
if (this.onComplete) {
|
||||
setTimeout((function() {this.onComplete(this.request)}).bind(this), 10);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue