Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
erp5
Commits
1456d6a7
Commit
1456d6a7
authored
May 06, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Allow to configure a global wallpaper
parent
cfbc621b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
127 additions
and
3 deletions
+127
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_html.html
...teItem/web_page_module/rjs_gadget_erp5_launcher_html.html
+1
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_html.xml
...ateItem/web_page_module/rjs_gadget_erp5_launcher_html.xml
+2
-2
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/WebSection_viewRenderJSPreference.xml
...s/erp5_web_renderjs/WebSection_viewRenderJSPreference.xml
+1
-0
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/WebSection_viewRenderJSPreference/my_configuration_wallpaper_url.xml
...viewRenderJSPreference/my_configuration_wallpaper_url.xml
+96
-0
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSection_renderDefaultPageAsGadget.py
...5_web_renderjs_ui/WebSection_renderDefaultPageAsGadget.py
+27
-1
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_html.html
View file @
1456d6a7
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
<meta
name=
"description"
content=
"${site_description}"
>
<meta
name=
"description"
content=
"${site_description}"
>
<meta
name=
"keywords"
content=
"${site_keywords}"
>
<meta
name=
"keywords"
content=
"${site_keywords}"
>
<link
rel=
"stylesheet"
href=
"${stylesheet_url}"
>
<link
rel=
"stylesheet"
href=
"${stylesheet_url}"
>
${extra_css_full_link_tag}
${webapp_manifest_full_link_tag}
${webapp_manifest_full_link_tag}
<script
data-renderjs-configuration=
"application_title"
type=
"text/x-renderjs-configuration"
>
$
{
application_title
}
</script>
<script
data-renderjs-configuration=
"application_title"
type=
"text/x-renderjs-configuration"
>
$
{
application_title
}
</script>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_html.xml
View file @
1456d6a7
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
97
1.11932.10080.1233
9
</string>
</value>
<value>
<string>
97
5.34836.41174.4194
9
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
40475647.75
</float>
<float>
15
57147532.09
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/WebSection_viewRenderJSPreference.xml
View file @
1456d6a7
...
@@ -89,6 +89,7 @@
...
@@ -89,6 +89,7 @@
<string>
my_configuration_frontpage_gadget_url
</string>
<string>
my_configuration_frontpage_gadget_url
</string>
<string>
my_configuration_default_jio_document_page_gadget_url
</string>
<string>
my_configuration_default_jio_document_page_gadget_url
</string>
<string>
my_configuration_stylesheet_url
</string>
<string>
my_configuration_stylesheet_url
</string>
<string>
my_configuration_wallpaper_url
</string>
</list>
</list>
</value>
</value>
</item>
</item>
...
...
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/WebSection_viewRenderJSPreference/my_configuration_wallpaper_url.xml
0 → 100644
View file @
1456d6a7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_configuration_wallpaper_url
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_reference
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Wallpaper
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSection_renderDefaultPageAsGadget.py
View file @
1456d6a7
...
@@ -58,11 +58,37 @@ if configuration_manifest_url is None:
...
@@ -58,11 +58,37 @@ if configuration_manifest_url is None:
mapping_dict
[
"manifest_attribute"
]
=
''
mapping_dict
[
"manifest_attribute"
]
=
''
else
:
else
:
mapping_dict
[
"manifest_attribute"
]
=
'manifest="%s"'
%
configuration_manifest_url
mapping_dict
[
"manifest_attribute"
]
=
'manifest="%s"'
%
configuration_manifest_url
configuration_webapp_manifest_url
=
web_section
.
getLayoutProperty
(
"configuration_webapp_manifest_url"
,
default
=
None
)
configuration_webapp_manifest_url
=
web_section
.
getLayoutProperty
(
"configuration_webapp_manifest_url"
,
default
=
None
)
if
configuration_webapp_manifest_url
is
None
:
if
configuration_webapp_manifest_url
is
None
:
mapping_dict
[
"webapp_manifest_full_link_tag"
]
=
''
mapping_dict
[
"webapp_manifest_full_link_tag"
]
=
''
else
:
else
:
mapping_dict
[
"webapp_manifest_full_link_tag"
]
=
'<link rel="manifest" href="'
+
configuration_webapp_manifest_url
+
'">'
mapping_dict
[
"webapp_manifest_full_link_tag"
]
=
'<link rel="manifest" href="'
+
configuration_webapp_manifest_url
+
'">'
# Wallpaper
# It can not be done in Javascript, due to CSP protection.
# data- attribute can not be accessed outside the content property
# So, it is easier to insert a data URL for this functionnality
wallpaper_url
=
web_section
.
getLayoutProperty
(
"configuration_wallpaper_url"
,
default
=
None
)
if
wallpaper_url
is
None
:
mapping_dict
[
"extra_css_full_link_tag"
]
=
''
else
:
from
base64
import
urlsafe_b64encode
mapping_dict
[
"extra_css_full_link_tag"
]
=
'<link rel="stylesheet" href="data:text/css;base64,%s">'
%
urlsafe_b64encode
(
"""
html::after {
content: "";
opacity: 0.1;
top: 0;
left: 0;
width : 100%%;
height: 100%%;
position: fixed;
z-index: -1;
background-size: cover;
background-position: 0 0;
background-attachment: fixed;
background-image: url("%s");
}
"""
%
wallpaper_url
);
return
view_as_web_method
(
mapping_dict
=
mapping_dict
)
return
view_as_web_method
(
mapping_dict
=
mapping_dict
)
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