
dkuttiyappan at atxg
Oct 10, 2008, 9:06 AM
Post #5 of 5
(138 views)
Permalink
|
Thanks for your response. I'm new to python and trac. I'm finding difficult to implement IRequestFilter to include the JS file in requests, and the ITemplateProvider to provide the JS file itself. As of now I won't upgrade my Trac. So the option of modifying ticket.html would be better for me. Instead I modified the ticket.html in template by opening in notepad and editing it. As a trial I just modified the name of change history to chage hitory. But the changes are not reflected. I restarted the web server. I installed trac using Jumpbox. So I closed it and opened it again. Yet I could not see the changes in my trac page. Am I doing anything wrong? Kindly help me to resolve it. I'm looking forward to your reply. Thanks, Damu -----Original Message----- From: trac-users[at]googlegroups.com [mailto:trac-users[at]googlegroups.com] On Behalf Of Erik Bray Sent: Friday, October 10, 2008 10:44 AM To: trac-users[at]googlegroups.com Subject: [Trac] Re: How to add button in Ticket.html On Thu, Oct 9, 2008 at 4:46 PM, Kuttiyappan, Damodharan (CONTRACTOR) <dkuttiyappan[at]atxg.com> wrote: > Even after restarting the server, I could not able to see the changes. > > I there any other place we need to make the changes like in web_ui.py > > Thanks, > Damu No, you really shouldn't have to modify anything, in fact. This could be done as a plugin that implements the IRequestFilter interface, and uses that to include a JavaScript file on all requests to the ticket module. The JavaScript itself could then insert your Hide/Show button into the page's DOM and implement the functionality. This has the added benefit that the link won't even be displayed for users not using JavaScript (and therefore unable to use the feature anyways). It also means that you won't have to re-implement your modifications to the template every time you upgrade Trac. See http://trac.edgewall.org/wiki/TracDev/PluginDevelopment for an intro to Trac plugin development. Your plugin basically needs to implement IRequestFilter to include the JS file in requests, and the ITemplateProvider to provide the JS file itself. Ask back if you have any more questions. Of course, if you still want to go ahead with modifying the template, just modifying the template file and restarting the web server should do it. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to trac-users[at]googlegroups.com To unsubscribe from this group, send email to trac-users+unsubscribe[at]googlegroups.com For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---
|