Hided column 'Betrag' if lector has inkludierte Lehre

If the lectors actual Verwendung has inkludierte Lehre, the tabulators
column betrag is hided.
This commit is contained in:
Cris
2019-09-24 16:10:23 +02:00
committed by hainberg
parent 223f3110bd
commit 43452a2127
3 changed files with 28 additions and 2 deletions
@@ -81,6 +81,14 @@ $this->load->view(
<script type="text/javascript">
// -----------------------------------------------------------------------------------------------------------------
// Global vars
// -----------------------------------------------------------------------------------------------------------------
// Store boolean has_inkludierteLehre. If true, used to hide column Betrag.
var has_inkludierteLehre = new Boolean(<?php echo $has_inkludierteLehre ?>).valueOf();
// -----------------------------------------------------------------------------------------------------------------
// Mutators - setter methods to manipulate table data when entering the tabulator
// -----------------------------------------------------------------------------------------------------------------
@@ -259,7 +259,15 @@ $filterWidgetArray = array(
{
row.getElement().style["background-color"] = "#f5f5f5"; // grey
}
}
},
renderComplete:function()
{
// If the lectors actual Verwendung has inkludierte Lehre, hide the column betrag
if (has_inkludierteLehre)
{
this.hideColumn("betrag");
}
}
}', // tabulator properties
'datasetRepFieldsDefs' => '{
row_index: {visible:false}, // necessary for row indexing