src/pyams_content/component/association/zmi/__init__.py
changeset 283 9139536eab90
parent 257 429496aab23b
child 342 d4237323fa56
equal deleted inserted replaced
282:2990223a5b7f 283:9139536eab90
    60         associations_table = AssociationsTable(self.context, self.request)
    60         associations_table = AssociationsTable(self.context, self.request)
    61         associations_table.update()
    61         associations_table.update()
    62         return {'status': 'success',
    62         return {'status': 'success',
    63                 'message': self.request.localizer.translate(_("Association was correctly added.")),
    63                 'message': self.request.localizer.translate(_("Association was correctly added.")),
    64                 'events': [{
    64                 'events': [{
    65                     'event': 'PyAMS_content.changed_item',
    65                     'event': 'myams.refresh',
    66                     'options': {
    66                     'options': {
    67                         'handler': 'PyAMS_content.associations.refreshAssociations',
    67                         'handler': 'PyAMS_content.associations.refreshAssociations',
    68                         'object_name': associations_table.id,
    68                         'object_id': associations_table.id,
    69                         'table': associations_table.render()
    69                         'table': associations_table.render()
    70                     }
    70                     }
    71                 }]}
    71                 }]}
    72 
    72 
    73 
    73 
    79         associations_table = AssociationsTable(target, self.request)
    79         associations_table = AssociationsTable(target, self.request)
    80         associations_table.update()
    80         associations_table.update()
    81         return {'status': 'success',
    81         return {'status': 'success',
    82                 'message': self.request.localizer.translate(self.successMessage),
    82                 'message': self.request.localizer.translate(self.successMessage),
    83                 'events': [{
    83                 'events': [{
    84                     'event': 'PyAMS_content.changed_item',
    84                     'event': 'myams.refresh',
    85                     'options': {
    85                     'options': {
    86                         'handler': 'PyAMS_content.associations.refreshAssociations',
    86                         'handler': 'PyAMS_content.associations.refreshAssociations',
    87                         'object_name': associations_table.id,
    87                         'object_id': associations_table.id,
    88                         'table': associations_table.render()
    88                         'table': associations_table.render()
    89                     }
    89                     }
    90                 }]}
    90                 }]}
    91 
    91 
    92 
    92 
   292     viewlet = ParagraphTitleToolbarViewletManager(parent, request, table)
   292     viewlet = ParagraphTitleToolbarViewletManager(parent, request, table)
   293     viewlet.update()
   293     viewlet.update()
   294     return {'status': 'success',
   294     return {'status': 'success',
   295             'handle_json': True,
   295             'handle_json': True,
   296             'events': [{
   296             'events': [{
   297                 'event': 'PyAMS_content.changed_item',
   297                 'event': 'myams.refresh',
   298                 'options': {'handler': 'PyAMS_content.paragraphs.updateToolbar',
   298                 'options': {'handler': 'PyAMS_content.paragraphs.updateToolbar',
   299                             'object_name': parent.__name__,
   299                             'object_name': parent.__name__,
   300                             'toolbar_tag': viewlet.render()}
   300                             'toolbar_tag': viewlet.render()}
   301             }]}
   301             }]}
   302 
   302