--- a/src/pyams_content/component/paragraph/zmi/html.py Sun Nov 26 09:50:28 2017 +0100
+++ b/src/pyams_content/component/paragraph/zmi/html.py Sun Nov 26 09:51:48 2017 +0100
@@ -145,18 +145,24 @@
viewlet = ParagraphTitleToolbarViewletManager(parent, self.request, table)
viewlet.update()
output.setdefault('events', []).append({
- 'event': 'PyAMS_content.changed_item',
- 'options': {'handler': 'PyAMS_content.paragraphs.updateToolbar',
- 'object_name': self.context.__name__,
- 'toolbar_tag': viewlet.render()}})
+ 'event': 'myams.refresh',
+ 'options': {
+ 'handler': 'PyAMS_content.paragraphs.updateToolbar',
+ 'object_name': self.context.__name__,
+ 'toolbar_tag': viewlet.render()
+ }
+ })
# refresh associations table
associations_table = AssociationsTable(self.context, self.request)
associations_table.update()
output.setdefault('events', []).append({
- 'event': 'PyAMS_content.changed_item',
- 'options': {'handler': 'PyAMS_content.associations.refreshAssociations',
- 'object_name': associations_table.id,
- 'table': associations_table.render()}})
+ 'event': 'myams.refresh',
+ 'options': {
+ 'handler': 'PyAMS_content.associations.refreshAssociations',
+ 'object_id': associations_table.id,
+ 'table': associations_table.render()
+ }
+ })
return output
@@ -190,18 +196,23 @@
viewlet = ParagraphTitleToolbarViewletManager(parent, self.request, table)
viewlet.update()
output.setdefault('events', []).append({
- 'event': 'PyAMS_content.changed_item',
- 'options': {'handler': 'PyAMS_content.paragraphs.updateToolbar',
- 'object_name': self.context.__name__,
- 'toolbar_tag': viewlet.render()}})
+ 'event': 'myams.refresh',
+ 'options': {
+ 'handler': 'PyAMS_content.paragraphs.updateToolbar',
+ 'object_name': self.context.__name__,
+ 'toolbar_tag': viewlet.render()
+ }
+ })
# refresh associations table
associations_table = AssociationsTable(self.context, self.request)
associations_table.update()
output.setdefault('events', []).append({
- 'event': 'PyAMS_content.changed_item',
- 'options': {'handler': 'PyAMS_content.associations.refreshAssociations',
- 'object_name': associations_table.id,
- 'table': associations_table.render()}
+ 'event': 'myams.refresh',
+ 'options': {
+ 'handler': 'PyAMS_content.associations.refreshAssociations',
+ 'object_id': associations_table.id,
+ 'table': associations_table.render()
+ }
})
return output