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 |