Commit 17c1341e authored by Tomáš Peterka's avatar Tomáš Peterka Committed by Tomáš Peterka

[erp5_core+xhtml+renderjs] Add object_jio_button action

parent 6da67666
......@@ -68,21 +68,20 @@
/////////////////////////////////////////////////////////////////
.declareMethod("render", function (options) {
var gadget = this,
erp5_document,
transition_list,
action_list,
clone_list,
delete_list;
erp5_document;
// Get the whole view as attachment because actions can change based on
// what view we are at. If no view available than fallback to "links".
return gadget.jio_getAttachment(options.jio_key, options.view || "links")
.push(function (result) {
erp5_document = result;
transition_list = ensureArray(erp5_document._links.action_workflow);
action_list = ensureArray(erp5_document._links.action_object_jio_action),
clone_list = ensureArray(erp5_document._links.action_object_clone_action),
delete_list = ensureArray(erp5_document._links.action_object_delete_action);
.push(function (jio_attachment) {
var transition_list = ensureArray(jio_attachment._links.action_workflow),
action_list = ensureArray(jio_attachment._links.action_object_jio_action)
.concat(ensureArray(jio_attachment._links.action_object_jio_button))
.concat(ensureArray(jio_attachment._links.action_object_jio_fast_input)),
clone_list = ensureArray(jio_attachment._links.action_object_clone_action),
delete_list = ensureArray(jio_attachment._links.action_object_delete_action);
erp5_document = jio_attachment;
return RSVP.all([
renderLinkList(gadget, "Workflows", "random", transition_list),
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.24781.43913.41642</string> </value>
<value> <string>965.57861.34804.9762</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1518183970.49</float>
<float>1519987107.92</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -61,7 +61,9 @@
if (erp5_document !== undefined) {
workflow_list = ensureArray(erp5_document._links.action_workflow);
view_list = ensureArray(erp5_document._links.action_object_view);
action_list = ensureArray(erp5_document._links.action_object_jio_action);
action_list = ensureArray(erp5_document._links.action_object_jio_action)
.concat(ensureArray(erp5_document._links.action_object_jio_fast_input))
.concat(ensureArray(erp5_document._links.action_object_jio_button));
if (view === 'view') {
for (i = 0; i < view_list.length; i += 1) {
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.30842.26935.32494</string> </value>
<value> <string>965.39086.65235.37700</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1518535361.1</float>
<float>1519986835.7</float>
<string>UTC</string>
</tuple>
</state>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
<string>Reviewer</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
<string>Reviewer</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_jio_button</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>object_jio_button</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>object_jio_button</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -95,7 +95,9 @@
</span>
<span class="tool_buttons" metal:define-macro="tool_buttons">
<span class="tool_buttons"
metal:define-macro="tool_buttons"
tal:define="global empty_array python: []">
<!-- XXX: exchange_actions seems to be bad condition -->
<span class="first"
......@@ -104,7 +106,9 @@
exchange_jio_actions actions/object_jio_exchange | nothing;
report_actions actions/object_report | nothing;
report_jio_actions actions/object_jio_report | nothing;
button_actions actions/object_button | nothing;
button_action actions/object_button | empty_array;
button_jio_action actions/object_jio_button | empty_array;
button_actions python: button_action + button_jio_action;
fast_input_actions actions/object_fast_input | nothing;
fast_input_jio_actions actions/object_jio_fast_input | nothing;
sort_actions actions/object_sort | nothing;
......
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