src/pyams_content/component/association/zmi/__init__.py
changeset 453 54b33f61a697
parent 384 d433c8c46ec9
child 454 1bd9d3cc2a7b
equal deleted inserted replaced
452:7251fb345939 453:54b33f61a697
   127     @property
   127     @property
   128     def data_attributes(self):
   128     def data_attributes(self):
   129         attributes = super(AssociationsTable, self).data_attributes
   129         attributes = super(AssociationsTable, self).data_attributes
   130         attributes['table'] = {'id': self.id,
   130         attributes['table'] = {'id': self.id,
   131                                'data-ams-plugins': 'pyams_content',
   131                                'data-ams-plugins': 'pyams_content',
   132                                'data-ams-plugin-pyams_content-src':
   132                                'data-ams-plugin-pyams_content-src': get_resource_path(pyams_content),
   133                                    get_resource_path(pyams_content),
       
   134                                'data-ams-location': absolute_url(IAssociationContainer(self.context), self.request),
   133                                'data-ams-location': absolute_url(IAssociationContainer(self.context), self.request),
   135                                'data-ams-tablednd-drag-handle': 'td.sorter',
   134                                'data-ams-tablednd-drag-handle': 'td.sorter',
   136                                'data-ams-tablednd-drop-target': 'set-associations-order.json'}
   135                                'data-ams-tablednd-drop-target': 'set-associations-order.json'}
   137         attributes.setdefault('tr', {}).setdefault('data-ams-delete-target', 'delete-association.json')
   136         attributes.setdefault('tr', {}).setdefault('data-ams-delete-target', 'delete-association.json')
   138         return attributes
   137         return attributes