From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 8EF3B6330F for ; Wed, 15 Jul 2020 12:33:08 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 859E52EC50 for ; Wed, 15 Jul 2020 12:32:38 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id EB9F42EC48 for ; Wed, 15 Jul 2020 12:32:37 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id B825A4437F for ; Wed, 15 Jul 2020 12:32:37 +0200 (CEST) From: Dominik Csapak To: pmg-devel@lists.proxmox.com Date: Wed, 15 Jul 2020 12:32:37 +0200 Message-Id: <20200715103237.24814-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.009 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods NO_DNS_FOR_FROM 0.379 Envelope sender has no MX or A DNS records RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record Subject: [pmg-devel] [PATCH pmg-gui] fix #2844: MailTracker: do not collapse rows with double click X-BeenThere: pmg-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Mail Gateway development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 10:33:08 -0000 so that users can select words with double click, but can still expand the logs with it Signed-off-by: Dominik Csapak --- not sure about it, since the user now cannot collapse the log with doubleclick anymore... js/MailTracker.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/js/MailTracker.js b/js/MailTracker.js index 34b6d6f..9cd2b9f 100644 --- a/js/MailTracker.js +++ b/js/MailTracker.js @@ -245,6 +245,7 @@ Ext.define('PMG.MailTracker', { plugins: [ { ptype: 'rowexpander', + expandOnDblClick: false, rowBodyTpl: '

{logs}

' } ], @@ -309,9 +310,23 @@ Ext.define('PMG.MailTracker', { }); }, + // only expand row on dblclick, but do not collapse + expand: function(view, record, row, rowIdx, e) { + // inspired by RowExpander.js + let rowNode = view.getNode(rowIdx); + let normalRow = Ext.fly(rowNode); + + let collapsedCls = view.rowBodyFeature.rowCollapsedCls; + + if (normalRow.hasCls(collapsedCls)) { + view.rowBodyFeature.rowExpander.toggleRow(rowIdx, record); + } + }, + control: { 'gridview': { - expandbody: 'showDetails' + expandbody: 'showDetails', + itemdblclick: 'expand', } } }, -- 2.20.1