tabulator5 migration changes

This commit is contained in:
SimonGschnell
2024-04-04 09:55:41 +02:00
parent 2e5f53f59a
commit 6af2a01166
4 changed files with 17 additions and 14 deletions
@@ -195,14 +195,14 @@ $filterWidgetArray = array(
studiengang_kz: {visible: false, headerFilter:"input"},
stg_bezeichnung: {headerFilter:"input"},
lv_bezeichnung: {headerFilter:"input"},
ects: {headerFilter:"input", align:"center"},
ects: {headerFilter:"input", hozAlign:"center"},
student: {headerFilter:"input"},
begruendung: {headerFilter:"input"},
zgv: {headerFilter:"input"},
dokument_bezeichnung: {headerFilter:"input", formatter:"link", formatterParams: paramLookup_dokBez},
anmerkung_student: {headerFilter:"input"},
antragsdatum: {align:"center", headerFilter:"input", mutator: mut_formatStringDate},
empfehlung_anrechnung: {headerFilter:"input", align:"center", formatter: format_empfehlung_anrechnung, headerFilterFunc: hf_filterTrueFalse},
antragsdatum: {hozAlign:"center", headerFilter:"input", mutator: mut_formatStringDate},
empfehlung_anrechnung: {headerFilter:"input", hozAlign:"center", formatter: format_empfehlung_anrechnung, headerFilterFunc: hf_filterTrueFalse},
status_kurzbz: {visible: false, headerFilter:"input"},
status_bezeichnung: {headerFilter:"input"}
}', // col properties
@@ -330,7 +330,6 @@ $filterWidgetArray = array(
height: func_height(this),
layout: "fitColumns", // fit columns to width of table
autoResize: false, // prevent auto resizing of table (false to allow adapting table size when cols are (de-)activated
index: "row_index", // assign specific column as unique id (important for row indexing)
selectable: true, // allow row selection
selectableRangeMode: "click", // allow range selection using shift end click on end of range
@@ -70,12 +70,7 @@ $tableWidgetArray = array(
selectableCheck: function(row){
return func_selectableCheck(row);
},
renderComplete:function(){
func_renderComplete(this);
},
tableBuilt: function(){
func_tableBuilt(this);
},
}', // tabulator properties
'datasetRepFieldsDefs' => '{
vertrag_id: {visible: false},
@@ -466,10 +466,19 @@ $(function() {
func_tableBuilt(tabulatorInstance)
// using the tabulator instance instead of the jquery object because the site loads two different tabulator tables
tabulatorInstance.on("renderComplete",()=>{func_renderComplete(tabulatorInstance)});
tabulatorInstance.on("renderStarted",()=>{func_renderStarted(tabulatorInstance)});
tabulatorInstance.on("rowUpdated",(row)=>{func_rowUpdated(row)});
let uniqueTableID = tabulatorInstance.parentElement.parentElement.parentElement.attributes.tableUniqueId.value;
switch(uniqueTableID){
case "cancelledLehrauftrag":
tabulatorInstance.on("renderComplete",()=>{func_renderComplete(tabulatorInstance)});
break;
case "acceptLehrauftrag":
tabulatorInstance.on("renderComplete",()=>{func_renderComplete(tabulatorInstance)});
tabulatorInstance.on("renderStarted",()=>{func_renderStarted(tabulatorInstance)});
tabulatorInstance.on("rowUpdated",(row)=>{func_rowUpdated(row)});
break;
default: break;
}
});
var canPromise = !! window.Promise;