Originally posted by Viktor Pracht
View Post
Thanks for your support
Index: js/contacts/contacts.js =================================================================== --- js/contacts/contacts.js (revision 3849) +++ js/contacts/contacts.js (working copy) @@ -1813,6 +1813,8 @@ objContactFunctions.loadingContactDetail(false); } register("OX_Print",contacts_printDetail); + + triggerEvent("PAINT_CONTACT", {"view": "detail", "contact": daten}); } objContactFunctions.loadingContactDetail(true);
function showContactDetail(cb_function) { function showDetailInside(daten) { if (cb_function) cb_function(); objContactCardFunctions.currentDatailContactData = daten; // YOU CAN TRIGGER A NEW EVENT HERE??? triggerEvent("PAINT_CONTACT_DETAIL", {"contact": daten}); // ...OR CAN EXTEND THE PAINT_CONTACT EVENT??? triggerEvent("PAINT_CONTACT", {"view": "detail", "contact": daten}); } ... }
register("PAINT_CONTACT", function(e) { try { // is contact? if (e.contact.distribution_list === null) { switch (e.view) { case "card": break; case "hover": // MY CODE GOES HERE!!! // 'e.contact' refers to the current hovered contact ... break; } } } catch(ex){} });
register("OX_View_Changed", function(e) { if (e.module == "contacts" && e.path == "contacts,detail,overview") { // MY CODE GOES HERE!!! // 'e.contact' DOES NOT contain a reference to currently displayed contact! ... } });
Leave a comment: