all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pmg-devel] [PATCH pmg-gui] fix #2844: MailTracker: do not collapse rows with double click
@ 2020-07-15 10:32 Dominik Csapak
  2020-09-23  7:04 ` [pmg-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2020-07-15 10:32 UTC (permalink / raw)
  To: pmg-devel

so that users can select words with double click, but can still expand
the logs with it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
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: '<p class="logs">{logs}</p>'
 	}
     ],
@@ -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





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pmg-devel] applied: [PATCH pmg-gui] fix #2844: MailTracker: do not collapse rows with double click
  2020-07-15 10:32 [pmg-devel] [PATCH pmg-gui] fix #2844: MailTracker: do not collapse rows with double click Dominik Csapak
@ 2020-09-23  7:04 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2020-09-23  7:04 UTC (permalink / raw)
  To: Dominik Csapak, pmg-devel

On 15.07.20 12:32, Dominik Csapak wrote:
> so that users can select words with double click, but can still expand
> the logs with it
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> 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(-)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-23  7:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-15 10:32 [pmg-devel] [PATCH pmg-gui] fix #2844: MailTracker: do not collapse rows with double click Dominik Csapak
2020-09-23  7:04 ` [pmg-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal