mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 06:56:05 +00:00
useCacheInDeveloperMode
This commit is contained in:
@@ -86,7 +86,9 @@ class ClientManager
|
||||
$htmlFilePath = $this->mainHtmlFilePath;
|
||||
}
|
||||
|
||||
if ($this->getConfig()->get('isDeveloperMode')) {
|
||||
$isDeveloperMode = $this->getConfig()->get('isDeveloperMode');
|
||||
|
||||
if ($isDeveloperMode) {
|
||||
if (file_exists('frontend/' . $htmlFilePath)) {
|
||||
$htmlFilePath = 'frontend/' . $htmlFilePath;
|
||||
}
|
||||
@@ -102,6 +104,9 @@ class ClientManager
|
||||
$html = str_replace('{{stylesheet}}', $this->getThemeManager()->getStylesheet(), $html);
|
||||
$html = str_replace('{{runScript}}', $runScript , $html);
|
||||
$html = str_replace('{{basePath}}', $this->basePath , $html);
|
||||
if ($isDeveloperMode) {
|
||||
$html = str_replace('{{useCacheInDeveloperMode}}', $this->getConfig()->get('useCacheInDeveloperMode') ? 'true' : 'false', $html);
|
||||
}
|
||||
|
||||
echo $html;
|
||||
exit;
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
$(function () {
|
||||
Espo.require('app', function (App) {
|
||||
var app = new App({
|
||||
useCache: false,
|
||||
useCache: {{useCacheInDeveloperMode}},
|
||||
cacheTimestamp: {{cacheTimestamp}},
|
||||
url: 'api/v1',
|
||||
basePath: '{{basePath}}'
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
Espo.require('app-portal', function (App) {
|
||||
var app = new App({
|
||||
id: '{{portalId}}',
|
||||
useCache: false,
|
||||
useCache: {{useCacheInDeveloperMode}},
|
||||
cacheTimestamp: {{cacheTimestamp}},
|
||||
url: 'api/v1/portal-access/{{portalId}}',
|
||||
basePath: '{{basePath}}'
|
||||
|
||||
Reference in New Issue
Block a user