From bfcb67982ddd05b6686a17bc986a61a08ad6523b Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 19 Oct 2022 09:28:48 -0600 Subject: [PATCH] Addressbook: Fix CRM view overwrote app.et2 reference, breaking contact list actions --- addressbook/js/app.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/addressbook/js/app.ts b/addressbook/js/app.ts index f9c850ae36..7bfbaae889 100644 --- a/addressbook/js/app.ts +++ b/addressbook/js/app.ts @@ -79,10 +79,25 @@ class AddressbookApp extends EgwApp // r49769 let's CRM view run under currentapp == "addressbook", which causes // app.addressbook.et2_ready called before app.infolog.et2_ready and therefore // app.addressbook.et2 would point to infolog template, if we not stop here - if (name.match(/^infolog|tracker\./)) return; + if(name.match(/^infolog|tracker\./)) + { + return; + } + + // Contact view will also replace this.et2 + if(name == 'addressbook.view') + { + // Still need to run super.et2_ready(), but replace this.et2 after + const list_et2 = this.et2; + super.et2_ready(et2, name); + this.et2 = list_et2; + } // call parent - super.et2_ready(et2, name); + else + { + super.et2_ready(et2, name); + } switch (name) {