fixes the bug with the columnDefault tooltips that was inside the TableWidget.js file

This commit is contained in:
SimonGschnell
2024-04-24 14:59:46 +02:00
parent 5a62dbc740
commit cea06994de
5 changed files with 16 additions and 28 deletions
@@ -221,12 +221,7 @@ $filterWidgetArray = array(
},
columnDefaults:{
//columnDefaults tooltip did not work
tooltip:function(e, cell, onRendered){
return func_tooltips(cell);
},
tooltip:func_tooltips,
headerFilterPlaceholder: " ",
}
@@ -167,12 +167,8 @@ $filterWidgetArray = array(
return func_selectableCheck(row);
},
columnDefaults:{
//columnDefaults tooltip did not work
tooltip:func_tooltips,
headerFilterPlaceholder: " ",
}
}', // tabulator properties
+9 -8
View File
@@ -551,14 +551,15 @@ var FHC_TableWidget = {
// ...if there are data to be displayed...
if (data.hasOwnProperty("dataset") && $.isArray(data.dataset)) {
if (options == null) options = {};
options.columnDefaults = {
// set header tooltip with column title
//! the old keyword is tooltipsHeader, the new keyword for the option is headerTooltip
headerTooltip:
typeof options.columnDefaults?.tooltipsHeader == "undefined"
? true
: options.columnDefaults?.tooltipsHeader,
};
options.columnDefaults={
...(options.columnDefaults||{}),
headerTooltip:
typeof options.columnDefaults?.tooltipsHeader == "undefined"
? true
: options.columnDefaults?.tooltipsHeader,
};
options.columns = arrayTabulatorColumns;
options.data = data.dataset;
options.persistence =
@@ -184,8 +184,6 @@ var format_ectsSumBisherUndNeu = function (cell, formatterParams, onRendered) {
);
};
// Formats row selectable/unselectable
function func_selectableCheck(row) {
let status_kurzbz = row.getData().status_kurzbz;
@@ -220,16 +218,14 @@ function func_rowSelectionChanged(data, rows, tabulatorInstance) {
}
// Returns tooltip
function func_tooltips() {
function func_tooltips(e,cell,onRendered) {
//e - mouseover event
//cell - cell component
//onRendered - onRendered callback registration function
console.log("here");
// console.log("TOOLTIP DEBUG",cell);
// // Return tooltip if row is unselectable
// if (true || !func_selectableCheck(cell.getRow())){
// return FHC_PhrasesLib.t("ui", "nichtSelektierbarAufgrundVon") + 'Status';
// }
// Return tooltip if row is unselectable
if (!func_selectableCheck(cell.getRow())) {
return FHC_PhrasesLib.t("ui", "nichtSelektierbarAufgrundVon") + "Status";
}
}
// Formats empfehlung_anrechnung
@@ -125,7 +125,7 @@ function func_tooltips(e, cell, onRendered) {
//e - mouseover event
//cell - cell component
//onRendered - onRendered callback registration functionfunction
console.log("this is a tooltip");
// Return tooltip if row is unselectable
if (!func_selectableCheck(cell.getRow())) {
return FHC_PhrasesLib.t("ui", "nichtSelektierbarAufgrundVon") + "Status";