--- a/src/pyams_content/component/paragraph/zmi/video.py Wed Jun 06 10:31:48 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/video.py Wed Jun 06 11:06:51 2018 +0200
@@ -29,7 +29,6 @@
from z3c.form.interfaces import INPUT_MODE
# import packages
-from pyams_content.component.association.zmi import AssociationsTable
from pyams_content.component.paragraph.video import VideoParagraph
from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphEditFormButtons
@@ -146,18 +145,6 @@
class VideoParagraphPropertiesAJAXEditForm(BaseParagraphAJAXEditForm, VideoParagraphPropertiesEditForm):
"""Video paragraph properties edit form, JSON renderer"""
- def get_ajax_output(self, changes):
- output = super(VideoParagraphPropertiesAJAXEditForm, self).get_ajax_output(changes)
- if 'body' in changes.get(IVideoParagraph, ()):
- 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()}})
- return output
-
@adapter_config(context=(IVideoParagraph, IPyAMSLayer), provides=IParagraphInnerEditor)
@implementer(IInnerForm, IPropertiesEditForm, IAssociationsParentForm)
@@ -183,15 +170,6 @@
def get_ajax_output(self, changes):
output = super(VideoParagraphPropertiesInnerAJAXEditForm, self).get_ajax_output(changes)
updated = changes.get(IVideoParagraph, ())
- if 'body' in updated:
- 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()}
- })
if 'data' in updated:
# we have to commit transaction to be able to handle blobs...
ITransactionManager(self.context).get().commit()