--- a/src/pyams_content/shared/common/zmi/types.py Sun Nov 26 09:55:00 2017 +0100
+++ b/src/pyams_content/shared/common/zmi/types.py Sun Nov 26 09:55:24 2017 +0100
@@ -521,16 +521,18 @@
def get_ajax_output(self, changes):
subtypes_table = DatatypeSubtypesTable(self.context, self.request)
subtypes_table.update()
- return {'status': 'success',
- 'message': self.request.localizer.translate(_("Subtype was correctly added.")),
- 'events': [{
- 'event': 'PyAMS_content.changed_item',
- 'options': {
- 'handler': 'PyAMS_content.types.refreshSubtypes',
- 'object_name': subtypes_table.id,
- 'table': subtypes_table.render()
- }
- }]}
+ return {
+ 'status': 'success',
+ 'message': self.request.localizer.translate(_("Subtype was correctly added.")),
+ 'events': [{
+ 'event': 'myams.refresh',
+ 'options': {
+ 'handler': 'MyAMS.skin.refreshTable',
+ 'object_id': subtypes_table.id,
+ 'table': subtypes_table.render()
+ }
+ }]
+ }
@pagelet_config(name='properties.html', context=ISubType, layer=IPyAMSLayer, permission=MANAGE_TOOL_PERMISSION)
@@ -563,15 +565,17 @@
target = get_parent(self.context, IDataType)
subtypes_table = DatatypeSubtypesTable(target, self.request)
subtypes_table.update()
- return {'status': 'success',
- 'message': self.request.localizer.translate(self.successMessage),
- 'events': [{
- 'event': 'PyAMS_content.changed_item',
- 'options': {
- 'handler': 'PyAMS_content.types.refreshSubtypes',
- 'object_name': subtypes_table.id,
- 'table': subtypes_table.render()
- }
- }]}
+ return {
+ 'status': 'success',
+ 'message': self.request.localizer.translate(self.successMessage),
+ 'events': [{
+ 'event': 'myams.refresh',
+ 'options': {
+ 'handler': 'MyAMS.skin.refreshTable',
+ 'object_id': subtypes_table.id,
+ 'table': subtypes_table.render()
+ }
+ }]
+ }
else:
return super(DataSubtypeAJAXEditForm, self).get_ajax_output(changes)