Updated table attributes
authorThierry Florac <thierry.florac@onf.fr>
Thu, 14 Jun 2018 10:34:26 +0200
changeset 678 259e16f7189d
parent 677 d4d704d82df7
child 679 33b49c98c47e
Updated table attributes
src/pyams_content/component/association/zmi/__init__.py
--- a/src/pyams_content/component/association/zmi/__init__.py	Thu Jun 14 09:16:23 2018 +0200
+++ b/src/pyams_content/component/association/zmi/__init__.py	Thu Jun 14 10:34:26 2018 +0200
@@ -121,13 +121,12 @@
         target = get_parent(self.context, IAssociationContainerTarget)
         container = registry.getAdapter(target, IAssociationContainer, name=self.associations_name)
         attributes = super(AssociationsTable, self).data_attributes
-        attributes['table'] = {
-            'id': self.id,
+        attributes.setdefault('table', {}).update({
             'data-ams-location': absolute_url(container, self.request),
             'data-ams-tablednd-drag-handle': 'td.sorter',
             'data-ams-tablednd-drop-target': 'set-associations-order.json',
             'data-ams-visibility-switcher': 'switch-association-visibility.json'
-        }
+        })
         return attributes
 
     @reify