mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-17 20:11:23 +02:00
Add an optional async parameter to sendRequest() to make simple async calls easier
This commit is contained in:
@@ -66,7 +66,17 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
json_request.prototype.sendRequest = function() {
|
/**
|
||||||
|
* Sends the assembled request to the server
|
||||||
|
* @param {boolean} [async=false] Overrides async provided in constructor to give an easy way to make simple async requests
|
||||||
|
* @returns undefined
|
||||||
|
*/
|
||||||
|
json_request.prototype.sendRequest = function(async) {
|
||||||
|
if(typeof async != undefined)
|
||||||
|
{
|
||||||
|
this.async = async;
|
||||||
|
}
|
||||||
|
|
||||||
// Assemble the complete request
|
// Assemble the complete request
|
||||||
var request_obj = {
|
var request_obj = {
|
||||||
'json_data': this.egw.jsonEncode({
|
'json_data': this.egw.jsonEncode({
|
||||||
|
Reference in New Issue
Block a user