[Jifty-commit] r6578 - jifty/trunk/share/web/static/js

Jifty commits jifty-commit at lists.jifty.org
Fri Mar 13 11:51:12 EDT 2009


Author: c9s
Date: Fri Mar 13 11:51:11 2009
New Revision: 6578

Modified:
   jifty/trunk/share/web/static/js/jifty.js

Log:
 - trigger 'fragment_updates' event after region updated.


Modified: jifty/trunk/share/web/static/js/jifty.js
==============================================================================
--- jifty/trunk/share/web/static/js/jifty.js	(original)
+++ jifty/trunk/share/web/static/js/jifty.js	Fri Mar 13 11:51:11 2009
@@ -3,7 +3,10 @@
 
 Jifty.Update = {
     response_hooks: [],
-    handler_hooks: []
+    handler_hooks: [],
+    addHook:function(f){
+        this.response_hooks.push(f);
+    }
 };
 
 Jifty.$ = function(id) {
@@ -1304,17 +1307,24 @@
                 continue;
             }
 
+
             // Apply the fragment update to the page
             try {
                 apply_fragment_updates(response_fragment, f);
             } catch (e) { alert(e) }
 
-            jQuery.each(Jifty.Update.response_hooks,
-                        function() { this(response_fragment, f) });
+            // f
+            jQuery.each(Jifty.Update.response_hooks, function(i) { 
+                    this(response_fragment, f);
+            });
+
+            jQuery('.fragment_updates_attached').trigger('fragment_updates',f);
         }
 
+
         jQuery.each(hooks, function() { this.process_update() } );
 
+
         // Look through the response again
         walk_node(response, { 
 


More information about the Jifty-commit mailing list