N°3648 - FIx click on link in datatable and display of buttons in search form

This commit is contained in:
acognet
2021-03-04 11:37:03 +01:00
parent 45981c1941
commit 72f6305320
3 changed files with 23 additions and 16 deletions

View File

@@ -47,6 +47,7 @@ else
maxHeight{{ sListId }} = maxHeight{{ sListId }} -50;
}
var oTable{{ sListId }} = $('#{{ oUIBlock.GetId() }}').DataTable({
language: {
processing: "{{ 'UI:Datatables:Language:Processing'|dict_s }}",
@@ -108,6 +109,11 @@ var oTable{{ sListId }} = $('#{{ oUIBlock.GetId() }}').DataTable({
{
$(this).closest('.dataTables_wrapper').find('.dataTables_paginate, .dataTables_info').show();
}
$("#{{ oUIBlock.GetId() }} a").on('click', function (e) {
//disable select action when there is a link
e.stopPropagation();
});
},
{% endif %}
rowId: "id",
@@ -188,6 +194,7 @@ var oTable{{ sListId }} = $('#{{ oUIBlock.GetId() }}').DataTable({
$('#{{ oUIBlock.GetId() }}').closest(".dataTables_scrollBody").css('max-height', maxHeight{{ sListId }}-100);
{% if oUIBlock.GetOption("select_mode") is not empty %}
{% if oUIBlock.GetOption("select_mode") != "single" %}
oTable{{ sListId }}.off('select').on('select', function (oEvent, dt, type, indexes) {