Change da77439 events to use DataTables builtin events instead of custom ones

This commit is contained in:
Stephen Abello
2021-02-22 13:36:26 +01:00
parent 9bbec47976
commit 2b69ca2f04
3 changed files with 2 additions and 10 deletions

View File

@@ -454,7 +454,7 @@ class TableDetailsAttachmentsRenderer extends AbstractAttachmentsRenderer
$sTableId = $oAttachmentTableBlock->GetId();
$this->oPage->add_script(
<<<JS
$('#$sTableId').on('inited drawn', function(){
$('#$sTableId').on('init.dt draw.dt', function(){
CombodoTooltip.InitAllNonInstantiatedTooltips($(this), true);
});
JS

View File

@@ -108,7 +108,6 @@ var oTable{{ sListId }} = $('#{{ oUIBlock.GetId() }}').DataTable({
{
$(this).closest('.dataTables_wrapper').find('.dataTables_paginate, .dataTables_info').show();
}
$('#{{ oUIBlock.GetId() }}').trigger('drawn');
},
{% endif %}
rowId: "id",
@@ -184,7 +183,6 @@ var oTable{{ sListId }} = $('#{{ oUIBlock.GetId() }}').DataTable({
this.parent().find('.dataTables_paginate').hide();
this.parent().find('.dataTables_length').hide();
}
$('#{{ oUIBlock.GetId() }}').trigger('inited');
}
});

View File

@@ -46,11 +46,5 @@ $('#{{ oUIBlock.GetId() }}').DataTable({
sortable: true
},
{% endfor %}
],
initComplete: function () {
$('#{{ oUIBlock.GetId() }}').trigger('inited');
},
drawCallback: function(){
$('#{{ oUIBlock.GetId() }}').trigger('drawn');
}
]
});