Moved empty table placeholder text to TableWidget

Now this is a standard behaviour of TableWidget.
This commit is contained in:
Cris
2020-01-30 12:43:50 +01:00
committed by hainberg
parent e1df2cbf23
commit 6897ccdd6b
8 changed files with 8 additions and 22 deletions
+8
View File
@@ -523,6 +523,7 @@ var FHC_TableWidget = {
options.columns = arrayTabulatorColumns;
options.data = data.dataset;
options.tooltipsHeader = true; // set header tooltip with column title
options.placeholder = _func_placeholder(); // display text when table is empty
options.rowSelectionChanged = function(data, rows){
_func_rowSelectionChanged(data, rows);
};
@@ -718,6 +719,13 @@ function _func_columnVisibilityChanged(column, visible){
table.redraw();
}
/*
* Displays text when table is empty
*/
function _func_placeholder(){
return "<h4>Keine Daten vorhanden.</h4>";
}
// Returns TableWidget Header HTML (download-, setting button...)
function _renderTabulatorHeaderHTML(tableWidgetDiv){
@@ -98,12 +98,6 @@ function func_height(table){
return $(window).height() * 0.50;
}
// Displays text when table is empty
function func_placeholder()
{
return "<h4>Keine Daten vorhanden.</h4>";
}
// Formats the rows
function func_rowFormatter(row){
var bestellt = row.getData().bestellt;
@@ -111,12 +111,6 @@ function func_height(table){
return $(window).height() * 0.50;
}
// Displays text when table is empty
function func_placeholder()
{
return "<h4>Keine Daten vorhanden.</h4>";
}
// Formats the group header
function func_groupHeader(data){
return data[0].lv_bezeichnung + "&nbsp;&nbsp;" + ' ( LV-ID: ' + data[0].lehrveranstaltung_id + ' )'; // change name to lehrveranstaltung;
@@ -116,12 +116,6 @@ function func_height(table){
return $(window).height() * 0.50;
}
// Displays text when table is empty
function func_placeholder()
{
return "<h4>Keine Daten vorhanden.</h4>";
}
// Formats the group header
function func_groupHeader(data) {
return data[0].lv_bezeichnung + "&nbsp;&nbsp;" + ' ( LV-ID: ' + data[0].lehrveranstaltung_id + ' )'; // change name to lehrveranstaltung;