Ticket #1772 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

Use Javascript and DOM to make things nicer on the ticket page.

Reported by: coling Assigned to: bobbysmith007
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

dom.diff (9.0 kB) - added by coling on 07/11/07 17:23:26.
Patch file - note the added .js file in htdocs.

Change History

07/11/07 17:23:26 changed by coling

  • attachment dom.diff added.

Patch file - note the added .js file in htdocs.

07/11/07 17:24:44 changed by coling

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 :)

07/12/07 08:38:49 changed by bobbysmith007

Hey, the diff viewer works now, sweet.

Checking it out now, but it sounds cool. I will try to get it applied after breakfast.

07/12/07 08:48:50 changed by coling

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

07/12/07 10:25:20 changed by bobbysmith007

  • status changed from new to closed.
  • resolution set to fixed.

(In [2460]) closes #1772

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.


Add/Change #1772 (Use Javascript and DOM to make things nicer on the ticket page.)




Change Properties
Action