Updated refresh events
authorThierry Florac <tflorac@ulthar.net>
Sun, 26 Nov 2017 09:57:42 +0100
changeset 293 401794fc244b
parent 292 c8704817db4a
child 294 8742c8ac126c
Updated refresh events
src/pyams_content/shared/imagemap/zmi/paragraph.py
--- a/src/pyams_content/shared/imagemap/zmi/paragraph.py	Sun Nov 26 09:57:21 2017 +0100
+++ b/src/pyams_content/shared/imagemap/zmi/paragraph.py	Sun Nov 26 09:57:42 2017 +0100
@@ -134,13 +134,14 @@
             form.update()
             content = form.getContent()
             output.setdefault('events', []).append({
-                'event': 'PyAMS_content.changed_item',
-                'options': {'handler': 'PyAMS_content.refreshForm',
-                            'object_name': '{0}_{1}_{2}'.format(
-                                content.__class__.__name__,
-                                getattr(content, '__name__', 'noname').replace('++', ''),
-                                form.id),
-                            'form': form.render()}
+                'event': 'myams.refresh',
+                'options': {
+                    'object_id': '{0}_{1}_{2}'.format(
+                        content.__class__.__name__,
+                        getattr(content, '__name__', 'noname').replace('++', ''),
+                        form.id),
+                    'content': form.render()
+                }
             })
         return output