Updated AJAX output
authorThierry Florac <thierry.florac@onf.fr>
Tue, 27 Nov 2018 15:35:22 +0100
changeset 1124 de6e9b0637b6
parent 1123 6f299ad6e72f
child 1125 7f0cb6e407fc
Updated AJAX output
src/pyams_content/component/illustration/zmi/paragraph.py
--- a/src/pyams_content/component/illustration/zmi/paragraph.py	Tue Nov 27 14:57:36 2018 +0100
+++ b/src/pyams_content/component/illustration/zmi/paragraph.py	Tue Nov 27 15:35:22 2018 +0100
@@ -17,6 +17,7 @@
 from z3c.form.interfaces import INPUT_MODE
 from zope.interface import implementer
 
+from pyams_content.component.illustration import IBasicIllustration
 from pyams_content.component.illustration.interfaces import IBasicIllustrationTarget, IIllustration, \
     IIllustrationParagraph, ILLUSTRATION_PARAGRAPH_TYPE
 from pyams_content.component.illustration.paragraph import Illustration
@@ -102,7 +103,7 @@
 
     def get_ajax_output(self, changes):
         output = super(self.__class__, self).get_ajax_output(changes)
-        if 'title' in changes.get(IIllustration, ()):
+        if 'title' in changes.get(IBasicIllustration, ()):
             output.setdefault('events', []).append(get_json_paragraph_refresh_event(self.context, self.request))
         return output
 
@@ -125,7 +126,7 @@
 
     def get_ajax_output(self, changes):
         output = super(self.__class__, self).get_ajax_output(changes)
-        updated = changes.get(IIllustration, ())
+        updated = changes.get(IBasicIllustration, ())
         if 'title' in updated:
             output.setdefault('events', []).append(get_json_paragraph_refresh_event(self.context, self.request))
         updated = changes.get(IIllustrationParagraph, ())