source: timingandestimationplugin/branches/trac0.11/timingandestimationplugin/hours_layout_changer.py

Last change on this file was 10643, checked in by Russ Tyndall, 12 years ago

Backported hours_layout_changer from the trac12 branch - ver 0.9.8

File size: 633 bytes
Line 
1from trac.core import *
2from trac.web.api import IRequestFilter
3from trac.web.chrome import add_script
4
5class HoursLayoutChanger(Component):
6    """This moves the add hours box up to underneath the comment box.
7    This prevents needing to expand the "Modify Ticket" section to
8    add hours and a comment
9    """
10    implements(IRequestFilter)
11    def pre_process_request(self, req, handler):
12        return handler
13
14    def post_process_request(self, req, template, data, content_type):
15        if template == 'ticket.html':
16            add_script(req, "Billing/change_layout.js")
17        return (template, data, content_type)
18 
Note: See TracBrowser for help on using the repository browser.