Updated refresh events
authorThierry Florac <tflorac@ulthar.net>
Sun, 26 Nov 2017 09:56:24 +0100
changeset 290 3c4cf9537da7
parent 289 5ab6ce5c00fb
child 291 ec12c83bc8a5
Updated refresh events
src/pyams_content/shared/form/zmi/field.py
--- a/src/pyams_content/shared/form/zmi/field.py	Sun Nov 26 09:56:01 2017 +0100
+++ b/src/pyams_content/shared/form/zmi/field.py	Sun Nov 26 09:56:24 2017 +0100
@@ -327,10 +327,12 @@
         output = super(FormFieldPropertiesAJAXEditForm, self).get_ajax_output(changes)
         if 'label' in changes.get(IFormField, ()):
             output.setdefault('events', []).append({
-                'event': 'PyAMS_content.changed_item',
-                'options': {'handler': 'PyAMS_content.fields.refreshField',
-                            'object_name': self.context.__name__,
-                            'title': II18n(self.context).query_attribute('label', request=self.request),
-                            'visible': self.context.visible}
+                'event': 'myams.refresh',
+                'options': {
+                    'handler': 'PyAMS_content.fields.refreshField',
+                    'object_name': self.context.__name__,
+                    'title': II18n(self.context).query_attribute('label', request=self.request),
+                    'visible': self.context.visible
+                }
             })
         return output