mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
Bugfixed TabelWidget: Ausgewählte Zeilen now displaying amount correctly
Added 'typeof' to correctly check against 'undefined'. Before it was checking against string. Also corrected all other occurences. Signed-off-by: cris-technikum <hainberg@technikum-wien.at>
This commit is contained in:
@@ -544,7 +544,7 @@ var FHC_TableWidget = {
|
||||
|
||||
options.columns = arrayTabulatorColumns;
|
||||
options.data = data.dataset;
|
||||
if (options.tableWidgetHeader == 'undefined')
|
||||
if (typeof options.tableWidgetHeader == 'undefined')
|
||||
{
|
||||
options.persistentLayout = true; // enables persistence (default store in localStorage if available, else in cookie)
|
||||
options.persistenceID = data.tableUniqueId; // TableWidget unique id to store persistence data seperately for multiple tables
|
||||
@@ -552,7 +552,8 @@ var FHC_TableWidget = {
|
||||
options.movableColumns = true; // allows changing column order
|
||||
options.tooltipsHeader = true; // set header tooltip with column title
|
||||
options.placeholder = _func_placeholder(); // display text when table is empty
|
||||
if (options.rowSelectionChanged == 'undefined')
|
||||
|
||||
if (typeof options.rowSelectionChanged == 'undefined')
|
||||
{
|
||||
options.rowSelectionChanged = function(data, rows){
|
||||
_func_rowSelectionChanged(data, rows);
|
||||
@@ -572,8 +573,8 @@ var FHC_TableWidget = {
|
||||
// -------------------------------------------------------------------------------------------------------------
|
||||
|
||||
// Render tableWidgetHeader
|
||||
if (options.tableWidgetHeader == 'undefined' ||
|
||||
(options.tableWidgetHeader != 'undefined' && options.tableWidgetHeader != false))
|
||||
if (typeof options.tableWidgetHeader == 'undefined' ||
|
||||
(typeof options.tableWidgetHeader != 'undefined' && options.tableWidgetHeader != false))
|
||||
{
|
||||
var tabulatorHeaderHTML = _renderTabulatorHeaderHTML(tableWidgetDiv);
|
||||
tableWidgetDiv.find('#tableWidgetHeader').append(tabulatorHeaderHTML);
|
||||
@@ -591,7 +592,7 @@ var FHC_TableWidget = {
|
||||
* selectButtons: true // tableWidgetFooter properties are checked in _renderTabulatorFooterHTML function
|
||||
* }
|
||||
*/
|
||||
if (options.tableWidgetFooter != 'undefined' && options.tableWidgetFooter != null)
|
||||
if (typeof options.tableWidgetFooter != 'undefined' && options.tableWidgetFooter != null)
|
||||
{
|
||||
var tabulatorFooterHTML = _renderTabulatorFooterHTML(options.tableWidgetFooter);
|
||||
tableWidgetDiv.find('#tableWidgetFooter').append(tabulatorFooterHTML);
|
||||
@@ -863,7 +864,7 @@ function _renderTabulatorFooterHTML(tableWidgetFooterOptions){
|
||||
var tabulatorFooterHTML = '';
|
||||
|
||||
// If property selectButtons is true, render 'Alle auswaehlen / Alle abwaehlen' buttons
|
||||
if (tableWidgetFooterOptions.selectButtons != 'undefined' && tableWidgetFooterOptions.selectButtons == true)
|
||||
if (typeof tableWidgetFooterOptions.selectButtons != 'undefined' && tableWidgetFooterOptions.selectButtons == true)
|
||||
{
|
||||
tabulatorFooterHTML += '<div class="btn-toolbar" role="toolbar">';
|
||||
tabulatorFooterHTML += '<div class="btn-group" role="group">';
|
||||
|
||||
Reference in New Issue
Block a user