Commit 594758df authored by Vincent Bechu's avatar Vincent Bechu

[erp5_officejs] WIP add upload link in header, be carefull this commit erase some previous change

parent 858a363b
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
if (result.data.rows[i].value.hasOwnProperty("modification_date")) { if (result.data.rows[i].value.hasOwnProperty("modification_date")) {
date = new Date(result.data.rows[i].value.modification_date); date = new Date(result.data.rows[i].value.modification_date);
result.data.rows[i].value.modification_date = { result.data.rows[i].value.modification_date = {
field_gadget_param: {
allow_empty_time: 0, allow_empty_time: 0,
ampm_time_style: 0, ampm_time_style: 0,
css_class: "date_field", css_class: "date_field",
...@@ -41,7 +40,6 @@ ...@@ -41,7 +40,6 @@
timezone_style: 0, timezone_style: 0,
title: "Modification Date", title: "Modification Date",
type: "DateTimeField" type: "DateTimeField"
}
}; };
result.data.rows[i].value["listbox_uid:list"] = { result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list", key: "listbox_uid:list",
...@@ -124,15 +122,21 @@ ...@@ -124,15 +122,21 @@
.push(function () { .push(function () {
return RSVP.all([ return RSVP.all([
gadget.getUrlFor({command: "change", options: {"page": "ojs_add_document"}}), gadget.getUrlFor({command: "change", options: {"page": "ojs_add_document"}}),
gadget.getSetting('document_title_plural') gadget.getSetting('document_title_plural'),
gadget.getUrlFor({command: "change", options: {"page": "ojs_upload_convert"}}),
gadget.getSetting('upload_extension', false)
]); ]);
}) })
.push(function (result) { .push(function (result) {
return gadget.updateHeader({ var header = {
page_title: result[1], page_title: result[1],
filter_action: true, filter_action: true,
add_url: result[0] add_url: result[0]
}); };
if (result[3]) {
header.upload_url = result[2];
}
return gadget.updateHeader(header);
}); });
}); });
}(window, rJS, RSVP)); }(window, rJS, RSVP));
\ No newline at end of file
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
<string>Associate</string> <string>Associate</string>
<string>Auditor</string> <string>Auditor</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -24,6 +23,7 @@ ...@@ -24,6 +23,7 @@
<key> <string>_Add_portal_content_Permission</string> </key> <key> <string>_Add_portal_content_Permission</string> </key>
<value> <value>
<tuple> <tuple>
<string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Manager</string> <string>Manager</string>
</tuple> </tuple>
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
<value> <value>
<tuple> <tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string> <string>Manager</string>
</tuple> </tuple>
</value> </value>
...@@ -56,7 +58,6 @@ ...@@ -56,7 +58,6 @@
<string>Associate</string> <string>Associate</string>
<string>Auditor</string> <string>Auditor</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -199,7 +200,7 @@ ...@@ -199,7 +200,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>action</string> </key> <key> <string>action</string> </key>
<value> <string>publish</string> </value> <value> <string>publish_alive</string> </value>
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
...@@ -225,7 +226,7 @@ ...@@ -225,7 +226,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1495446491.04</float> <float>1523365973.43</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
...@@ -234,7 +235,7 @@ ...@@ -234,7 +235,7 @@
</item> </item>
<item> <item>
<key> <string>validation_state</string> </key> <key> <string>validation_state</string> </key>
<value> <string>published</string> </value> <value> <string>published_alive</string> </value>
</item> </item>
</dictionary> </dictionary>
</list> </list>
...@@ -256,7 +257,7 @@ ...@@ -256,7 +257,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>vincent</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -270,7 +271,7 @@ ...@@ -270,7 +271,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>966.41210.1237.18158</string> </value> <value> <string>966.50136.58427.36864</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -288,7 +289,7 @@ ...@@ -288,7 +289,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1523022228.16</float> <float>1523366737.77</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </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