Commit 56ac7b76 authored by Vincent Bechu's avatar Vincent Bechu

[erp5_officejs] Fix for pass test and add content_type when add onlyoffice document

parent ee811272
...@@ -193,6 +193,9 @@ gadget_erp5_search_editor.js\n ...@@ -193,6 +193,9 @@ gadget_erp5_search_editor.js\n
gadget_erp5_sort_editor.html\n gadget_erp5_sort_editor.html\n
gadget_erp5_sort_editor.js\n gadget_erp5_sort_editor.js\n
\n \n
gadget_officejs_bookmark_manager_router.html\n
gadget_officejs_jio_bookmark_view.html\n
gadget_officejs_jio_bookmark_view.js\n
gadget_erp5_page_ojs_add_bookmark.html\n gadget_erp5_page_ojs_add_bookmark.html\n
gadget_erp5_page_ojs_add_bookmark.js\n gadget_erp5_page_ojs_add_bookmark.js\n
gadget_erp5_page_ojs_bookmark_list.html\n gadget_erp5_page_ojs_bookmark_list.html\n
...@@ -347,7 +350,7 @@ NETWORK:\n ...@@ -347,7 +350,7 @@ NETWORK:\n
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.9215.29642.18432</string> </value> <value> <string>961.11869.34421.55569</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -365,7 +368,7 @@ NETWORK:\n ...@@ -365,7 +368,7 @@ NETWORK:\n
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1501681934.74</float> <float>1501841135.17</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
}) })
.push(function () { .push(function () {
// Workaround, find a way to open document without break gadget. // Workaround, find a way to open document without break gadget.
return gadget.redirect({"command": "change", "options": {"page": "ojs_document_list"}}); return gadget.redirect({"command": "change", "options": {"page": "ojs_bookmark_list"}});
}); });
}) })
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
"title": "Url", "title": "Url",
"default": options.url_string || "", "default": options.url_string || "",
"css_class": "", "css_class": "",
"required": 0, "required": 1,
"editable": 1, "editable": 1,
"key": "url_string", "key": "url_string",
"hidden": 0, "hidden": 0,
......
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.10686.10882.5973</string> </value> <value> <string>961.11865.36663.5376</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1501773055.42</float> <float>1501841031.15</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
return gadget.translateHtml(template({url_string: gadget.state.doc.url_string})); return gadget.translateHtml(template({url_string: gadget.state.doc.url_string}));
}) })
.push(function (html) { .push(function (html) {
gadget.props.element.innerHTML = html; gadget.element.querySelector('.template-view').innerHTML = html;
return gadget.getDeclaredGadget('form_view'); return gadget.getDeclaredGadget('form_view');
}) })
.push(function (form_gadget) { .push(function (form_gadget) {
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.9092.3808.5495</string> </value> <value> <string>961.11872.7503.60654</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1501746726.2</float> <float>1501841404.2</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -3,6 +3,12 @@ ...@@ -3,6 +3,12 @@
(function (window, rJS, RSVP) { (function (window, rJS, RSVP) {
"use strict"; "use strict";
var content_type = {
Spreadsheet: 'application/x-asc-spreadsheet',
Presentation: 'application/x-asc-presentation',
Text: 'application/x-asc-text'
};
rJS(window) rJS(window)
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// Acquired methods // Acquired methods
...@@ -24,6 +30,9 @@ ...@@ -24,6 +30,9 @@
}) })
.push(function (doc) { .push(function (doc) {
doc.modification_date = (new Date()).toISOString(); doc.modification_date = (new Date()).toISOString();
if (content_type.hasOwnProperty(doc.portal_type)) {
doc.content_type = content_type[doc.portal_type];
}
return gadget.jio_post(doc); return gadget.jio_post(doc);
}) })
.push(function () { .push(function () {
......
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.10686.10882.5973</string> </value> <value> <string>961.12010.33696.37768</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -288,7 +288,7 @@ ...@@ -288,7 +288,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1501773072.78</float> <float>1501849925.58</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