diff options
author | Yorhel <git@yorhel.nl> | 2020-11-01 13:53:44 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-11-01 13:53:46 +0100 |
commit | 180c4579b4af37a506e80c308fcfdd4ee5d3e177 (patch) | |
tree | 8af0919d3146edc9e6d44749c5710c2a01366d1b /data | |
parent | 23a098bc705bd38c1f7e59a78ef402da12287e6d (diff) |
Advsearch: Change model to be suitable for advanced search
Turns out my initial idea with a seperate FQuery type wasn't going to
work out all that well, and it's easier to handle this by treating
nested And/Or queries as just another field. The nested field type is
going to be responsible for some extra tasks.
Also added a global 'Data' type to pass around in various functions.
This would be needed at some point anyway, but now that nested fields
can create/manage subfields, we'll need to be able pass around the
global object identifiers thing already.
And while I was fixing this model, I had a brilliant idea regarding the
UI. I was originally planning an explicit split between "quick selection
mode" and "advanced search mode", where you could only build nested
queries in the latter. But it's actually pretty trivial to make the
advanced search mode look like the quick selection mode in the simple
case. Buttons to change nesting type and to add more fields will result
in a mode natural flow between the two modes. I've not implemented the
UI for that yet, though.
...to be continued
Diffstat (limited to 'data')
-rw-r--r-- | data/style.css | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/data/style.css b/data/style.css index a754315d..2472748b 100644 --- a/data/style.css +++ b/data/style.css @@ -1114,9 +1114,9 @@ p.filselect i { font-style: normal } /****** Advanced Search *******/ -.advsearch { max-width: 800px; margin: 0 auto } -.advsearch .quickselect { width: 100%; display: flex; flex-wrap: wrap } -.advsearch .quickselect > * { margin: 5px; width: 150px } +.advsearch { max-width: 800px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center } +.advsearch .advrow { display: flex; flex-wrap: wrap } +.advsearch .advrow > * { margin: 5px; width: 150px } .advsearch .advheader { box-sizing: border-box; background-color: $_blendbg$; padding: 3px; width: 100%; margin-bottom: 2px } .advsearch .advheader > h3 { text-align: center; font-weight: bold; font-size: inherit; margin-bottom: 3px } .advsearch .advheader .opts { display: flex; justify-content: space-between } |