mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-02 03:19:27 +00:00
Adapted tables' boolean headerfilter to be used with strings
i.e. entering 'yes' will filter all truish entries Signed-off-by: cris-technikum <hainberg@technikum-wien.at>
This commit is contained in:
@@ -117,7 +117,7 @@ $filterWidgetArray = array(
|
||||
target:"_blank"
|
||||
}},
|
||||
anmerkung_student: {headerFilter:"input"},
|
||||
empfehlung_anrechnung: {headerFilter:"input", align:"center", formatter: format_empfehlung_anrechnung},
|
||||
empfehlung_anrechnung: {headerFilter:"input", align:"center", formatter: format_empfehlung_anrechnung, headerFilterFunc: hf_filterTrueFalse},
|
||||
status_kurzbz: {visible: false},
|
||||
status_bezeichnung: {headerFilter:"input"}
|
||||
}', // col properties
|
||||
|
||||
@@ -121,7 +121,7 @@ $filterWidgetArray = array(
|
||||
target:"_blank"
|
||||
}},
|
||||
anmerkung_student: {headerFilter:"input"},
|
||||
empfehlung_anrechnung: {headerFilter:"input", align:"center", formatter: format_empfehlung_anrechnung},
|
||||
empfehlung_anrechnung: {headerFilter:"input", align:"center", formatter: format_empfehlung_anrechnung, headerFilterFunc: hf_filterTrueFalse},
|
||||
status_kurzbz: {visible: false},
|
||||
status_bezeichnung: {headerFilter:"input"}
|
||||
}', // col properties
|
||||
|
||||
@@ -16,6 +16,25 @@ function func_height(table){
|
||||
return $(window).height() * 0.50;
|
||||
}
|
||||
|
||||
// Filters boolean values
|
||||
function hf_filterTrueFalse(headerValue, rowValue){
|
||||
|
||||
if ('ja'.startsWith(headerValue) || 'yes'.startsWith(headerValue))
|
||||
{
|
||||
return rowValue == 'true';
|
||||
}
|
||||
|
||||
if ('nein'.startsWith(headerValue) || 'no'.startsWith(headerValue))
|
||||
{
|
||||
return rowValue == 'false';
|
||||
}
|
||||
|
||||
if (headerValue = '-')
|
||||
{
|
||||
return rowValue == null;
|
||||
}
|
||||
}
|
||||
|
||||
// Adds column details
|
||||
function func_tableBuilt(table) {
|
||||
table.addColumn(
|
||||
|
||||
@@ -16,6 +16,25 @@ function func_height(table){
|
||||
return $(window).height() * 0.50;
|
||||
}
|
||||
|
||||
// Filters boolean values
|
||||
function hf_filterTrueFalse(headerValue, rowValue){
|
||||
|
||||
if ('ja'.startsWith(headerValue) || 'yes'.startsWith(headerValue))
|
||||
{
|
||||
return rowValue == 'true';
|
||||
}
|
||||
|
||||
if ('nein'.startsWith(headerValue) || 'no'.startsWith(headerValue))
|
||||
{
|
||||
return rowValue == 'false';
|
||||
}
|
||||
|
||||
if (headerValue = '-')
|
||||
{
|
||||
return rowValue == null;
|
||||
}
|
||||
}
|
||||
|
||||
// Adds column details
|
||||
function func_tableBuilt(table) {
|
||||
table.addColumn(
|
||||
|
||||
Reference in New Issue
Block a user