From ac1a975f1d28afd6a20598d351c59d37c3520768 Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 22 Mar 2021 11:35:24 -0600 Subject: [PATCH] Infolog: Fix CRM view would overwrite state in infolog list, leading to wrong filters in favorites --- infolog/js/app.js | 7 +++++-- infolog/js/app.ts | 11 +++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/infolog/js/app.js b/infolog/js/app.js index 7798c08899..c652961c86 100644 --- a/infolog/js/app.js +++ b/infolog/js/app.js @@ -165,12 +165,15 @@ var InfologApp = /** @class */ (function (_super) { * @return {object} Application specific map representing the current state */ InfologApp.prototype.getState = function () { - // call parent - var state = _super.prototype.getState.call(this); + var state = { + action: null, + action_id: null + }; var nm = {}; // Get index etemplate var et2 = etemplate2_1.etemplate2.getById('infolog-index'); if (et2) { + state = et2.widgetContainer.getWidgetById("nm").getValue(); var content = et2.widgetContainer.getArrayMgr('content'); nm = content && content.data && content.data.nm ? content.data.nm : {}; } diff --git a/infolog/js/app.ts b/infolog/js/app.ts index 86ffeded05..233247cc04 100644 --- a/infolog/js/app.ts +++ b/infolog/js/app.ts @@ -176,15 +176,18 @@ class InfologApp extends EgwApp */ getState() { - // call parent - var state = super.getState(); - var nm : any = {}; + let state = { + action: null, + action_id: null + }; + let nm : any = {}; // Get index etemplate var et2 = etemplate2.getById('infolog-index'); if(et2) { - var content = et2.widgetContainer.getArrayMgr('content'); + state = et2.widgetContainer.getWidgetById("nm").getValue(); + let content = et2.widgetContainer.getArrayMgr('content'); nm = content && content.data && content.data.nm ? content.data.nm: {}; }