From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-gui 2/2] RegexTester: find correct component
Date: Thu, 12 Nov 2020 18:57:57 +0100 [thread overview]
Message-ID: <20201112175757.25201-3-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20201112175757.25201-1-s.ivanov@proxmox.com>
the regular expression field is not necessarily after the regex tester
(mostly it is before). In order to be more robust, use child instead of
previousSibling
Tested with:
* mailproxy whitelist
* match field
* match filename
* who object
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
Thanks to Dominik for pointing me in the right direction!
js/RegexTester.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/RegexTester.js b/js/RegexTester.js
index 3b03f6d..486c197 100644
--- a/js/RegexTester.js
+++ b/js/RegexTester.js
@@ -26,7 +26,7 @@ Ext.define('PMG.RegexTester', {
text: 'Test',
handler: function(btn) {
let view = this.up();
- let regexField = btn.nextSibling(`field[reference=${view.regexFieldReference}]`);
+ let regexField = view.up().child(`field[reference=${view.regexFieldReference}]`);
let regex = regexField.getValue();
if (view.wholeMatch) {
--
2.20.1
next prev parent reply other threads:[~2020-11-12 17:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-12 17:57 [pmg-devel] [PATCH pmg-gui 0/2] fix regex tester Stoiko Ivanov
2020-11-12 17:57 ` [pmg-devel] [PATCH pmg-gui 1/2] buildsys: rm -f .lint-incremental Stoiko Ivanov
2020-11-13 7:16 ` [pmg-devel] applied: " Thomas Lamprecht
2020-11-12 17:57 ` Stoiko Ivanov [this message]
2020-11-13 7:17 ` [pmg-devel] applied: [PATCH pmg-gui 2/2] RegexTester: find correct component 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=20201112175757.25201-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