From e6fc99f5be69841c297721b2424c9ec8f5d4014e Mon Sep 17 00:00:00 2001 From: cris-technikum Date: Tue, 8 Jun 2021 16:07:55 +0200 Subject: [PATCH] Changed: Now Tablewidget defines headerFilterPlaceholder by default Signed-off-by: cris-technikum --- .../anrechnung/approveAnrechnungUebersichtData.php | 1 - .../anrechnung/reviewAnrechnungUebersichtData.php | 1 - .../views/lehre/lehrauftrag/acceptLehrauftragData.php | 1 - .../views/lehre/lehrauftrag/approveLehrauftragData.php | 1 - .../views/lehre/lehrauftrag/orderLehrauftragData.php | 1 - public/js/TableWidget.js | 10 ++++++++-- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php b/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php index 61823b0a4..1b94227e0 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php +++ b/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php @@ -74,7 +74,6 @@ $filterWidgetArray = array( layout: "fitColumns", // fit columns to width of table persistentSort:true, autoResize: false, // prevent auto resizing of table (false to allow adapting table size when cols are (de-)activated - headerFilterPlaceholder: " ", index: "anrechnung_id", // 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 diff --git a/application/views/lehre/anrechnung/reviewAnrechnungUebersichtData.php b/application/views/lehre/anrechnung/reviewAnrechnungUebersichtData.php index 2b75d777f..e645e74ec 100644 --- a/application/views/lehre/anrechnung/reviewAnrechnungUebersichtData.php +++ b/application/views/lehre/anrechnung/reviewAnrechnungUebersichtData.php @@ -84,7 +84,6 @@ $filterWidgetArray = array( layout: "fitColumns", // fit columns to width of table persistentSort:true, autoResize: false, // prevent auto resizing of table (false to allow adapting table size when cols are (de-)activated - headerFilterPlaceholder: " ", index: "anrechnung_id", // 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 diff --git a/application/views/lehre/lehrauftrag/acceptLehrauftragData.php b/application/views/lehre/lehrauftrag/acceptLehrauftragData.php index a76018f0b..c7b86479c 100644 --- a/application/views/lehre/lehrauftrag/acceptLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/acceptLehrauftragData.php @@ -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 - headerFilterPlaceholder: " ", 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 diff --git a/application/views/lehre/lehrauftrag/approveLehrauftragData.php b/application/views/lehre/lehrauftrag/approveLehrauftragData.php index 8370070fc..d422890a4 100644 --- a/application/views/lehre/lehrauftrag/approveLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/approveLehrauftragData.php @@ -342,7 +342,6 @@ $filterWidgetArray = array( layout: "fitColumns", // fit columns to width of table layoutColumnsOnNewData: true, // ajust column widths to the data each time TableWidget is loaded autoResize: false, // prevent auto resizing of table (false to allow adapting table size when cols are (de-)activated - headerFilterPlaceholder: " ", groupBy:"lehrveranstaltung_id", groupToggleElement:"header", //toggle group on click anywhere in the group header groupHeader: function(value, count, data, group){ diff --git a/application/views/lehre/lehrauftrag/orderLehrauftragData.php b/application/views/lehre/lehrauftrag/orderLehrauftragData.php index 58daaf113..15f8ac42c 100644 --- a/application/views/lehre/lehrauftrag/orderLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/orderLehrauftragData.php @@ -376,7 +376,6 @@ $filterWidgetArray = array( layout:"fitColumns", // fit columns to width of table layoutColumnsOnNewData: true, // ajust column widths to the data each time TableWidget is loaded autoResize: false, // prevent auto resizing of table (false to allow adapting table size when cols are (de-)activated - headerFilterPlaceholder: " ", groupBy:"lehrveranstaltung_id", groupToggleElement:"header", //toggle group on click anywhere in the group header groupHeader: function(value, count, data, group){ diff --git a/public/js/TableWidget.js b/public/js/TableWidget.js index 09921c108..3e41f02ef 100644 --- a/public/js/TableWidget.js +++ b/public/js/TableWidget.js @@ -548,8 +548,14 @@ var FHC_TableWidget = { options.placeholder = _func_placeholder(); // display text when table is empty options.persistenceID = data.tableUniqueId; // unique id to store persistence data separately for multiple tables - // Columns can be moved per default - if (options.movableColumns == undefined) + // Headerfilter should be empty by default + if (typeof(options.headerFilterPlaceholder) === 'undefined') + { + options.headerFilterPlaceholder = ''; + } + + // Columns can be moved by default + if (typeof(options.movableColumns) === 'undefined') { options.movableColumns = true; // allows changing column order }