Added update of status icon directly after bestellen/erteilen/akzeptieren

Now the status icon and row formats are refreshed directly after the
bestell-/erteil-/akzeptieren-button was clicked.

Returning and updating vertrag_betrag in tabulator rows is needed to
detect when geaenderte have been updated and enable correct formatting.
This commit is contained in:
Cris
2019-10-21 10:07:23 +02:00
committed by hainberg
parent b3748fb910
commit cc28a92205
4 changed files with 20 additions and 6 deletions
@@ -143,6 +143,7 @@ class Lehrauftrag extends Auth_Controller
$json []= array(
'row_index' => $lehrauftrag['row_index'],
'bestellt' => date('Y-m-d'),
'vertrag_betrag' => $betrag,
'erteilt' => null
);
}
@@ -165,7 +166,8 @@ class Lehrauftrag extends Auth_Controller
{
$json []= array(
'row_index' => $lehrauftrag['row_index'],
'bestellt' => date('Y-m-d')
'bestellt' => date('Y-m-d'),
'vertrag_betrag' => $betrag
);
}
@@ -236,9 +236,12 @@ $this->load->view(
// Performes after row was updated
function func_rowUpdated(row){
// Deselect and disable new selection of updated rows (ordering done)
// Refresh status icon and row color
row.reformat(); // retriggers cell formatters and rowFormatter callback
// Deselect and disable new selection of updated rows
row.deselect();
row.getElement().style["background-color"] = COLOR_LIGHTGREY;
row.getElement().style["pointerEvents"] = "none";
}
@@ -282,9 +282,12 @@ $this->load->view(
// Performes after row was updated
function func_rowUpdated(row){
// Deselect and disable new selection of updated rows (ordering done)
// Refresh status icon and row color
row.reformat(); // retriggers cell formatters and rowFormatter callback
// Deselect and disable new selection of updated rows
row.deselect();
row.getElement().style["background-color"] = COLOR_LIGHTGREY;
row.getElement().style["pointerEvents"] = "none";
}
@@ -293,9 +293,15 @@ $this->load->view(
// Performes after row was updated
function func_rowUpdated(row){
// Refresh status icon and row color
row.reformat(); // retriggers cell formatters and rowFormatter callback
// Format font-weight normal (needed after geaenderte were bestellt)
row.getElement().style['font-weight'] = 'normal';
// Deselect and disable new selection of updated rows (ordering done)
row.deselect();
row.getElement().style["background-color"] = COLOR_LIGHTGREY;
row.getElement().style["pointerEvents"] = "none";
}