Fix multiple typo in datatables twig variables

This commit is contained in:
Stephen Abello
2021-06-14 11:56:53 +02:00
parent 18a4867b4d
commit 8ef43452f8

View File

@@ -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();