[Jifty-commit] r7415 - jifty/trunk/share/web/static/js
Jifty commits
jifty-commit at lists.jifty.org
Fri Aug 21 05:19:55 EDT 2009
Author: sartak
Date: Fri Aug 21 05:19:55 2009
New Revision: 7415
Modified:
jifty/trunk/share/web/static/js/jifty.js
Log:
submit actions when we bail out and instead wait for a preloading region
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 Aug 21 05:19:55 2009
@@ -1491,12 +1491,7 @@
})
}
- // Are we requesting a region we have preloaded? If so, use the response
- // from the cache instead of making a new request. Snappy!
- if (Jifty.preloaded_regions[ named_args['preload_key'] ]) {
- var faux_response = Jifty.preloaded_regions[ named_args['preload_key'] ];
- delete Jifty.preloaded_regions[ named_args['preload_key'] ];
-
+ var submitActions = function () {
// If we have to submit actions, then it gets more complicated
// We submit a request with the action and block preloading until
// the action has returned
@@ -1518,6 +1513,15 @@
complete: Jifty.preload_action_respond,
});
}
+ };
+
+ // Are we requesting a region we have preloaded? If so, use the response
+ // from the cache instead of making a new request. Snappy!
+ if (Jifty.preloaded_regions[ named_args['preload_key'] ]) {
+ var faux_response = Jifty.preloaded_regions[ named_args['preload_key'] ];
+ delete Jifty.preloaded_regions[ named_args['preload_key'] ];
+
+ submitActions();
onSuccess(faux_response);
return false;
@@ -1529,6 +1533,7 @@
// process it.
if (Jifty.preloading_regions[ named_args['preload_key'] ]) {
Jifty.want_preloaded_regions[ named_args['preload_key'] ] = 1;
+ submitActions();
return false;
}
More information about the Jifty-commit
mailing list