diff --git a/application/Espo/Core/Utils/ClientManager.php b/application/Espo/Core/Utils/ClientManager.php index 793715aac0..32aee81dfa 100644 --- a/application/Espo/Core/Utils/ClientManager.php +++ b/application/Espo/Core/Utils/ClientManager.php @@ -155,6 +155,7 @@ class ClientManager 'linksHtml' => $linksHtml, 'favicon196Path' => $this->getMetadata()->get(['app', 'client', 'favicon196']) ?? 'client/img/favicon196x196.png', 'faviconPath' => $this->getMetadata()->get(['app', 'client', 'favicon']) ?? 'client/img/favicon.ico', + 'ajaxTimeout' => $this->getConfig()->get('ajaxTimeout') ?? 60000, ]; $html = file_get_contents($htmlFilePath); diff --git a/client/src/app.js b/client/src/app.js index 44e60b9cff..ba9ca36f43 100644 --- a/client/src/app.js +++ b/client/src/app.js @@ -93,6 +93,8 @@ define( this.url = options.url || this.url; this.basePath = options.basePath || ''; + this.ajaxTimeout = options.ajaxTimeout || 0; + this.appParams = {}; this.loader = Espo.loader; @@ -644,7 +646,7 @@ define( } }, dataType: 'json', - timeout: 60000, + timeout: this.ajaxTimeout, contentType: 'application/json' }); diff --git a/html/main.html b/html/main.html index 02c928570a..8b0b2ae4cc 100644 --- a/html/main.html +++ b/html/main.html @@ -21,7 +21,8 @@ useCache: {{useCache}}, cacheTimestamp: {{cacheTimestamp}}, basePath: '{{basePath}}', - url: '{{apiUrl}}' + url: '{{apiUrl}}', + ajaxTimeout: {{ajaxTimeout}}, }, function (app) { {{runScript}} });