diff --git a/bt5/erp5_officejs_appstore_base/PathTemplateItem/web_page_module/gadget_ojs_appstore_redirect_page_html.html b/bt5/erp5_officejs_appstore_base/PathTemplateItem/web_page_module/gadget_ojs_appstore_redirect_page_html.html index dd1910abe5d04473f065e6d16994b57fe8d6b8b5..688d863b872b41740817d57f1c17efe88d77dd03 100644 --- a/bt5/erp5_officejs_appstore_base/PathTemplateItem/web_page_module/gadget_ojs_appstore_redirect_page_html.html +++ b/bt5/erp5_officejs_appstore_base/PathTemplateItem/web_page_module/gadget_ojs_appstore_redirect_page_html.html @@ -1,12 +1,13 @@ <!DOCTYPE html> -<html manifest="${application_appcache}"> +<html manifest="WebSection_renderOfficeJSRedirectAppCache"> <body> <script language="JavaScript"> function redirect_version() { - document.location.href="${latest_version}/" + document.location.replace("${latest_version}/") }; window.applicationCache.addEventListener('cached',redirect_version); window.applicationCache.addEventListener('noupdate',redirect_version); + window.applicationCache.addEventListener('error',redirect_version); window.applicationCache.addEventListener('updateready', function(){window.location.reload()}); // XXX This is a hack for when the network is too slow. window.setTimeout(redirect_version, 10000); diff --git a/bt5/erp5_officejs_appstore_base/PathTemplateItem/web_page_module/gadget_ojs_appstore_redirect_page_html.xml b/bt5/erp5_officejs_appstore_base/PathTemplateItem/web_page_module/gadget_ojs_appstore_redirect_page_html.xml index a9a61a64f3ade588f8945e4b4ec9f8a3e2c31b35..512f8912646b1edcc82d3899603b513084b1eb2c 100644 --- a/bt5/erp5_officejs_appstore_base/PathTemplateItem/web_page_module/gadget_ojs_appstore_redirect_page_html.xml +++ b/bt5/erp5_officejs_appstore_base/PathTemplateItem/web_page_module/gadget_ojs_appstore_redirect_page_html.xml @@ -66,9 +66,7 @@ <item> <key> <string>categories</string> </key> <value> - <tuple> - <string>contributor/person_module/1</string> - </tuple> + <tuple/> </value> </item> <item> @@ -109,9 +107,7 @@ </item> <item> <key> <string>text_content_substitution_mapping_method_id</string> </key> - <value> - <none/> - </value> + <value> <string>WebPage_getRenderJSSubstitutionMappingDict</string> </value> </item> <item> <key> <string>title</string> </key> @@ -232,7 +228,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>cedric.le.ninivin</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -246,7 +242,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>958.21401.8615.61559</string> </value> + <value> <string>959.46591.59882.45141</string> </value> </item> <item> <key> <string>state</string> </key> @@ -264,7 +260,7 @@ </tuple> <state> <tuple> - <float>1493976571.58</float> + <float>1496147551.92</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/application-list.xml b/bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/application-list.xml index da39b2f69553bd0c126cadd62240eabe31d56b21..1616fb196343071dfdf56d75454622bac3de884a 100644 --- a/bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/application-list.xml +++ b/bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/application-list.xml @@ -177,9 +177,7 @@ <key> <string>available_language</string> </key> <value> <tuple> - <string>fr</string> <string>en</string> - <string>zh</string> </tuple> </value> </item> @@ -392,7 +390,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>cedric.le.ninivin</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -406,7 +404,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>959.30571.40365.35123</string> </value> + <value> <string>959.37733.21524.40755</string> </value> </item> <item> <key> <string>state</string> </key> @@ -424,7 +422,7 @@ </tuple> <state> <tuple> - <float>1495185352.08</float> + <float>1495615158.02</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/application-list/template.xml b/bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/application-list/template.xml index d9b21f0d504e26397c4335956531f840be965c20..3981afa3a215507f3016ce8bc9e9aaf750b3f043 100644 --- a/bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/application-list/template.xml +++ b/bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/application-list/template.xml @@ -120,6 +120,33 @@ <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> </value> </item> + <item> + <key> <string>_local_properties</string> </key> + <value> + <tuple> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>configuration_x_frame_options</string> </value> + </item> + <item> + <key> <string>type</string> </key> + <value> <string>string</string> </value> + </item> + </dictionary> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>configuration_content_security_policy</string> </value> + </item> + <item> + <key> <string>type</string> </key> + <value> <string>string</string> </value> + </item> + </dictionary> + </tuple> + </value> + </item> <item> <key> <string>_mt_index</string> </key> <value> @@ -147,6 +174,26 @@ </tuple> </value> </item> + <item> + <key> <string>configuration_content_security_policy</string> </key> + <value> <string>default-src \'self\'; script-src \'unsafe-inline\';</string> </value> + </item> + <item> + <key> <string>configuration_x_frame_options</string> </key> + <value> <string>SAMEORIGIN</string> </value> + </item> + <item> + <key> <string>container_layout</string> </key> + <value> <string>WebSection_renderOfficeJSApplicationPage</string> </value> + </item> + <item> + <key> <string>content_layout</string> </key> + <value> <string>WebSection_renderOfficeJSApplicationPage</string> </value> + </item> + <item> + <key> <string>custom_render_method_id</string> </key> + <value> <string>WebSection_renderOfficeJSApplicationPage</string> </value> + </item> <item> <key> <string>description</string> </key> <value> <string>Template used to create WebSite</string> </value> @@ -165,6 +212,10 @@ <none/> </value> </item> + <item> + <key> <string>layout_configuration_form_id</string> </key> + <value> <string>WebSection_viewOfficeJSApplicationPreference</string> </value> + </item> <item> <key> <string>portal_type</string> </key> <value> <string>Web Section</string> </value> @@ -175,9 +226,13 @@ <none/> </value> </item> + <item> + <key> <string>skin_selection_name</string> </key> + <value> <string>RJS</string> </value> + </item> <item> <key> <string>title</string> </key> - <value> <string>Template</string> </value> + <value> <string>Template Redirect</string> </value> </item> <item> <key> <string>visible</string> </key> @@ -350,12 +405,12 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>cedric.le.ninivin</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> <value> - <persistent> <string encoding="base64">AAAAAAAAAAs=</string> </persistent> + <none/> </value> </item> <item> @@ -364,7 +419,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>0.0.0.0</string> </value> + <value> <string>959.46472.13801.63641</string> </value> </item> <item> <key> <string>state</string> </key> @@ -382,7 +437,7 @@ </tuple> <state> <tuple> - <float>1495185385.46</float> + <float>1496149454.25</float> <string>UTC</string> </tuple> </state> @@ -394,36 +449,4 @@ </tuple> </pickle> </record> - <record id="11" aka="AAAAAAAAAAs="> - <pickle> - <global name="Message" module="Products.ERP5Type.Message"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>default</string> </key> - <value> <string>Object copied from ${source_item}</string> </value> - </item> - <item> - <key> <string>domain</string> </key> - <value> <string>erp5_ui</string> </value> - </item> - <item> - <key> <string>mapping</string> </key> - <value> - <dictionary> - <item> - <key> <string>source_item</string> </key> - <value> <string>/erp5/web_site_module/application-list-old/template</string> </value> - </item> - </dictionary> - </value> - </item> - <item> - <key> <string>message</string> </key> - <value> <string>Object copied from ${source_item}</string> </value> - </item> - </dictionary> - </pickle> - </record> </ZopeData> diff --git a/bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/application-list/template/template.xml b/bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/application-list/template_static.xml similarity index 98% rename from bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/application-list/template/template.xml rename to bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/application-list/template_static.xml index 446e21edc7b99f9b5c74f89aee2be8c9b67b567b..5f3d99043a47bfa06eb277539f133d68b21bfe84 100644 --- a/bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/application-list/template/template.xml +++ b/bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/application-list/template_static.xml @@ -98,7 +98,7 @@ <key> <tuple> <int>99</int> - <string>ERP5 Web Section/template</string> + <string>ERP5 Web Section/template_static</string> </tuple> </key> <value> @@ -209,7 +209,7 @@ </item> <item> <key> <string>id</string> </key> - <value> <string>template</string> </value> + <value> <string>template_static</string> </value> </item> <item> <key> <string>int_index</string> </key> @@ -441,7 +441,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>959.36391.8144.11332</string> </value> + <value> <string>959.46640.35795.61969</string> </value> </item> <item> <key> <string>state</string> </key> @@ -459,7 +459,7 @@ </tuple> <state> <tuple> - <float>1495618943.32</float> + <float>1496149488.71</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwareRelease_fixRelatedWebSection.py b/bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwareRelease_fixRelatedWebSection.py index 9bb9920dbc428bcbd0eaee28ba551587854b30ca..060db640d2a3b98310b2d1e7e7129f5a75350926 100644 --- a/bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwareRelease_fixRelatedWebSection.py +++ b/bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwareRelease_fixRelatedWebSection.py @@ -11,7 +11,11 @@ context.log("%s" % web_site.getRelativeUrl()) try: web_section = web_site.restrictedTraverse(version) except KeyError: - web_section = web_site.template.Base_createCloneDocument(batch_mode=True) + clipboard = web_site.getParentValue().manage_copyObjects(ids=['template_static']) + context.REQUEST.set('__cp', clipboard) # CopySupport is using this to set + # tracebility information in edit_workflow history + paste_result = web_site.manage_pasteObjects(cb_copy_data=clipboard) + web_section = web_site[paste_result[0]['new_id']] web_section.edit( id=version, title=software_release.getVersion(), @@ -26,6 +30,7 @@ web_section.setCriterionPropertyList([ web_section.setCriterion('version', version[:10]) web_section.setMembershipCriterionBaseCategoryList(['follow_up']) web_section.setMembershipCriterionCategoryList(['follow_up/' + context.getRelativeUrl()]) +web_site.edit(configuration_latest_version=web_section.getId()) if not default_page: # Update default page for development version. diff --git a/bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/WebSection_renderOfficeJSRedirectAppCache.py b/bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/WebSection_renderOfficeJSRedirectAppCache.py new file mode 100644 index 0000000000000000000000000000000000000000..a4157e61bbfc5f4e943c2662ac606512d31b90fa --- /dev/null +++ b/bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/WebSection_renderOfficeJSRedirectAppCache.py @@ -0,0 +1,16 @@ +if REQUEST is None: + REQUEST = context.REQUEST +if response is None: + response = REQUEST.RESPONSE + +web_section = context + +if REQUEST.getHeader('If-Modified-Since', '') == web_section.getModificationDate().rfc822(): + response.setStatus(304) + return "" + +response.setHeader('Content-Type', 'text/cache-manifest') +response.setHeader('Cache-Control', 'max-age=0, public, must-revalidate') + +return """CACHE MANIFEST +# %s""" % context.getLayoutProperty("configuration_latest_version", default="development") diff --git a/bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/WebSection_renderOfficeJSRedirectAppCache.xml b/bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/WebSection_renderOfficeJSRedirectAppCache.xml new file mode 100644 index 0000000000000000000000000000000000000000..62706ad5e17102b4b20e5569b81c07d54463aad8 --- /dev/null +++ b/bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/WebSection_renderOfficeJSRedirectAppCache.xml @@ -0,0 +1,68 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_Cacheable__manager_id</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>REQUEST=None, response=None</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>WebSection_renderOfficeJSRedirectAppCache</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_officejs_appstore_base/bt/template_keep_last_workflow_history_only_path_list b/bt5/erp5_officejs_appstore_base/bt/template_keep_last_workflow_history_only_path_list index 0f33ed685fe0b9f7632548d479f8049ba32c08b5..df0cf4ab0b1b79b2630358f09b5ac677070c77c6 100644 --- a/bt5/erp5_officejs_appstore_base/bt/template_keep_last_workflow_history_only_path_list +++ b/bt5/erp5_officejs_appstore_base/bt/template_keep_last_workflow_history_only_path_list @@ -3,4 +3,6 @@ web_site_module/officejs_appstore web_site_module/officejs_appstore/** web_site_module/application-list web_site_module/application-list/template -web_site_module/application-list/template/** \ No newline at end of file +web_site_module/application-list/template/** +web_site_module/application-list/template_static +web_site_module/application-list/template_static/** \ No newline at end of file diff --git a/bt5/erp5_officejs_appstore_base/bt/template_keep_workflow_path_list b/bt5/erp5_officejs_appstore_base/bt/template_keep_workflow_path_list index 0f33ed685fe0b9f7632548d479f8049ba32c08b5..df0cf4ab0b1b79b2630358f09b5ac677070c77c6 100644 --- a/bt5/erp5_officejs_appstore_base/bt/template_keep_workflow_path_list +++ b/bt5/erp5_officejs_appstore_base/bt/template_keep_workflow_path_list @@ -3,4 +3,6 @@ web_site_module/officejs_appstore web_site_module/officejs_appstore/** web_site_module/application-list web_site_module/application-list/template -web_site_module/application-list/template/** \ No newline at end of file +web_site_module/application-list/template/** +web_site_module/application-list/template_static +web_site_module/application-list/template_static/** \ No newline at end of file diff --git a/bt5/erp5_officejs_appstore_base/bt/template_path_list b/bt5/erp5_officejs_appstore_base/bt/template_path_list index 31ef62fdcebe8e6bcb5d832b8c6351f2264f1b42..ff18145519da904447151ee2473f9b2eea683aec 100644 --- a/bt5/erp5_officejs_appstore_base/bt/template_path_list +++ b/bt5/erp5_officejs_appstore_base/bt/template_path_list @@ -7,5 +7,7 @@ web_page_module/gadget_ojs_* web_site_module/application-list web_site_module/application-list/template web_site_module/application-list/template/** +web_site_module/application-list/template_static +web_site_module/application-list/template_static/** web_site_module/officejs_appstore web_site_module/officejs_appstore/** \ No newline at end of file