add search filters interface
Ticket
+solution
ADVANCED SEARCH
----------------
FILTERS (aka conditions, restrictions, wql snippets,.. )
filter is: cardtype? combination of UI (form), wql snippet, & target search:
ui template: "edited_by: "
wql snippet: {"edited_by":"_editor"}
target search: "Front page search"
notes: Filters paramaterize themselves. A full search interface may include lots of filters. Its conceivable, but out of scope, for filters to be added dynamically.
How it works:
Filter Jobs:
- On change, the filter performs a subtitution of the value currently in its UI to generate an "absolutized" wql snippet. It then finds the "target" Search (DOM node) on the page, and updates the filter hash (key by cardname of filter, stored in the DOM node). It then triggers the search to refresh. ( if there are multiple instances of the search on the page, all are updated. )
Search Interface Jobs:
- on refresh, pass all filters from the hash as CGI arguments
- on the receiving end, unescape CGIfied filters and pass them as arguments to WQL.
WQL Jobs:
- handle merging of snippets