Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5_fork
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5_fork
Commits
250fdf8a
Commit
250fdf8a
authored
Dec 14, 2021
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: refactor
parent
d29107a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebPage_viewAsWeb.py
...em/portal_skins/erp5_web_renderjs_ui/WebPage_viewAsWeb.py
+4
-3
No files found.
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebPage_viewAsWeb.py
View file @
250fdf8a
...
@@ -30,12 +30,13 @@ web_content = web_page.getTextContent()
...
@@ -30,12 +30,13 @@ 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
(
precache_manifest_content
)
'required_url_list'
:
json
.
dumps
(
getattr
(
web_section
,
web_section
.
getLayoutProperty
(
"configuration_precache_manifest_script"
,
default
=
"WebSection_getPrecacheManifest"
))()
)
})
})
elif
(
portal_type
==
"Web Style"
):
elif
(
portal_type
==
"Web Style"
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment