[Jifty-commit] r7378 - jifty/trunk/share/web/static/js
Jifty commits
jifty-commit at lists.jifty.org
Thu Aug 13 21:36:19 EDT 2009
Author: sartak
Date: Thu Aug 13 21:36:17 2009
New Revision: 7378
Modified:
jifty/trunk/share/web/static/js/jifty.js
Log:
onSuccess is a closure created in our scope, so we don't need to wrap it
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 Thu Aug 13 21:36:17 2009
@@ -1306,15 +1306,15 @@
// NOTE: Success here doesn't mean the server liked the request, but that
// the HTTP communication succeeded. There still might be errors validating
// fields, with the app connecting to the database, etc.
- var onSuccess = function(responseXML, preload) {
+ var onSuccess = function(responseXML) {
+ if (named_args['preload']) {
+ // XXX: stash responseXML somewhere
+ return;
+ }
// Grab the XML response
var response = responseXML.documentElement;
- if (preload) {
- return;
- }
-
/* var response is an xml , which's content is like:
<response>
<fragment id="__page-region-name">
@@ -1487,6 +1487,7 @@
data: JSON.stringify(request),
contentType: 'text/x-json',
error: onFailure,
+ success: onSuccess,
// Hide the wait message when we're done
complete: function() {
@@ -1495,10 +1496,6 @@
}
},
- success: function(responseXML) {
- onSuccess(responseXML, named_args['preload']);
- },
-
beforeSend: function (request) {
var headers = named_args['headers'];
for (header in headers) {
More information about the Jifty-commit
mailing list