src/pyams_skin/table.py
changeset 29 cb1e1855f1aa
parent 25 23d78e06822d
child 34 8b517db52592
equal deleted inserted replaced
28:460e9a649bd0 29:cb1e1855f1aa
    63 
    63 
    64     cssClasses = {'table': 'table table-bordered table-striped table-hover table-tight datatable'}
    64     cssClasses = {'table': 'table table-bordered table-striped table-hover table-tight datatable'}
    65 
    65 
    66     @property
    66     @property
    67     def data_attributes(self):
    67     def data_attributes(self):
    68         return {'tr': {'id': lambda x: '{0}::{1}'.format(self.id, x.__name__),
    68         return {'tr': {'id': lambda x: '{0}::{1}'.format(self.id, getattr(x, '__name__', '')),
    69                        'data-ams-element-name': lambda x: x.__name__,
    69                        'data-ams-element-name': lambda x: getattr(x, '__name__', None),
    70                        'data-ams-url': lambda x: getattr(get_element_editor(self, x), 'url', ''),
    70                        'data-ams-url': lambda x: getattr(get_element_editor(self, x), 'url', None),
    71                        'data-toggle': lambda x: 'modal' if getattr(get_element_editor(self, x), 'modal_target', None) else None}}
    71                        'data-toggle': lambda x: 'modal' if getattr(get_element_editor(self, x), 'modal_target', None) else None}}
    72 
    72 
    73     batchSize = 10000
    73     batchSize = 10000
    74     startBatchingAt = 10000
    74     startBatchingAt = 10000
    75 
    75