src/pyams_content/component/illustration/zmi/paragraph.py
changeset 175 fb51fb6d6129
parent 160 ff4fc5786058
child 178 1f3b274d8a76
--- a/src/pyams_content/component/illustration/zmi/paragraph.py	Tue Sep 19 13:43:54 2017 +0200
+++ b/src/pyams_content/component/illustration/zmi/paragraph.py	Wed Sep 20 12:11:23 2017 +0200
@@ -170,14 +170,15 @@
         if 'data' in updated:
             # we have to commit transaction to be able to handle blobs...
             ITransactionManager(self.context).get().commit()
-            context = IIllustrationParagraph(self.context)
-            form = IllustrationInnerEditForm(context, self.request)
+            form = IllustrationInnerEditForm(self.context, self.request)
             form.update()
-            output.setdefault('callbacks', []).append({
-                'callback': 'PyAMS_content.illustration.afterUpdateCallback',
-                'options': {'parent': '{0}_{1}_{2}'.format(self.context.__class__.__name__,
-                                                           getattr(form.getContent(), '__name__', 'noname').replace('++', ''),
-                                                           form.id),
+            output.setdefault('events', []).append({
+                'event': 'PyAMS_content.changed_item',
+                'options': {'object_type': 'illustration',
+                            'object_name': '{0}_{1}_{2}'.format(
+                                self.context.__class__.__name__,
+                                getattr(form.getContent(), '__name__', 'noname').replace('++', ''),
+                                form.id),
                             'form': form.render()}
             })
         return output