Commit e19a7a87 authored by Roque's avatar Roque

erp5_officejs: restoring tales expression on portal actions

- minor configuration item on controller
parent 6c8a49a2
......@@ -79,7 +79,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>portal_skins/erp5_web_officejs_ui/WebPageModule_viewWebPageListAsJio</string> </value>
<value> <string>string:${object_url}/WebPageModule_viewWebPageListAsJio</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -83,7 +83,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>portal_skins/erp5_web_officejs_ui/TextEditor_cloneDocument</string> </value>
<value> <string>string:${object_url}/TextEditor_cloneDocument</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -83,7 +83,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>portal_skins/erp5_web_officejs_ui/WebPage_viewAsTextDocument</string> </value>
<value> <string>string:${object_url}/WebPage_viewAsTextDocument</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -228,6 +228,9 @@
.push(function (action_result) {
action_title = action_result.title;
action_type = action_result.action_type;
if (action_result.action.includes("string:${object_url}")) {
action_result.action = action_result.action.replace("string:${object_url}", "portal_skins/erp5_web_officejs_ui");
}
return gadget.jio_get(action_result.action);
})
.push(function (form_result) {
......
......@@ -26,8 +26,6 @@
/////////////////////////////////////////////////////////////////
.declareMethod("render", function (options) {
//TODO: set this in site configuration
options.editable = true;
var gadget = this,
default_view,
app_view,
......@@ -41,13 +39,15 @@
return RSVP.all([
gadget.declareGadget("gadget_officejs_common_utils.html"),
gadget.getSetting('app_view_reference'),
gadget.getSetting('default_view_reference')
gadget.getSetting('default_view_reference'),
gadget.getSetting('documents_editable')
]);
})
.push(function (result_list) {
gadget_utils = result_list[0];
app_view = options.action || result_list[1];
default_view = result_list[2];
options.editable = ((result_list[3] == "1") ? true : options.editable);
return gadget.jio_get(options.jio_key);
})
.push(function (result) {
......
......@@ -20,6 +20,7 @@
<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="hide_listbox_buttons" type="text/x-renderjs-configuration">1</script>
<script data-renderjs-configuration="documents_editable" type="text/x-renderjs-configuration">1</script>
<script data-renderjs-configuration="erp5_attachment_synchro" type="text/x-renderjs-configuration"></script>
<script data-renderjs-configuration="dropbox_app_key" type="text/x-renderjs-configuration">n692ixxhyg9zhqs</script>
<div data-gadget-url="gadget_erp5_router.html" data-gadget-scope="erp5_router"></div>
......
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