From 196ce5d251463674ca8b62ffe0efb8f626c6b49f Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 21 Nov 2017 13:14:44 +0100 Subject: [PATCH] Fix so clicking pushgroup link on contacts list does not load group information page Added a general way to mark all such links with data-action-link attribute. --- program/js/list.js | 2 +- program/steps/addressbook/func.inc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/program/js/list.js b/program/js/list.js index 015bfab47..2b5fafcdd 100644 --- a/program/js/list.js +++ b/program/js/list.js @@ -666,7 +666,7 @@ is_event_target: function(e) var target = rcube_event.get_target(e), tagname = target.tagName.toLowerCase(); - return !(target && (tagname == 'input' || tagname == 'img' || (tagname != 'a' && target.onclick))); + return !(target && (tagname == 'input' || tagname == 'img' || (tagname != 'a' && target.onclick) || $(target).data('action-link'))); }, diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc index eba2b04ab..efd9e6f52 100644 --- a/program/steps/addressbook/func.inc +++ b/program/steps/addressbook/func.inc @@ -412,6 +412,7 @@ function rcmail_js_contacts_list($result, $prefix='') 'rel' => $row['ID'], 'title' => $RCMAIL->gettext('listgroup'), 'onclick' => sprintf("return %s.command('pushgroup',{'source':'%s','id':'%s'},this,event)", rcmail_output::JS_OBJECT_NAME, $source_id, $row['CID']), + 'data-action-link' => true, ), '»'); } else