--- a/src/pyams_content/component/illustration/zmi/paragraph.py Sun Nov 26 09:50:28 2017 +0100
+++ b/src/pyams_content/component/illustration/zmi/paragraph.py Sun Nov 26 09:51:48 2017 +0100
@@ -117,11 +117,13 @@
output = super(IllustrationPropertiesAJAXEditForm, self).get_ajax_output(changes)
if 'title' in changes.get(IIllustration, ()):
output.setdefault('events', []).append({
- 'event': 'PyAMS_content.changed_item',
- '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}
+ 'event': 'myams.refresh',
+ '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
+ }
})
return output
@@ -152,11 +154,13 @@
updated = changes.get(IIllustration, ())
if 'title' in updated:
output.setdefault('events', []).append({
- 'event': 'PyAMS_content.changed_item',
- '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}
+ 'event': 'myams.refresh',
+ '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
+ }
})
if 'data' in updated:
# we have to commit transaction to be able to handle blobs...
@@ -164,13 +168,14 @@
form = IllustrationInnerEditForm(self.context, self.request)
form.update()
output.setdefault('events', []).append({
- 'event': 'PyAMS_content.changed_item',
- 'options': {'handler': 'PyAMS_content.refreshForm',
- 'object_name': '{0}_{1}_{2}'.format(
- self.context.__class__.__name__,
- getattr(form.getContent(), '__name__', 'noname').replace('++', ''),
- form.id),
- 'form': form.render()}
+ 'event': 'myams.refresh',
+ 'options': {
+ 'object_id': '{0}_{1}_{2}'.format(
+ self.context.__class__.__name__,
+ getattr(form.getContent(), '__name__', 'noname').replace('++', ''),
+ form.id),
+ 'content': form.render()
+ }
})
return output