src/pyams_content/component/paragraph/zmi/html.py
changeset 180 7fd070302377
parent 175 fb51fb6d6129
child 192 8a16d2f507d7
equal deleted inserted replaced
179:fb7c5f27e8a3 180:7fd070302377
   141     """HTML paragraph properties edit form, JSON renderer"""
   141     """HTML paragraph properties edit form, JSON renderer"""
   142 
   142 
   143     def get_ajax_output(self, changes):
   143     def get_ajax_output(self, changes):
   144         output = super(HTMLParagraphPropertiesAJAXEditForm, self).get_ajax_output(changes)
   144         output = super(HTMLParagraphPropertiesAJAXEditForm, self).get_ajax_output(changes)
   145         if 'body' in changes.get(IHTMLParagraph, ()):
   145         if 'body' in changes.get(IHTMLParagraph, ()):
   146             associations_table = AssociationsTable(self.context, self.request, None)
   146             associations_table = AssociationsTable(self.context, self.request)
   147             associations_table.update()
   147             associations_table.update()
   148             output.setdefault('events', []).append({
   148             output.setdefault('events', []).append({
   149                 'event': 'PyAMS_content.changed_item',
   149                 'event': 'PyAMS_content.changed_item',
   150                 'options': {'object_type': 'associations',
   150                 'options': {'object_type': 'associations',
   151                             'object_name': associations_table.id,
   151                             'object_name': associations_table.id,
   175     """HTML paragraph inner edit form, JSON renderer"""
   175     """HTML paragraph inner edit form, JSON renderer"""
   176 
   176 
   177     def get_ajax_output(self, changes):
   177     def get_ajax_output(self, changes):
   178         output = super(HTMLParagraphInnerAJAXEditForm, self).get_ajax_output(changes)
   178         output = super(HTMLParagraphInnerAJAXEditForm, self).get_ajax_output(changes)
   179         if 'body' in changes.get(IHTMLParagraph, ()):
   179         if 'body' in changes.get(IHTMLParagraph, ()):
   180             associations_table = AssociationsTable(self.context, self.request, None)
   180             associations_table = AssociationsTable(self.context, self.request)
   181             associations_table.update()
   181             associations_table.update()
   182             output.setdefault('events', []).append({
   182             output.setdefault('events', []).append({
   183                 'event': 'PyAMS_content.changed_item',
   183                 'event': 'PyAMS_content.changed_item',
   184                 'options': {'object_type': 'associations',
   184                 'options': {'object_type': 'associations',
   185                             'object_name': associations_table.id,
   185                             'object_name': associations_table.id,