Commit ed67c973 authored by Roque's avatar Roque

erp5_web_renderjs_ui: make renderjs and (new service worker) appstore compatible

parent 172d416c
...@@ -30,10 +30,12 @@ web_content = web_page.getTextContent() ...@@ -30,10 +30,12 @@ web_content = web_page.getTextContent()
if (portal_type == "Web Script"): if (portal_type == "Web Script"):
response.setHeader('Content-Type', 'application/javascript; charset=utf-8') response.setHeader('Content-Type', 'application/javascript; charset=utf-8')
if web_page.getTextContentSubstitutionMappingMethodId(): if web_page.getTextContentSubstitutionMappingMethodId():
precache_manifest = web_section.getLayoutProperty("configuration_precache_manifest_script", default="WebSection_getPrecacheManifest")
precache_manifest_content = getattr(web_section, precache_manifest)()
web_content = web_page.TextDocument_substituteTextContent(web_content, mapping_dict={ web_content = web_page.TextDocument_substituteTextContent(web_content, mapping_dict={
'modification_date': modification_date_string, 'modification_date': modification_date_string,
# Make JSLint happy for the service worker code # Make JSLint happy for the service worker code
'required_url_list': json.dumps(web_section.WebSection_getPrecacheManifest()) 'required_url_list': json.dumps(precache_manifest_content)
}) })
elif (portal_type == "Web Style"): elif (portal_type == "Web Style"):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment