diff --git a/APPL/ALG/alg_gebouw_list.inc b/APPL/ALG/alg_gebouw_list.inc index 95277dafc5..acf2fd9d04 100644 --- a/APPL/ALG/alg_gebouw_list.inc +++ b/APPL/ALG/alg_gebouw_list.inc @@ -28,6 +28,38 @@ function fnrowData(oRs) return JSON.stringify(data); } + +var recent = new Date(); +function fnrowClass(oRs) +{ + var lclass = ""; + // Tracking: hoe lang geleden voor het laatst gewijzigd? + if (oRs.Fields("recentdatum").Value != null) + { + var ltrackdate1 = new Date(); + var ltrackdate10 = new Date(); + var ltrackdate100 = new Date(); + var alg_onrgoed_recent = S("alg_onrgoed_recent"); + ltrackdate1.setMinutes(recent.getMinutes() - alg_onrgoed_recent); + ltrackdate10.setMinutes(recent.getMinutes() - alg_onrgoed_recent * 12); + ltrackdate100.setMinutes(recent.getMinutes() - alg_onrgoed_recent*12*2); + + var fac_recent = new Date(oRs.Fields("recentdatum").Value); + if (fac_recent > ltrackdate1) + { + lclass += " updated"; + } + else if (fac_recent > ltrackdate10) + { + lclass += " updated10"; + } + else if (fac_recent > ltrackdate100) + { + lclass += " updated100"; + } + } + return lclass; +} %>