equal
deleted
inserted
replaced
144 |
144 |
145 _header = _("Data type label") |
145 _header = _("Data type label") |
146 |
146 |
147 def renderCell(self, item): |
147 def renderCell(self, item): |
148 return '<span data-ams-stop-propagation="true" ' \ |
148 return '<span data-ams-stop-propagation="true" ' \ |
149 ' data-ams-click-handler="PyAMS_content.types.switchSubtypes">' \ |
149 ' data-ams-click-handler="MyAMS.skin.switchCellContent" ' \ |
|
150 ' data-ams-switch-handler="get-subtypes-table.json" ' \ |
|
151 ' data-ams-switch-target=".subtypes">' \ |
150 ' <span class="small hint" title="{hint}" data-ams-hint-gravity="e">' \ |
152 ' <span class="small hint" title="{hint}" data-ams-hint-gravity="e">' \ |
151 ' <i class="fa fa-plus-square-o switch"></i>' \ |
153 ' <i class="fa fa-plus-square-o switch"></i>' \ |
152 ' </span>' \ |
154 ' </span>' \ |
153 '</span> <span class="title">{title}</span>' \ |
155 '</span> <span class="title">{title}</span>' \ |
154 '<div class="inner-table-form subtypes margin-x-10 margin-bottom-0 padding-left-5"></div>'.format( |
156 '<div class="inner-table-form subtypes margin-x-10 margin-bottom-0 padding-left-5"></div>'.format( |
313 @property |
315 @property |
314 def data_attributes(self): |
316 def data_attributes(self): |
315 attributes = super(DatatypeSubtypesTable, self).data_attributes |
317 attributes = super(DatatypeSubtypesTable, self).data_attributes |
316 attributes['table'] = { |
318 attributes['table'] = { |
317 'id': self.id, |
319 'id': self.id, |
318 'data-ams-plugins': 'pyams_content', |
|
319 'data-ams-plugin-pyams_content-src': get_resource_path(pyams_content), |
|
320 'data-ams-location': absolute_url(self.context, self.request), |
320 'data-ams-location': absolute_url(self.context, self.request), |
321 'data-ams-tablednd-drag-handle': 'td.sorter', |
321 'data-ams-tablednd-drag-handle': 'td.sorter', |
322 'data-ams-tablednd-drop-target': 'set-subtypes-order.json' |
322 'data-ams-tablednd-drop-target': 'set-subtypes-order.json' |
323 } |
323 } |
324 attributes.setdefault('tr', {}).update({'data-ams-stop-propagation': 'true'}) |
324 attributes.setdefault('tr', {}).update({'data-ams-stop-propagation': 'true'}) |