mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-26 09:04:28 +00:00
Moved empty table placeholder text to TableWidget
Now this is a standard behaviour of TableWidget.
This commit is contained in:
@@ -332,7 +332,6 @@ $filterWidgetArray = array(
|
|||||||
persistenceID: "acceptLehrauftrag", // TableWidget unique id to store persistence data seperately for multiple tables
|
persistenceID: "acceptLehrauftrag", // TableWidget unique id to store persistence data seperately for multiple tables
|
||||||
autoResize: false, // prevent auto resizing of table (false to allow adapting table size when cols are (de-)activated
|
autoResize: false, // prevent auto resizing of table (false to allow adapting table size when cols are (de-)activated
|
||||||
movableColumns: true, // allows changing column
|
movableColumns: true, // allows changing column
|
||||||
placeholder: func_placeholder(),
|
|
||||||
headerFilterPlaceholder: " ",
|
headerFilterPlaceholder: " ",
|
||||||
index: "row_index", // assign specific column as unique id (important for row indexing)
|
index: "row_index", // assign specific column as unique id (important for row indexing)
|
||||||
selectable: true, // allow row selection
|
selectable: true, // allow row selection
|
||||||
|
|||||||
@@ -344,7 +344,6 @@ $filterWidgetArray = array(
|
|||||||
persistenceID: "approveLehrauftrag", // TableWidget unique id to store persistence data seperately for multiple tables
|
persistenceID: "approveLehrauftrag", // TableWidget unique id to store persistence data seperately for multiple tables
|
||||||
autoResize: false, // prevent auto resizing of table (false to allow adapting table size when cols are (de-)activated
|
autoResize: false, // prevent auto resizing of table (false to allow adapting table size when cols are (de-)activated
|
||||||
movableColumns: true, // allows changing column
|
movableColumns: true, // allows changing column
|
||||||
placeholder: func_placeholder(),
|
|
||||||
headerFilterPlaceholder: " ",
|
headerFilterPlaceholder: " ",
|
||||||
groupBy:"lehrveranstaltung_id",
|
groupBy:"lehrveranstaltung_id",
|
||||||
groupToggleElement:"header", //toggle group on click anywhere in the group header
|
groupToggleElement:"header", //toggle group on click anywhere in the group header
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ $tableWidgetArray = array(
|
|||||||
persistenceID: "cancelledLehrauftrag", // TableWidget unique id to store persistence data seperately for multiple tables
|
persistenceID: "cancelledLehrauftrag", // TableWidget unique id to store persistence data seperately for multiple tables
|
||||||
autoResize: false, // prevent auto resizing of table (false to allow adapting table size when cols are (de-)activated
|
autoResize: false, // prevent auto resizing of table (false to allow adapting table size when cols are (de-)activated
|
||||||
movableColumns: true, // allows changing column
|
movableColumns: true, // allows changing column
|
||||||
placeholder: func_placeholder(),
|
|
||||||
rowFormatter:function(row){
|
rowFormatter:function(row){
|
||||||
func_rowFormatter(row);
|
func_rowFormatter(row);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -379,7 +379,6 @@ $filterWidgetArray = array(
|
|||||||
persistenceID: "orderLehrauftrag", // TableWidget unique id to store persistence data seperately for multiple tables
|
persistenceID: "orderLehrauftrag", // TableWidget unique id to store persistence data seperately for multiple tables
|
||||||
autoResize: false, // prevent auto resizing of table (false to allow adapting table size when cols are (de-)activated
|
autoResize: false, // prevent auto resizing of table (false to allow adapting table size when cols are (de-)activated
|
||||||
movableColumns: true, // allows changing column order
|
movableColumns: true, // allows changing column order
|
||||||
placeholder: func_placeholder(), // shown on empty table (no data)
|
|
||||||
headerFilterPlaceholder: " ",
|
headerFilterPlaceholder: " ",
|
||||||
groupBy:"lehrveranstaltung_id",
|
groupBy:"lehrveranstaltung_id",
|
||||||
groupToggleElement:"header", //toggle group on click anywhere in the group header
|
groupToggleElement:"header", //toggle group on click anywhere in the group header
|
||||||
|
|||||||
@@ -523,6 +523,7 @@ var FHC_TableWidget = {
|
|||||||
options.columns = arrayTabulatorColumns;
|
options.columns = arrayTabulatorColumns;
|
||||||
options.data = data.dataset;
|
options.data = data.dataset;
|
||||||
options.tooltipsHeader = true; // set header tooltip with column title
|
options.tooltipsHeader = true; // set header tooltip with column title
|
||||||
|
options.placeholder = _func_placeholder(); // display text when table is empty
|
||||||
options.rowSelectionChanged = function(data, rows){
|
options.rowSelectionChanged = function(data, rows){
|
||||||
_func_rowSelectionChanged(data, rows);
|
_func_rowSelectionChanged(data, rows);
|
||||||
};
|
};
|
||||||
@@ -718,6 +719,13 @@ function _func_columnVisibilityChanged(column, visible){
|
|||||||
table.redraw();
|
table.redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Displays text when table is empty
|
||||||
|
*/
|
||||||
|
function _func_placeholder(){
|
||||||
|
return "<h4>Keine Daten vorhanden.</h4>";
|
||||||
|
}
|
||||||
|
|
||||||
// Returns TableWidget Header HTML (download-, setting button...)
|
// Returns TableWidget Header HTML (download-, setting button...)
|
||||||
function _renderTabulatorHeaderHTML(tableWidgetDiv){
|
function _renderTabulatorHeaderHTML(tableWidgetDiv){
|
||||||
|
|
||||||
|
|||||||
@@ -98,12 +98,6 @@ function func_height(table){
|
|||||||
return $(window).height() * 0.50;
|
return $(window).height() * 0.50;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Displays text when table is empty
|
|
||||||
function func_placeholder()
|
|
||||||
{
|
|
||||||
return "<h4>Keine Daten vorhanden.</h4>";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Formats the rows
|
// Formats the rows
|
||||||
function func_rowFormatter(row){
|
function func_rowFormatter(row){
|
||||||
var bestellt = row.getData().bestellt;
|
var bestellt = row.getData().bestellt;
|
||||||
|
|||||||
@@ -111,12 +111,6 @@ function func_height(table){
|
|||||||
return $(window).height() * 0.50;
|
return $(window).height() * 0.50;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Displays text when table is empty
|
|
||||||
function func_placeholder()
|
|
||||||
{
|
|
||||||
return "<h4>Keine Daten vorhanden.</h4>";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Formats the group header
|
// Formats the group header
|
||||||
function func_groupHeader(data){
|
function func_groupHeader(data){
|
||||||
return data[0].lv_bezeichnung + " " + ' ( LV-ID: ' + data[0].lehrveranstaltung_id + ' )'; // change name to lehrveranstaltung;
|
return data[0].lv_bezeichnung + " " + ' ( LV-ID: ' + data[0].lehrveranstaltung_id + ' )'; // change name to lehrveranstaltung;
|
||||||
|
|||||||
@@ -116,12 +116,6 @@ function func_height(table){
|
|||||||
return $(window).height() * 0.50;
|
return $(window).height() * 0.50;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Displays text when table is empty
|
|
||||||
function func_placeholder()
|
|
||||||
{
|
|
||||||
return "<h4>Keine Daten vorhanden.</h4>";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Formats the group header
|
// Formats the group header
|
||||||
function func_groupHeader(data) {
|
function func_groupHeader(data) {
|
||||||
return data[0].lv_bezeichnung + " " + ' ( LV-ID: ' + data[0].lehrveranstaltung_id + ' )'; // change name to lehrveranstaltung;
|
return data[0].lv_bezeichnung + " " + ' ( LV-ID: ' + data[0].lehrveranstaltung_id + ' )'; // change name to lehrveranstaltung;
|
||||||
|
|||||||
Reference in New Issue
Block a user