Commit 692e466e authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Allow to not use a cache manifest

parent 12ef5b29
<!DOCTYPE html> <!DOCTYPE html>
<html manifest="${manifest_url}"> <html ${manifest_attribute}>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>958.33121.48203.5614</string> </value> <value> <string>958.43001.15704.45499</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1491989001.6</float> <float>1492085733.75</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -269,6 +269,16 @@ ...@@ -269,6 +269,16 @@
<value> <string>string</string> </value> <value> <string>string</string> </value>
</item> </item>
</dictionary> </dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_manifest_url</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -341,6 +351,10 @@ ...@@ -341,6 +351,10 @@
<key> <string>configuration_jio_gadget_url</string> </key> <key> <string>configuration_jio_gadget_url</string> </key>
<value> <string>gadget_erp5_jio.html</string> </value> <value> <string>gadget_erp5_jio.html</string> </value>
</item> </item>
<item>
<key> <string>configuration_manifest_url</string> </key>
<value> <string>gadget_erp5.appcache</string> </value>
</item>
<item> <item>
<key> <string>configuration_panel_gadget_url</string> </key> <key> <string>configuration_panel_gadget_url</string> </key>
<value> <string>gadget_erp5_panel.html</string> </value> <value> <string>gadget_erp5_panel.html</string> </value>
...@@ -586,7 +600,7 @@ ...@@ -586,7 +600,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>956.14341.54322.61030</string> </value> <value> <string>958.41530.20774.12100</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -604,7 +618,7 @@ ...@@ -604,7 +618,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1482764019.59</float> <float>1492085998.14</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -30,7 +30,8 @@ view_as_web_method = default_web_page.getTypeBasedMethod( ...@@ -30,7 +30,8 @@ view_as_web_method = default_web_page.getTypeBasedMethod(
"viewAsWeb", "viewAsWeb",
fallback_script_id="WebPage_viewAsWeb" fallback_script_id="WebPage_viewAsWeb"
) )
return view_as_web_method(mapping_dict={
mapping_dict = {
"frontpage_gadget": web_section.getLayoutProperty("configuration_frontpage_gadget_url", default="worklist"), "frontpage_gadget": web_section.getLayoutProperty("configuration_frontpage_gadget_url", default="worklist"),
"jio_document_page_gadget": web_section.getLayoutProperty("configuration_default_jio_document_page_gadget_url", default="form"), "jio_document_page_gadget": web_section.getLayoutProperty("configuration_default_jio_document_page_gadget_url", default="form"),
"application_title": web_section.getLayoutProperty("configuration_application_title", default="ERP5"), "application_title": web_section.getLayoutProperty("configuration_application_title", default="ERP5"),
...@@ -48,4 +49,12 @@ return view_as_web_method(mapping_dict={ ...@@ -48,4 +49,12 @@ return view_as_web_method(mapping_dict={
"website_url_set": json.dumps(website_url_set), "website_url_set": json.dumps(website_url_set),
"site_description": web_section.getLayoutProperty("description", default=""), "site_description": web_section.getLayoutProperty("description", default=""),
"site_keywords": web_section.getLayoutProperty("subject", default=""), "site_keywords": web_section.getLayoutProperty("subject", default=""),
}) }
configuration_manifest_url = web_section.getLayoutProperty("configuration_manifest_url", default=None)
if configuration_manifest_url is None:
mapping_dict["manifest_attribute"] = ''
else:
mapping_dict["manifest_attribute"] = 'manifest="%s"' % configuration_manifest_url
return view_as_web_method(mapping_dict=mapping_dict)
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