diff --git a/application/views/lehre/lehrauftrag/orderLehrauftrag.php b/application/views/lehre/lehrauftrag/orderLehrauftrag.php index c386caeee..87315da43 100644 --- a/application/views/lehre/lehrauftrag/orderLehrauftrag.php +++ b/application/views/lehre/lehrauftrag/orderLehrauftrag.php @@ -178,6 +178,22 @@ $this->load->view( // Custom filters // ----------------------------------------------------------------------------------------------------------------- + /* + * Filters neue AND geaenderte initially + * NOTE: This is a workaround. The tabulators callback initialFilter is not used here because + * it is processed before the callback tableBuilt, where the status is going to be built. + * The callback dataLoaded is processed after tableBuild and provides the status. + */ + function func_dataLoaded(data, table){ + table.setFilter([ + {field: 'personalnummer', type: '>=', value: 0}, // not dummy lector AND + [ + {field: 'status', type: '=', value: 'Neu'}, // neu OR + {field: 'status', type: '=', value: 'GeƤndert'} // geaendert + ] + ]); + } + // Filters geaenderte function filter_showChanged(data){ diff --git a/application/views/lehre/lehrauftrag/orderLehrauftragData.php b/application/views/lehre/lehrauftrag/orderLehrauftragData.php index 1c620ccf5..320cbeddc 100644 --- a/application/views/lehre/lehrauftrag/orderLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/orderLehrauftragData.php @@ -369,7 +369,10 @@ $filterWidgetArray = array( }, tableBuilt: function(){ func_tableBuilt(this); - } + }, + dataLoaded: function(data){ + func_dataLoaded(data, this); + }, }', // tabulator properties 'datasetRepFieldsDefs' => '{ // column status is built dynamically in funcTableBuilt()