diff --git a/templates/base/components/datatable/layout.ready.js.twig b/templates/base/components/datatable/layout.ready.js.twig index 6e60592534..8fd2c7b5b9 100644 --- a/templates/base/components/datatable/layout.ready.js.twig +++ b/templates/base/components/datatable/layout.ready.js.twig @@ -18,7 +18,7 @@ if ($('#{{ oUIBlock.GetId() }}') != 'undefined' && $.fn.dataTable.isDataTable('# $('#{{ oUIBlock.GetId() }}').DataTable().destroy(false); } -var oTable{{ sListIfForVarSuffix }} = $('#{{ oUIBlock.GetId() }}').DataTable({ +var oTable{{ sListIDForVarSuffix }} = $('#{{ oUIBlock.GetId() }}').DataTable({ language: { processing: "{{ 'UI:Datatables:Language:Processing'|dict_s }}", search: "{{ 'UI:Datatables:Language:Search'|dict_s }}", @@ -187,7 +187,7 @@ var oTable{{ sListIfForVarSuffix }} = $('#{{ oUIBlock.GetId() }}').DataTable({ this.api().on('select', function (oEvent, dt, type, indexes) { if (bSelectAllowed{{ oUIBlock.GetId() }}) { - let aData = oTable{{ sListIfForVarSuffix }}.rows(indexes).data().toArray(); + let aData = oTable{{ sListIDForVarSuffix }}.rows(indexes).data().toArray(); if ($(this).closest('.ibo-panel--body').find('[name=selectionMode]').val() === "negative") { // Checking input @@ -224,7 +224,7 @@ var oTable{{ sListIfForVarSuffix }} = $('#{{ oUIBlock.GetId() }}').DataTable({ this.api().off('deselect').on('deselect', function (oEvent, dt, type, indexes) { if (bSelectAllowed{{ oUIBlock.GetId() }} ) { - let aData = oTable{{ sListIfForVarSuffix }}.rows(indexes).data().toArray(); + let aData = oTable{{ sListIDForVarSuffix }}.rows(indexes).data().toArray(); // Checking input $('#{{ oUIBlock.GetId() }} tbody tr:not(.selected) td:first-child input').prop('checked', false); // Saving values in temp array @@ -258,7 +258,7 @@ var oTable{{ sListIfForVarSuffix }} = $('#{{ oUIBlock.GetId() }}').DataTable({ this.api().off('select').on('select', function (oEvent, dt, type, indexes) { if (bSelectAllowed{{ oUIBlock.GetId() }} ) { - let aData = oTable{{ sListIfForVarSuffix }}.rows(indexes).data().toArray(); + let aData = oTable{{ sListIDForVarSuffix }}.rows(indexes).data().toArray(); // Checking input $('#{{ oUIBlock.GetId() }} tbody tr.selected td:first-child input').prop('checked', true); // Saving values in temp array @@ -277,7 +277,7 @@ var oTable{{ sListIfForVarSuffix }} = $('#{{ oUIBlock.GetId() }}').DataTable({ this.api().off('deselect').on('deselect', function (oEvent, dt, type, indexes) { if (bSelectAllowed{{ oUIBlock.GetId() }} ) { - let aData = oTable{{ sListIfForVarSuffix }}.rows(indexes).data().toArray(); + let aData = oTable{{ sListIDForVarSuffix }}.rows(indexes).data().toArray(); // Checking input $('#{{ oUIBlock.GetId() }} tr tbody tr:not(.selected) td:first-child input').prop('checked', false); @@ -300,7 +300,7 @@ var oTable{{ sListIfForVarSuffix }} = $('#{{ oUIBlock.GetId() }}').DataTable({ } }); -oTable{{ sListIfForVarSuffix }}.select(); +oTable{{ sListIDForVarSuffix }}.select();