From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-gui 2/4] quarantine: contextmenu: refactor for use in other quarantines
Date: Thu, 20 Oct 2022 21:14:58 +0200 [thread overview]
Message-ID: <20221020191500.2414-3-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20221020191500.2414-1-s.ivanov@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
can/should probably be squashed with the next patch
js/Makefile | 1 +
| 32 ++++++++++++++++++++++++++++++++
| 14 +-------------
3 files changed, 34 insertions(+), 13 deletions(-)
create mode 100644 js/QuarantineContextMenu.js
diff --git a/js/Makefile b/js/Makefile
index 0b9f93b..b904598 100644
--- a/js/Makefile
+++ b/js/Makefile
@@ -19,6 +19,7 @@ JSSRC= \
RuleInfo.js \
RuleEditor.js \
MainView.js \
+ QuarantineContextMenu.js \
QuarantineList.js \
SpamInfoGrid.js \
MailInfo.js \
--git a/js/QuarantineContextMenu.js b/js/QuarantineContextMenu.js
new file mode 100644
index 0000000..4f7744e
--- /dev/null
+++ b/js/QuarantineContextMenu.js
@@ -0,0 +1,32 @@
+Ext.define('PMG.menu.QuarantineContextMenu', {
+ extend: 'Ext.menu.Menu',
+ xtype: 'pmgQuarantineMenu',
+
+ showSeparator: false,
+
+ controller: {
+ xclass: 'Ext.app.ViewController',
+ callCallback: function(btn) {
+ let view = this.getView();
+ if (Ext.isFunction(view.callback)) {
+ view.callback(btn.action);
+ }
+ },
+ },
+
+ items: [
+ {
+ text: gettext('Deliver'),
+ iconCls: 'fa fa-fw fa-paper-plane-o',
+ action: 'deliver',
+ handler: 'callCallback',
+ },
+ {
+ text: gettext('Delete'),
+ iconCls: 'fa fa-fw fa-trash-o',
+ action: 'delete',
+ handler: 'callCallback',
+ },
+ ],
+});
+
--git a/js/SpamContextMenu.js b/js/SpamContextMenu.js
index 5fb4816..b089f0f 100644
--- a/js/SpamContextMenu.js
+++ b/js/SpamContextMenu.js
@@ -1,17 +1,5 @@
Ext.define('PMG.menu.SpamContextMenu', {
- extend: 'Ext.menu.Menu',
-
- showSeparator: false,
-
- controller: {
- xclass: 'Ext.app.ViewController',
- callCallback: function(btn) {
- let view = this.getView();
- if (Ext.isFunction(view.callback)) {
- view.callback(btn.action);
- }
- },
- },
+ extend: 'PMG.menu.QuarantineContextMenu',
items: [
{
--
2.30.2
next prev parent reply other threads:[~2022-10-20 19:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 19:14 [pmg-devel] [PATCH pmg-gui 0/4] low-hanging improvments for the quarantine interface Stoiko Ivanov
2022-10-20 19:14 ` [pmg-devel] [PATCH pmg-gui 1/4] fix #4137: display receiver in attachment/virus quarantine Stoiko Ivanov
2022-10-22 14:30 ` [pmg-devel] applied: " Thomas Lamprecht
2022-10-20 19:14 ` Stoiko Ivanov [this message]
2022-10-22 14:32 ` [pmg-devel] applied: [PATCH pmg-gui 2/4] quarantine: contextmenu: refactor for use in other quarantines Thomas Lamprecht
2022-10-20 19:14 ` [pmg-devel] [PATCH pmg-gui 3/4] quarantine: add common controller for all quarantines Stoiko Ivanov
2022-10-22 13:37 ` Thomas Lamprecht
2022-10-20 19:15 ` [pmg-devel] [PATCH pmg-gui 4/4] quarantine: move all quarantines to the new controller Stoiko Ivanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221020191500.2414-3-s.ivanov@proxmox.com \
--to=s.ivanov@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox