|
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 | |
|---|
| 1 | from trac.core import * |
|---|
| 2 | from trac.web.api import IRequestFilter |
|---|
| 3 | from trac.web.chrome import add_script |
|---|
| 4 | |
|---|
| 5 | class 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.