diff --git a/api/js/etemplate/et2_extension_nextmatch.js b/api/js/etemplate/et2_extension_nextmatch.js index 17d41a25f4..fd779c135e 100644 --- a/api/js/etemplate/et2_extension_nextmatch.js +++ b/api/js/etemplate/et2_extension_nextmatch.js @@ -628,11 +628,17 @@ var et2_nextmatch = /** @class */ (function (_super) { this.controller._insertDataRow(entry, true); // Set "new entry" class - but it has to stay so register and re-add it after the data is there (_b = (_a = entry.row) === null || _a === void 0 ? void 0 : _a.tr) === null || _b === void 0 ? void 0 : _b.addClass("new_entry"); + var time = new Date().valueOf(); var callback = function (data) { + var _a; if (data) { if (data.class) { data.class += " new_entry"; } + // Don't remove if new data has not arrived + var stored = egw.dataGetUIDdata(uid); + if (((_a = stored) === null || _a === void 0 ? void 0 : _a.timestamp) >= time) + return; } else { // Server didn't give us our row data diff --git a/api/js/etemplate/et2_extension_nextmatch.ts b/api/js/etemplate/et2_extension_nextmatch.ts index e4dedb0efc..b920b0e590 100644 --- a/api/js/etemplate/et2_extension_nextmatch.ts +++ b/api/js/etemplate/et2_extension_nextmatch.ts @@ -927,6 +927,7 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2 // Set "new entry" class - but it has to stay so register and re-add it after the data is there entry.row?.tr?.addClass("new_entry"); + let time = new Date().valueOf(); let callback = function(data) { if(data) @@ -935,6 +936,9 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2 { data.class += " new_entry"; } + // Don't remove if new data has not arrived + let stored = egw.dataGetUIDdata(uid); + if(stored?.timestamp >= time) return; } else { diff --git a/api/templates/default/etemplate2.css b/api/templates/default/etemplate2.css index 600d69b4ab..beb7e5cfde 100644 --- a/api/templates/default/etemplate2.css +++ b/api/templates/default/etemplate2.css @@ -2100,7 +2100,9 @@ table.egwGridView_outer thead tr th.noResize:hover { * New entry (via push) */ .et2_nextmatch .new_entry { - animation: new_entry_pulse 5s; + animation-name: new_entry_pulse, new_entry_clear; + animation-duration: 5s; + animation-delay: 0s, 180s; animation-fill-mode: forwards; } @keyframes new_entry_pulse { @@ -2114,6 +2116,12 @@ table.egwGridView_outer thead tr th.noResize:hover { background-color: rgba(255,255,185,0.3); } } +@keyframes new_entry_clear { + 100% { + background-color: inherit; + } +} + /** * itempicker widget */