mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
Add an optional async parameter to sendRequest() to make simple async calls easier
This commit is contained in:
parent
36cfd70daa
commit
958167b0f7
@ -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
|
||||
var request_obj = {
|
||||
'json_data': this.egw.jsonEncode({
|
||||
|
Loading…
Reference in New Issue
Block a user