I am working on a plugin which uses JavaScript to alter the display of the ticket /query result list
based on parameters in the URL, for example /query?status=accepted&myview=compact . The script will
detect the myview=compact in the URL and act accordingly.
The rationale is that that way, users can bookmark a combination of the filter parameters and the
view settings of my plugin, since it's all in the query string. Also, I do not have to alter the
generated HTML on Trac's server side.
When a user adjusts the parameters of a query to get a tailored list of tickets, the respective POST
request is apparently handled by QueryModule.process_request() im module ticket.query . In line 982
of the current version, a check for 'update' in req.args is performed, and if present, the redirect
req.redirect(query.get_href(req.href)) is triggered.
I would like my parameters to persist in the URL when the user changes filter settings and hits the
'update' button. According to my current understanding, I would have to hook into the above redirect
to basically achieve something like req.redirect(query.get_href(req.href) + '&myview=compact') in
QueryModule.process_request() .
I do not quite understand how I would achieve that using the plugin APIs. I have toyed a little with
IRequestFilter, but that did not get me anywhere.
Any hints, or sources achieving a similar effect, would be greatly appreciated.
Kind regards
Florian
--
You received this message because you are subscribed to the Google Groups "Trac
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to trac-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/trac-dev/dc6f787a-a33d-4366-912d-456425c2af53%40posteo.net.