Commit 4b3afea6 authored by Roque's avatar Roque

erp5_officejs: update app customization via router settings

- allow custom app configurator
- render listbox form field extra configuration
- fix date format rendering
- allow configuration form fields to have extra js code
- allow to customize listbox column styles
- allow to customize listbox jio_alldocs
- fix custom view handling
- fix gadget field rendering
- allow dev user to set custom header options
- truncate long string fields in listboxes rendering
parent 306aa82c
......@@ -165,9 +165,7 @@
parent_portal_type: portal_type
};
if (view_categorie_list.includes(action_settings.action_type)) {
if (app_view === action_settings.action) {
action_settings.page = "ojs_local_controller";
}
action_settings.page = "ojs_local_controller";
action_info_dict.view_list[action_settings.action] =
action_settings;
} else {
......
......@@ -244,7 +244,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <unicode>zope</unicode> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -258,7 +258,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>987.1958.49484.49100</string> </value>
<value> <string>1015.45953.43925.42052</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -278,7 +278,7 @@
</tuple>
<state>
<tuple>
<float>1601668696.35</float>
<float>1712334861.52</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -31,6 +31,7 @@
app_action_list,
form_definition,
current_version,
configurator,
index;
current_version = window.location.href.replace(window.location.hash, "");
index = current_version.indexOf(window.location.host) +
......@@ -40,18 +41,20 @@
"app_view_reference",
"parent_portal_type",
'default_view_reference',
'app_actions'])
'app_actions',
'app_configurator'])
.push(function (setting_list) {
app_view = options.action || setting_list[1];
parent_portal_type = setting_list[2];
default_view = setting_list[3];
app_action_list = setting_list[4];
configurator = setting_list[5] || 'ojs_configurator';
if (setting_list[0] !== current_version) {
//if app version has changed, force storage selection
return gadget.redirect({
'command': 'display',
'options': {
'page': 'ojs_configurator',
'page': configurator,
'auto_repair': true
}
});
......@@ -121,6 +124,7 @@
var fragment = document.createElement('div'),
gadget = this,
view_gadget_url = "gadget_officejs_form_view.html",
//TODO: this should be a list, not only one custom view
custom_gadget_url = gadget.state.form_definition.portal_type_dict
.custom_view_gadget;
while (this.element.firstChild) {
......
......@@ -222,7 +222,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <unicode>zope</unicode> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1005.39859.38086.29457</string> </value>
<value> <string>1015.46091.52896.5922</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1673426666.06</float>
<float>1712343165.23</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -22,6 +22,7 @@
.getElementById("panel-template-body-desktop")
.innerHTML);
//TODO this is the same in action_officejs page, move to common
function getElementList(gadget, element_list) {
var i = 0,
element_info_list = [],
......
......@@ -219,7 +219,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <unicode>zope</unicode> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -233,7 +233,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1001.57742.17876.27579</string> </value>
<value> <string>1014.1943.59170.64648</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -253,7 +253,7 @@
</tuple>
<state>
<tuple>
<float>1658943108.94</float>
<float>1713536268.81</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -244,7 +244,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <unicode>zope</unicode> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -258,7 +258,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>991.25773.59047.44168</string> </value>
<value> <string>1016.10474.46597.2816</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -278,7 +278,7 @@
</tuple>
<state>
<tuple>
<float>1672736671.72</float>
<float>1714138267.55</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -36,6 +36,7 @@
);
}
//TODO this is the same in ojs_panel, move to common
function getHTMLElementList(gadget, element_list) {
var i = 0,
element_info_list = [],
......
......@@ -222,7 +222,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <unicode>zope</unicode> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>979.63524.32203.29269</string> </value>
<value> <string>1015.45957.31009.8925</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1574423701.42</float>
<float>1713536281.01</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