HU a datatables-hez

This commit is contained in:
2025-03-19 09:59:42 +01:00
parent 2fd147bb36
commit f74922d01e
10 changed files with 78 additions and 18 deletions
@@ -32,10 +32,12 @@
</div>
</form>
</div>
<br />
<div class="card shadow p-4">
<div class="d-flex justify-content-end">
<button class="btn btn-primary float-right">Új elem hozzáadása</button>
<button class="btn btn-primary float-right new-btn" data-bs-toggle="tooltip" data-bs-placement="top" title="Új elem hozzáadása">
<i class="bi bi-plus-square"></i>
</button>
</div>
<table id="tbCheckPointsEditPage" class="table table-bordered table-hover table-sm" style="width:100%">
<thead class="table-primary">
@@ -89,15 +91,16 @@
}
],
processing:true
processing:true,
language: { url: '//cdn.datatables.net/plug-ins/2.2.2/i18n/hu.json',}
});
$('#tbCheckPointsEditPage').on('click', '.edit-btn', function ()
{
const row = table.row($(this).closest('tr')).data();
window.location.href = `@Url.Page("./CheckListTemplateRowEditPage")?id=${row.id}`;
});
$('#tbCheckPointsEditPage').on('click', '.delete-btn', function ()
{
const row = table.row($(this).closest('tr')).data();
@@ -112,7 +115,7 @@
}
});
});
$("#saveCheckPoint").click(function () {
const csrfToken = document.querySelector('meta[name="csrf-token"]').getAttribute('content');
var formData = getFormAsNestedObject('#checkPointForm');
@@ -59,7 +59,8 @@
}
],
processing:true
processing:true,
language: { url: '//cdn.datatables.net/plug-ins/2.2.2/i18n/hu.json',}
});
$('#tbCheckPointsPage').on('click', '.edit-btn', function ()
@@ -54,7 +54,8 @@
}
],
processing:true
processing:true,
language: { url: '//cdn.datatables.net/plug-ins/2.2.2/i18n/hu.json',}
});
$('#tbEquipmentsPage').on('click', '.edit-btn', function ()
@@ -54,7 +54,8 @@
}
],
processing:true
processing:true,
language: { url: '//cdn.datatables.net/plug-ins/2.2.2/i18n/hu.json',}
});
$('#tbLocationsPage').on('click', '.edit-btn', function ()