Hello.
We need to create two select fields with a hierarchical relationship. The
values available for the second field will change depending on the selected
value for the first field.
I started with the sample ticket clone plug in that uses the
ITemplateStreamFilter. I would like to interject some javascript to change
the options within the second select field as the first one is changed.
My code:
def filter_stream(self, req, method, filename, stream, data):
if filename == 'ticket.html':
ticket = data.get('ticket')
if ticket and ticket.exists:
filter = Transformer('//[EMAIL
PROTECTED]"comment:description"]')
#filter =
Transformer('//[EMAIL PROTECTED]"field-product_description"')
#filter = Transformer('//[EMAIL PROTECTED]"banner"]')
#filter = Transformer('head')
return stream | filter.after(self._insert(req, ticket,
data))
return stream
The code above works. When I comment out the filter for the h3 and try the
other filters, the HTML interjected by _insert is not added to the page.
Is there something obvious that I am doing wrong?
Thanks,
Ken
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---