--- a/src/pyams_content/component/illustration/zmi/__init__.py Tue Sep 19 13:43:54 2017 +0200
+++ b/src/pyams_content/component/illustration/zmi/__init__.py Wed Sep 20 12:11:23 2017 +0200
@@ -122,14 +122,15 @@
if 'data' in changes.get(IIllustration, ()):
# we have to commit transaction to be able to handle blobs...
ITransactionManager(self.context).get().commit()
- context = IIllustration(self.context)
- form = IllustrationPropertiesInnerEditForm(context, self.request)
+ form = IllustrationPropertiesInnerEditForm(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