Opened 17 years ago
Closed 17 years ago
#1772 closed enhancement (fixed)
Use Javascript and DOM to make things nicer on the ticket page.
Reported by: | Colin Guthrie | Owned by: | Russ Tyndall |
---|---|---|---|
Priority: | normal | Component: | TimingAndEstimationPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.10 |
Description
This take the same concept as currently employed to prevent the user from editing the totalhours field on the ticket page but extends it.
The code has been factored out into a separate .js file so save on download times.
Here is what it now does:
- Changes the totalhours field to a non-editable span (no change).
- Changes the estimated hours and total hours fields in the header table to be hours/minutes rather than a conceptually harder for humans decimal value!
- Changes the billable flag in the header table to read Yes or No rather than 1 or 0.
- Does the above two changes for all changelog entries through the ticket.
It's basic javascript and it is protected by exception handling so if it fails there should be no negative effects.
If you like this I've got a few more UI related improvements to add both here and on the Management page.
Let me know.
Col
Attachments (1)
Change History (5)
Changed 17 years ago by
comment:1 Changed 17 years ago by
Erm. Woops I realise I left in another patch I meant to post separately. It removes the reportnum key from the reports.py file as it's no longer needed. Ahh well :)
comment:2 Changed 17 years ago by
Hey, the diff viewer works now, sweet.
Checking it out now, but it sounds cool. I will try to get it applied after breakfast.
comment:3 Changed 17 years ago by
Nice. I think the diff viewer is still broken but it just "happens" to work here.... I still can't view the other diff I posted on the old Refactor ticket, so go figure ;)
Cheers
comment:4 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
added javascript provided by Colin Guthrie that:
- Changes the totalhours field to a non-editable span (no change).
- Changes the estimated hours and total hours fields in the header table to be hours/minutes rather than a conceptually harder for humans decimal value!
- Changes the billable flag in the header table to read Yes or No rather than 1 or 0.
- Does the above two changes for all changelog entries through the ticket.
The only change I made to the javascript was to not emit any javascript into the global environment, instead add everything as local to a function that gets executed. Should keep the browser's namespace a bit cleaner for greasemonkey/other scripts and what not.
Patch file - note the added .js file in htdocs.