Fixed: Unclickable URLs after approving Anrechnung are clickable now

This commit is contained in:
Cris
2022-08-02 15:25:06 +02:00
parent bf3ed6e48e
commit bb8a2a97a5
2 changed files with 13 additions and 22 deletions
@@ -191,9 +191,6 @@ $filterWidgetArray = array(
rowSelectionChanged:function(data, rows){
func_rowSelectionChanged(data, rows);
},
rowUpdated:function(row){
func_rowUpdated(row);
},
tooltips: function(cell){
return func_tooltips(cell);
}
@@ -141,8 +141,17 @@ var format_ectsSumBisherUndNeu = function(cell, formatterParams, onRendered){
function func_rowFormatter(row){
let status_kurzbz = row.getData().status_kurzbz;
// If status is anything else then 'Bearbeitet von STGL-Leitung'
if (status_kurzbz != ANRECHNUNGSTATUS_PROGRESSED_BY_STGL)
{
// Disable new selection of updated rows
row.getElement().style["pointerEvents"] = "none";
// ...but leave url links selectable
row.getCell('dokument_bezeichnung').getElement().firstChild.style["pointerEvents"] = "auto";
row.getCell('details').getElement().firstChild.style["pointerEvents"] = "auto";
// Color background grey
row.getElement().style["background-color"] = COLOR_LIGHTGREY; // default
}
}
@@ -177,24 +186,6 @@ function func_rowSelectionChanged(data, rows){
approveAnrechnung.showNumberSelectedRows(rows);
}
// Performes after row was updated
function func_rowUpdated(row){
var status_kurzbz = row.getData().status_kurzbz;
if ((row.getCells().length > 0) &&
(status_kurzbz == ANRECHNUNGSTATUS_APPROVED ||
status_kurzbz == ANRECHNUNGSTATUS_REJECTED ||
status_kurzbz == ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR)
)
{
// Deselect and disable new selection of updated rows
row.getElement().style["pointerEvents"] = "none";
// ...but leave url links selectable
row.getCell('dokument_bezeichnung').getElement().firstChild.style["pointerEvents"] = "auto";
row.getCell('details').getElement().firstChild.style["pointerEvents"] = "auto";
}
}
// Returns tooltip
function func_tooltips(cell) {
// Return tooltip if row is unselectable
@@ -431,8 +422,11 @@ $(function(){
// Update row
row.update(updateData);
row.update(updateData);
// Reformat row
row.reformat();
})
// Deselect rows