Updated JSON responses
authorThierry Florac <thierry.florac@onf.fr>
Fri, 13 Oct 2017 08:13:59 +0200
changeset 207 e585a41adea1
parent 206 90e3fa165ce1
child 208 9345af0a1b4c
Updated JSON responses
src/pyams_content/component/illustration/zmi/paragraph.py
--- a/src/pyams_content/component/illustration/zmi/paragraph.py	Fri Oct 13 08:13:10 2017 +0200
+++ b/src/pyams_content/component/illustration/zmi/paragraph.py	Fri Oct 13 08:13:59 2017 +0200
@@ -126,7 +126,7 @@
         if 'title' in changes.get(IIllustration, ()):
             output.setdefault('events', []).append({
                 'event': 'PyAMS_content.changed_item',
-                'options': {'object_type': 'paragraph',
+                'options': {'handler': 'PyAMS_content.paragraphs.refreshParagraph',
                             'object_name': self.context.__name__,
                             'title': II18n(self.context).query_attribute('title', request=self.request),
                             'visible': self.context.visible}
@@ -161,7 +161,7 @@
         if 'title' in updated:
             output.setdefault('events', []).append({
                 'event': 'PyAMS_content.changed_item',
-                'options': {'object_type': 'paragraph',
+                'options': {'handler': 'PyAMS_content.paragraphs.refreshParagraph',
                             'object_name': self.context.__name__,
                             'title': II18n(self.context).query_attribute('title', request=self.request),
                             'visible': self.context.visible}
@@ -173,7 +173,7 @@
             form.update()
             output.setdefault('events', []).append({
                 'event': 'PyAMS_content.changed_item',
-                'options': {'object_type': 'form',
+                'options': {'handler': 'PyAMS_content.refreshForm',
                             'object_name': '{0}_{1}_{2}'.format(
                                 self.context.__class__.__name__,
                                 getattr(form.getContent(), '__name__', 'noname').replace('++', ''),