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