Modify

Opened 7 years ago

Closed 7 years ago

#1772 closed enhancement (fixed)

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

Reported by: coling Owned by: 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 (1)

dom.diff (9.0 KB) - added by coling 7 years ago.
Patch file - note the added .js file in htdocs.

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by coling

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

comment:1 Changed 7 years ago 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 :)

comment:2 Changed 7 years ago 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.

comment:3 Changed 7 years ago 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

comment:4 Changed 7 years ago by bobbysmith007

  • Resolution set to fixed
  • Status changed from new to closed

(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 Comment

Modify Ticket

Action
as closed The owner will remain bobbysmith007.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.