[IMP] web corelib: adding timeout option to the rpc api
bzr revid: fva@openerp.com-20130328153951-om7hrs5l10oc0vm2
This commit is contained in:
parent
ab154e8cbc
commit
703039f7c6
|
@ -1011,6 +1011,9 @@ instance.web.JsonRPC = instance.web.Class.extend(instance.web.PropertiesMixin, {
|
||||||
var deferred = $.Deferred();
|
var deferred = $.Deferred();
|
||||||
if (! options.shadow)
|
if (! options.shadow)
|
||||||
this.trigger('request', url, payload);
|
this.trigger('request', url, payload);
|
||||||
|
|
||||||
|
if (options.timeout)
|
||||||
|
url.timeout = options.timeout;
|
||||||
|
|
||||||
this.rpc_function(url, payload).then(
|
this.rpc_function(url, payload).then(
|
||||||
function (response, textStatus, jqXHR) {
|
function (response, textStatus, jqXHR) {
|
||||||
|
|
Loading…
Reference in New Issue