Commit 47ed2379 authored by Nicolas Delaby's avatar Nicolas Delaby

Pass some usefull arguments inside xml structure.

This patch allow to render OOoChart inside deferred_style (asynchronous)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24670 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 40bc8c1f
...@@ -400,10 +400,15 @@ class OOoChartWidget(Widget.Widget): ...@@ -400,10 +400,15 @@ class OOoChartWidget(Widget.Widget):
here = getattr(form, 'aq_parent', REQUEST) here = getattr(form, 'aq_parent', REQUEST)
REQUEST.set('render_prefix', render_prefix) REQUEST.set('render_prefix', render_prefix)
#needed to update REQUEST #needed to update REQUEST
self.getArgumentDict(field, REQUEST) argument_dict = self.getArgumentDict(field, REQUEST)
content = ''' from xml.marshal.generic import dumps
<office:include path="%s/ERP5Site_buildChart" xlink:type="simple" xlink:actuate="onLoad" xlink:show="embed"/> dump_args = dumps(argument_dict)
''' % here.getPath() #remove xml declaration (first processing node)
dump_args = dump_args[dump_args.index('?>')+2:]
content = '''<office:include path="%s/ERP5Site_buildChart"
xlink:type="simple" xlink:actuate="onLoad"
xlink:show="embed">%s</office:include>
''' % (here.getPath(), dump_args)
return content return content
......
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