Commit ea28b5f8 authored by Boris Kocherov's avatar Boris Kocherov

erp5_officejs: add spreadsheet gadget

Creating a renderjs gadget that follows a standard interface
to get, edit and save spreadsheet document using jio. Spreadsheet
gadget is based on onlyOffice editor.
Format of spreadsheet document that can be edited in renderjs gadget
is xlsy. At present the spreadsheet document conversion from any
(xlsx, ods, etc) to xlsy is done automatically during first
synchronization with gadget by cloudooo.
parent 0b5c9e69

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string># request = container.REQUEST\n
# if request.form.get(\'view\', None) == \'jio_view\':\n
portal_type = context.getPortalType()\n
filename = context.getFilename()\n
if portal_type == \'Spreadsheet\' and not filename.endswith(\'.xlsy\'):\n
# return context.convert(format=\'xlsy\')\n
metadata, data = context.convert(format=\'xlsy\')\n
context.setData(data)\n
context.setContentType(metadata)\n
context.setFilename(\'.\'.join(filename.split(\'.\')[:-1]) + \'.xlsy\')\n
else:\n
data = context.getData()\n
# return context.Document_viewAsJio()\n
return data\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Document_convertForJio</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ooffice</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>