Fix keep-alive interval reset on AJAX request

pull/53/head
Aleksander Machniak 12 years ago
parent a84efc689d
commit a2b6383204

@ -6128,14 +6128,14 @@ function rcube_webmail()
// send request // send request
this.log('HTTP GET: ' + url); this.log('HTTP GET: ' + url);
// reset keep-alive interval
this.start_keepalive();
return $.ajax({ return $.ajax({
type: 'GET', url: url, data: { _unlock:(lock?lock:0) }, dataType: 'json', type: 'GET', url: url, data: { _unlock:(lock?lock:0) }, dataType: 'json',
success: function(data){ ref.http_response(data); }, success: function(data){ ref.http_response(data); },
error: function(o, status, err) { ref.http_error(o, status, err, lock, action); } error: function(o, status, err) { ref.http_error(o, status, err, lock, action); }
}); });
// reset keep-alive interval
this.start_keepalive();
}; };
// send a http POST request to the server // send a http POST request to the server
@ -6163,14 +6163,14 @@ function rcube_webmail()
// send request // send request
this.log('HTTP POST: ' + url); this.log('HTTP POST: ' + url);
// reset keep-alive interval
this.start_keepalive();
return $.ajax({ return $.ajax({
type: 'POST', url: url, data: postdata, dataType: 'json', type: 'POST', url: url, data: postdata, dataType: 'json',
success: function(data){ ref.http_response(data); }, success: function(data){ ref.http_response(data); },
error: function(o, status, err) { ref.http_error(o, status, err, lock, action); } error: function(o, status, err) { ref.http_error(o, status, err, lock, action); }
}); });
// reset keep-alive interval
this.start_keepalive();
}; };
// aborts ajax request // aborts ajax request

Loading…
Cancel
Save