ajaxTimeout param

This commit is contained in:
Yuri Kuznetsov
2020-03-11 15:12:33 +02:00
parent e93860101c
commit bbfe3c7366
3 changed files with 6 additions and 2 deletions

View File

@@ -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);

View File

@@ -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'
});

View File

@@ -21,7 +21,8 @@
useCache: {{useCache}},
cacheTimestamp: {{cacheTimestamp}},
basePath: '{{basePath}}',
url: '{{apiUrl}}'
url: '{{apiUrl}}',
ajaxTimeout: {{ajaxTimeout}},
}, function (app) {
{{runScript}}
});