From: Dominik Csapak <d.csapak@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-gui v3 3/3] objects: don't reload on match mode change
Date: Thu, 22 Feb 2024 10:14:20 +0100 [thread overview]
Message-ID: <20240222091420.2732402-4-d.csapak@proxmox.com> (raw)
In-Reply-To: <20240222091420.2732402-1-d.csapak@proxmox.com>
instead update the record of the object list, and update the visibility
of the 'whatWarning'
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
js/ObjectGroup.js | 6 +++++-
js/ObjectGroupConfiguration.js | 7 ++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/js/ObjectGroup.js b/js/ObjectGroup.js
index 214e641..d72d47c 100644
--- a/js/ObjectGroup.js
+++ b/js/ObjectGroup.js
@@ -263,7 +263,11 @@ Ext.define('PMG.ObjectGroup', {
and,
invert,
},
- success: () => me.fireEvent('modeUpdate', me),
+ success: () => {
+ me.fireEvent('modeUpdate', me, !!and, !!invert);
+ me.down('#whatWarning')
+ .setHidden(me.objectClass !== 'what' || value === 'any');
+ },
});
},
},
diff --git a/js/ObjectGroupConfiguration.js b/js/ObjectGroupConfiguration.js
index eb80032..d22c60d 100644
--- a/js/ObjectGroupConfiguration.js
+++ b/js/ObjectGroupConfiguration.js
@@ -41,7 +41,12 @@ Ext.define('PMG.ObjectGroupConfiguration', {
left.run_editor();
}
},
- modeUpdate: () => left.reload(),
+ modeUpdate: (_cmp, and, invert) => {
+ let rec = left.selModel.getSelection()[0];
+ rec.set('and', and);
+ rec.set('invert', invert);
+ rec.commit();
+ },
},
});
--
2.30.2
next prev parent reply other threads:[~2024-02-22 9:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 9:14 [pmg-devel] [PATCH pmg-gui v3 0/3] implement and combination and inversion of groups and objects Dominik Csapak
2024-02-22 9:14 ` [pmg-devel] [PATCH pmg-gui v3 1/3] rules: use tree panel instead of grouping feature of the grid Dominik Csapak
2024-02-22 9:14 ` [pmg-devel] [PATCH pmg-gui v3 2/3] rules/objects: add mode selector dropdown Dominik Csapak
2024-02-22 9:14 ` Dominik Csapak [this message]
2024-02-22 13:19 ` [pmg-devel] [PATCH pmg-gui v3 0/3] implement and combination and inversion of groups and objects Stoiko Ivanov
2024-02-22 13:26 ` Thomas Lamprecht
2024-02-22 13:51 ` Stoiko Ivanov
2024-02-22 14:24 ` [pmg-devel] applied: " Thomas Lamprecht
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=20240222091420.2732402-4-d.csapak@proxmox.com \
--to=d.csapak@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