Commit e36b2672 authored by Vincent Bechu's avatar Vincent Bechu

[erp5_officejs_ooffice] Fix onlyoffice preview

parent c12ac82c
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
jio_key: options.jio_key, jio_key: options.jio_key,
doc: options.doc, doc: options.doc,
editable: options.editable ? 1 : 0, editable: options.editable ? 1 : 0,
content_editable: options.doc.content_type.indexOf("application/x-asc") === 0 content_editable: options.doc.content_type === undefined ||
options.doc.content_type.indexOf("application/x-asc") === 0
}); });
}) })
......
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.16089.23302.24541</string> </value> <value> <string>961.60727.23534.13636</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1502094321.38</float> <float>1504774392.99</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
jio_key: options.jio_key, jio_key: options.jio_key,
doc: options.doc, doc: options.doc,
editable: options.editable ? 1 : 0, editable: options.editable ? 1 : 0,
content_editable: options.doc.content_type.indexOf("application/x-asc") === 0 content_editable: options.doc.content_type === undefined ||
options.doc.content_type.indexOf("application/x-asc") === 0
}); });
}) })
...@@ -80,7 +81,7 @@ ...@@ -80,7 +81,7 @@
}); });
}) })
.push(function (blob) { .push(function (blob) {
if (gadget.state.editable) { if (gadget.state.content_editable) {
return jIO.util.readBlobAsDataURL(blob); return jIO.util.readBlobAsDataURL(blob);
} }
return jIO.util.readBlobAsText(blob); return jIO.util.readBlobAsText(blob);
......
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.12100.37362.16213</string> </value> <value> <string>961.60755.54052.8584</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1502094341.35</float> <float>1504774427.5</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
jio_key: options.jio_key, jio_key: options.jio_key,
doc: options.doc, doc: options.doc,
editable: options.editable ? 1 : 0, editable: options.editable ? 1 : 0,
content_editable: options.doc.content_type.indexOf("application/x-asc") === 0 content_editable: options.doc.content_type === undefined ||
options.doc.content_type.indexOf("application/x-asc") === 0
}); });
}) })
...@@ -80,7 +81,7 @@ ...@@ -80,7 +81,7 @@
}); });
}) })
.push(function (blob) { .push(function (blob) {
if (gadget.state.editable) { if (gadget.state.content_editable) {
return jIO.util.readBlobAsDataURL(blob); return jIO.util.readBlobAsDataURL(blob);
} }
return jIO.util.readBlobAsText(blob); return jIO.util.readBlobAsText(blob);
......
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.12100.24849.23552</string> </value> <value> <string>961.60756.26015.65006</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1502094352.53</float> <float>1504774375.76</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