src/pyams_content/component/illustration/zmi/__init__.py
changeset 489 dcdb0ce828f8
parent 395 2a39b333a585
child 527 5dd1aa8bedd9
equal deleted inserted replaced
488:826448236ec9 489:dcdb0ce828f8
    98         if 'description' in self.widgets:
    98         if 'description' in self.widgets:
    99             self.widgets['description'].widget_css_class = 'textarea'
    99             self.widgets['description'].widget_css_class = 'textarea'
   100 
   100 
   101     def get_ajax_output(self, changes):
   101     def get_ajax_output(self, changes):
   102         output = super(IllustrationPropertiesInnerEditForm, self).get_ajax_output(changes)
   102         output = super(IllustrationPropertiesInnerEditForm, self).get_ajax_output(changes)
   103         illustration_changes = changes.get(IIllustration, ())
   103         updated = changes.get(IIllustration, ())
   104         if ('data' in illustration_changes) or ('renderer' in illustration_changes):
   104         if ('data' in updated) or ('renderer' in updated):
   105             # we have to commit transaction to be able to handle blobs...
   105             if 'data' in updated:
   106             ITransactionManager(self.context).get().commit()
   106                 # we have to commit transaction to be able to handle blobs...
       
   107                 ITransactionManager(self.context).get().commit()
   107             form = IllustrationPropertiesInnerEditForm(self.context, self.request)
   108             form = IllustrationPropertiesInnerEditForm(self.context, self.request)
   108             form.update()
   109             form.update()
   109             illustration = form.getContent()
   110             illustration = form.getContent()
   110             output.setdefault('events', []).append({
   111             output.setdefault('events', []).append({
   111                 'event': 'myams.refresh',
   112                 'event': 'myams.refresh',