mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
migrates adminAnrechnungData and adminAnrechnung.js to use tabulator5
This commit is contained in:
@@ -24,13 +24,12 @@ $filterWidgetArray = array(
|
||||
layout: "fitDataFill",
|
||||
persistentLayout:true,
|
||||
autoResize: false, // prevent auto resizing of table (false to allow adapting table size when cols are (de-)activated
|
||||
headerFilterPlaceholder: " ",
|
||||
index: "anrechnungszeitraum_id", // assign specific column as unique id (important for row indexing)
|
||||
selectable: false, // allow row selection
|
||||
tableWidgetHeader: true,
|
||||
tableBuilt: function(){
|
||||
func_tableBuilt(this);
|
||||
},
|
||||
columnDefaults:{
|
||||
headerFilterPlaceholder: " ",
|
||||
}
|
||||
}',
|
||||
'datasetRepFieldsDefs' => '{
|
||||
anrechnungszeitraum_id: {visible: false, headerFilter:"input"},
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
// Add Edit and Update Buttons to table rows
|
||||
function func_tableBuilt(table) {
|
||||
table.addColumn(
|
||||
table.tabulator("addColumn",
|
||||
{
|
||||
title: "Aktion",
|
||||
align: "center",
|
||||
@@ -39,7 +39,7 @@ var addActionButtons = function(cell) {
|
||||
editBtn.innerHTML = "<i class=\"fa fa-edit\"></i>";
|
||||
editBtn.classList.add("azrEditBtn");
|
||||
editBtn.classList.add("btn");
|
||||
editBtn.classList.add("btn-default");
|
||||
editBtn.classList.add("btn-outline-secondary");
|
||||
editBtn.addEventListener("click", function(){
|
||||
adminAnrechnung.editRow(cell);
|
||||
});
|
||||
@@ -52,7 +52,7 @@ var addActionButtons = function(cell) {
|
||||
delBtn.innerHTML = "<i class=\"fa fa-times\"></i>";
|
||||
delBtn.classList.add("azrDeleteBtn");
|
||||
delBtn.classList.add("btn");
|
||||
delBtn.classList.add("btn-default");
|
||||
delBtn.classList.add("btn-outline-secondary");
|
||||
delBtn.style.marginLeft = '5px';
|
||||
delBtn.addEventListener("click", function(){
|
||||
adminAnrechnung.deleteRow(cell);
|
||||
@@ -70,6 +70,11 @@ var addActionButtons = function(cell) {
|
||||
|
||||
$(function () {
|
||||
|
||||
$(document).on("tableInit", function(event,tabulatorInstance) {
|
||||
// tablutBuilt has to be attached as a callback the the tabulator in tabulator5
|
||||
func_tableBuilt($("#tableWidgetTabulator"))
|
||||
});
|
||||
|
||||
// Empty Modal fields on 'Anrechnungszeitraum hinzufuegen'
|
||||
$(document).on('click', '.azrOpenModal', function(){
|
||||
|
||||
|
||||
Reference in New Issue
Block a user