Commit ae45aefe authored by Roque's avatar Roque

erp5_officejs: refactor on router settings

- drop unneeded setting
- rename setting
parent be93fc96
......@@ -15,10 +15,9 @@
</head>
<body>
<script data-renderjs-configuration="configuration_manifest" type="text/x-renderjs-configuration">gadget_officejs_codemirror.configuration</script>
<script data-renderjs-configuration="portal_type" type="text/x-renderjs-configuration">Web Script</script>
<script data-renderjs-configuration="content_type" type="text/x-renderjs-configuration">application/javascript</script>
<script data-renderjs-configuration="parent_relative_url" type="text/x-renderjs-configuration">web_page_module</script>
<script data-renderjs-configuration="parent_portal_type" type="text/x-renderjs-configuration">Web Page Module</script>
<script data-renderjs-configuration="default_portal_type" type="text/x-renderjs-configuration">Web Page Module</script>
<script data-renderjs-configuration="portal_type" type="text/x-renderjs-configuration">Web Script</script>
<script data-renderjs-configuration="portal_skin_folder" type="text/x-renderjs-configuration">erp5_officejs_codemirror</script>
<script data-renderjs-configuration="app_actions" type="text/x-renderjs-configuration">('Web Script | codemirror_view', 'Web Page Module | codemirror_view')</script>
<script data-renderjs-configuration="app_allowed_sub_types" type="text/x-renderjs-configuration">('Web Page Module | Web Script',)</script>
......
......@@ -277,7 +277,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>978.36799.29647.47735</string> </value>
<value> <string>981.49320.48519.15155</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -295,7 +295,7 @@
</tuple>
<state>
<tuple>
<float>1568974099.83</float>
<float>1581417236.31</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -26,7 +26,7 @@
gadget_util,
jio_document,
portal_type,
parent_portal_type,
default_portal_type,
default_view,
app_action_list,
form_definition,
......@@ -38,12 +38,12 @@
current_version = current_version.substr(index);
return gadget.getSettingList(["migration_version",
"app_view_reference",
"parent_portal_type",
"default_portal_type",
'default_view_reference',
'app_actions'])
.push(function (setting_list) {
app_view = options.action || setting_list[1];
parent_portal_type = setting_list[2];
default_portal_type = setting_list[2];
default_view = setting_list[3];
app_action_list = setting_list[4];
if (setting_list[0] !== current_version) {
......@@ -72,17 +72,15 @@
}, function (error) {
// instaceof error is Object, so use status_code and undefined jio_key
if (error.status_code === 400 && !options.jio_key) {
return parent_portal_type;
return default_portal_type;
}
throw error;
})
.push(function (parent_portal_type) {
.push(function (current_portal_type) {
if (jio_document) {
portal_type = jio_document.portal_type;
} else if (options.portal_type) {
portal_type = options.portal_type;
} else {
portal_type = parent_portal_type;
portal_type = current_portal_type;
}
return gadget_util.getFormDefinition(portal_type, app_view);
})
......
......@@ -228,7 +228,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>979.63498.47896.7901</string> </value>
<value> <string>981.49315.8914.1877</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>1574423725.43</float>
<float>1581349608.42</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -15,9 +15,8 @@
</head>
<body>
<script data-renderjs-configuration="configuration_manifest" type="text/x-renderjs-configuration">gadget_officejs_pdf_viewer.configuration</script>
<script data-renderjs-configuration="default_portal_type" type="text/x-renderjs-configuration">Document Module</script>
<script data-renderjs-configuration="portal_type" type="text/x-renderjs-configuration">PDF</script>
<script data-renderjs-configuration="parent_relative_url" type="text/x-renderjs-configuration">document_module</script>
<script data-renderjs-configuration="parent_portal_type" type="text/x-renderjs-configuration">Document Module</script>
<script data-renderjs-configuration="portal_skin_folder" type="text/x-renderjs-configuration">erp5_officejs_pdf_viewer</script>
<script data-renderjs-configuration="app_actions" type="text/x-renderjs-configuration">('PDF | pdf_viewer_view', 'Document Module | pdf_viewer_view')</script>
<script data-renderjs-configuration="app_allowed_sub_types" type="text/x-renderjs-configuration">('Document Module | PDF',)</script>
......
......@@ -235,7 +235,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>978.36795.39696.27238</string> </value>
<value> <string>981.49320.55609.10598</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -253,7 +253,7 @@
</tuple>
<state>
<tuple>
<float>1568973833.9</float>
<float>1581417258.26</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -15,9 +15,8 @@
</head>
<body>
<script data-renderjs-configuration="configuration_manifest" type="text/x-renderjs-configuration">gadget_officejs_illustration.configuration</script>
<script data-renderjs-configuration="default_portal_type" type="text/x-renderjs-configuration">Web Page Module</script>
<script data-renderjs-configuration="portal_type" type="text/x-renderjs-configuration">Web Illustration</script>
<script data-renderjs-configuration="parent_relative_url" type="text/x-renderjs-configuration">web_page_module</script>
<script data-renderjs-configuration="parent_portal_type" type="text/x-renderjs-configuration">Web Page Module</script>
<script data-renderjs-configuration="portal_skin_folder" type="text/x-renderjs-configuration">erp5_officejs_svg_editor</script>
<script data-renderjs-configuration="app_view_reference" type="text/x-renderjs-configuration">svg_editor_view</script>
<script data-renderjs-configuration="app_actions" type="text/x-renderjs-configuration">('Web Page Module | svg_editor_view', 'Web Illustration | svg_editor_view')</script>
......
......@@ -273,7 +273,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>977.62238.19609.14984</string> </value>
<value> <string>981.49320.38325.11997</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -291,7 +291,7 @@
</tuple>
<state>
<tuple>
<float>1568973476.25</float>
<float>1581417273.37</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -15,9 +15,8 @@
</head>
<body>
<script data-renderjs-configuration="configuration_manifest" type="text/x-renderjs-configuration">gadget_officejs_text_editor.configuration</script>
<script data-renderjs-configuration="default_portal_type" type="text/x-renderjs-configuration">Web Page Module</script>
<script data-renderjs-configuration="portal_type" type="text/x-renderjs-configuration">Web Page</script>
<script data-renderjs-configuration="parent_portal_type" type="text/x-renderjs-configuration">Web Page Module</script>
<script data-renderjs-configuration="parent_relative_url" type="text/x-renderjs-configuration">web_page_module</script>
<script data-renderjs-configuration="portal_skin_folder" type="text/x-renderjs-configuration">erp5_text_editor</script>
<script data-renderjs-configuration="app_view_reference" type="text/x-renderjs-configuration">text_editor_view</script>
<script data-renderjs-configuration="app_actions" type="text/x-renderjs-configuration">('Web Page | text_editor_view', 'Web Page | text_editor_clone', 'Web Page Module | text_editor_view')</script>
......
......@@ -277,7 +277,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>978.36776.33713.12509</string> </value>
<value> <string>981.49320.27784.39816</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -295,7 +295,7 @@
</tuple>
<state>
<tuple>
<float>1568972733.17</float>
<float>1581417306.84</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -15,9 +15,8 @@
</head>
<body>
<script data-renderjs-configuration="configuration_manifest" type="text/x-renderjs-configuration">gadget_officejs_image_editor.configuration</script>
<script data-renderjs-configuration="default_portal_type" type="text/x-renderjs-configuration">Image Module</script>
<script data-renderjs-configuration="portal_type" type="text/x-renderjs-configuration">Image</script>
<script data-renderjs-configuration="parent_relative_url" type="text/x-renderjs-configuration">image_module</script>
<script data-renderjs-configuration="parent_portal_type" type="text/x-renderjs-configuration">Image Module</script>
<script data-renderjs-configuration="portal_skin_folder" type="text/x-renderjs-configuration">erp5_image_editor</script>
<script data-renderjs-configuration="app_actions" type="text/x-renderjs-configuration">('Image | image_editor_view', 'Image Module | image_editor_view')</script>
<script data-renderjs-configuration="app_allowed_sub_types" type="text/x-renderjs-configuration">('Image Module | Image',)</script>
......
......@@ -274,7 +274,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>978.36802.59817.3208</string> </value>
<value> <string>981.49320.45122.3959</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -292,7 +292,7 @@
</tuple>
<state>
<tuple>
<float>1576500526.54</float>
<float>1581417139.0</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -15,9 +15,8 @@
</head>
<body>
<script data-renderjs-configuration="configuration_manifest" type="text/x-renderjs-configuration">gadget_officejs_web_table.configuration</script>
<script data-renderjs-configuration="default_portal_type" type="text/x-renderjs-configuration">Web Page Module</script>
<script data-renderjs-configuration="portal_type" type="text/x-renderjs-configuration">Web Table</script>
<script data-renderjs-configuration="parent_relative_url" type="text/x-renderjs-configuration">web_page_module</script>
<script data-renderjs-configuration="parent_portal_type" type="text/x-renderjs-configuration">Web Page Module</script>
<script data-renderjs-configuration="portal_skin_folder" type="text/x-renderjs-configuration">erp5_web_table_editor</script>
<script data-renderjs-configuration="app_actions" type="text/x-renderjs-configuration">('Web Table | web_table_view', 'Web Page Module | web_table_view')</script>
<script data-renderjs-configuration="app_allowed_sub_types" type="text/x-renderjs-configuration">('Web Page Module | Web Table',)</script>
......
......@@ -229,7 +229,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>977.62260.6779.17339</string> </value>
<value> <string>981.49320.61869.64836</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -247,7 +247,7 @@
</tuple>
<state>
<tuple>
<float>1568973158.24</float>
<float>1581417167.29</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -18,7 +18,7 @@
<script data-renderjs-configuration="portal_type" type="text/x-renderjs-configuration">Presentation</script>
<script data-renderjs-configuration="parent_relative_url" type="text/x-renderjs-configuration">document_module</script>
<script data-renderjs-configuration="erp5_attachment_synchro" type="text/x-renderjs-configuration">/{+id}/Document_downloadForOnlyOfficeApp</script>
<script data-renderjs-configuration="parent_portal_type" type="text/x-renderjs-configuration">Document Module</script>
<script data-renderjs-configuration="default_portal_type" type="text/x-renderjs-configuration">Document Module</script>
<script data-renderjs-configuration="portal_skin_folder" type="text/x-renderjs-configuration">erp5_ooffice_presentation_editor</script>
<script data-renderjs-configuration="app_actions" type="text/x-renderjs-configuration">('Presentation | ooffice_presentation_view', 'Document Module | ooffice_presentation_view', 'Document Module | ooffice_upload_document', 'Presentation | ooffice_download_document')</script>
<script data-renderjs-configuration="app_allowed_sub_types" type="text/x-renderjs-configuration">('Document Module | Presentation',)</script>
......
......@@ -241,7 +241,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>978.47147.36512.64972</string> </value>
<value> <string>978.47147.61639.26060</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -259,7 +259,7 @@
</tuple>
<state>
<tuple>
<float>1569594956.42</float>
<float>1581348855.42</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -17,7 +17,7 @@
<script data-renderjs-configuration="configuration_manifest" type="text/x-renderjs-configuration">gadget_ooffice_spreadsheet.configuration</script>
<script data-renderjs-configuration="portal_type" type="text/x-renderjs-configuration">Spreadsheet</script>
<script data-renderjs-configuration="parent_relative_url" type="text/x-renderjs-configuration">document_module</script>
<script data-renderjs-configuration="parent_portal_type" type="text/x-renderjs-configuration">Document Module</script>
<script data-renderjs-configuration="default_portal_type" type="text/x-renderjs-configuration">Document Module</script>
<script data-renderjs-configuration="portal_skin_folder" type="text/x-renderjs-configuration">erp5_ooffice_spreadsheet_editor</script>
<script data-renderjs-configuration="app_actions" type="text/x-renderjs-configuration">('Spreadsheet | ooffice_spreadsheet_view', 'Document Module | ooffice_spreadsheet_view', 'Document Module | ooffice_upload_document', 'Spreadsheet | ooffice_download_document')</script>
<script data-renderjs-configuration="app_allowed_sub_types" type="text/x-renderjs-configuration">('Document Module | Spreadsheet',)</script>
......
......@@ -241,7 +241,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>978.54003.36064.54033</string> </value>
<value> <string>978.54046.10730.33689</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -259,7 +259,7 @@
</tuple>
<state>
<tuple>
<float>1569922449.65</float>
<float>1581348843.42</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -20,7 +20,7 @@
<script data-renderjs-configuration="erp5_attachment_synchro" type="text/x-renderjs-configuration">/{+id}/Document_downloadForOnlyOfficeApp</script>
<script data-renderjs-configuration="dropbox_app_key" type="text/x-renderjs-configuration">lj7mua2rf67bo20</script>
<script data-renderjs-configuration="content_type" type="text/x-renderjs-configuration">application/x-asc-text</script>
<script data-renderjs-configuration="parent_portal_type" type="text/x-renderjs-configuration">Document Module</script>
<script data-renderjs-configuration="default_portal_type" type="text/x-renderjs-configuration">Document Module</script>
<script data-renderjs-configuration="portal_skin_folder" type="text/x-renderjs-configuration">erp5_ooffice_text_editor</script>
<script data-renderjs-configuration="app_actions" type="text/x-renderjs-configuration">('Text | ooffice_text_view', 'Document Module | ooffice_text_view', 'Document Module | ooffice_upload_document', 'Text | ooffice_download_document')</script>
<script data-renderjs-configuration="app_allowed_sub_types" type="text/x-renderjs-configuration">('Document Module | Text',)</script>
......
......@@ -241,7 +241,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>978.46962.63675.39185</string> </value>
<value> <string>978.47115.16742.5734</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -259,7 +259,7 @@
</tuple>
<state>
<tuple>
<float>1569592995.31</float>
<float>1581348841.76</float>
<string>UTC</string>
</tuple>
</state>
......
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