Permalink
Browse files

fire ajax:complete and ajax:updated events in Ajax.Updater

  • Loading branch information...
1 parent 3e51859 commit 795021dd2db4ee3b9ad08c50bbf326d839413ce2 @juzna committed Jan 13, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/prototype/ajax/updater.js
@@ -100,8 +100,10 @@ Ajax.Updater = Class.create(Ajax.Request, {
options = Object.clone(options);
var onComplete = options.onComplete;
options.onComplete = (function(response, json) {
+ Event.fire(container, 'ajax:complete', { response: response } ); // Fire ajax:complete event
this.updateContent(response.responseText);
if (Object.isFunction(onComplete)) onComplete(response, json);
+ Event.fire(container, 'ajax:updated', { response: response } ); // Fire ajax:updated event
}).bind(this);
$super(url, options);

0 comments on commit 795021d

Please sign in to comment.