Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#9268 closed enhancement (fixed)

[PATCH] More charts per page patch

Reported by: jou Owned by: ChrisNelson
Priority: normal Component: TracJsGanttPlugin
Severity: normal Keywords:
Cc: salji.josipu@…, rjollos Trac Release: 0.12

Description

I added one more option <ID> which must be unique parameter for all macros on the page.
This enables use of more charts per page.

Attachments (5)

patch.zip (3.2 KB) - added by jou 3 years ago.
patch.2.zip (4.0 KB) - added by jou 3 years ago.
v2 DrawDependencies fixed
patch.3.zip (5.1 KB) - added by jou 3 years ago.
patch.4.zip (5.3 KB) - added by jou 3 years ago.
patched.files.zip (27.9 KB) - added by jou 3 years ago.
here are the patched files

Download all attachments as: .zip

Change History (27)

Changed 3 years ago by jou

comment:1 Changed 3 years ago by anonymous

  • Type changed from defect to enhancement

Changed 3 years ago by jou

v2 DrawDependencies fixed

comment:2 Changed 3 years ago by ChrisNelson

Thank you very much for this patch. It is a feature I have wanted for some time. However, I'm a little uncomfortable with a couple of aspects.

First, I don't like having to pass the chart ID to the task. Most of this code is fairly object-oriented and loosely coupled and I really want to:

  • Create a chart
  • Create some tasks
  • Tell the chart to display the task

Unfortunately, I'm not sure there's a better way since the original jsgantt.js uses IDs so much.

More importantly, I would prefer to not pass an ID to the plugin. It seems that the plugin could maintain a serial number and each time it is invoke, increment the serial number and use that for the ID. Or even use some part of the system time (microseconds since midnight or something) for the ID.

I will try to merge this in the next couple of weeks but if you could remove the ID option from the chart and let the plugin make up an ID that would make it easier for me.

Thanks again for your interest and contribution!

comment:3 follow-up: Changed 3 years ago by jou

ID< no more needed i patch 3.

Changed 3 years ago by jou

comment:4 in reply to: ↑ 3 Changed 3 years ago by ChrisNelson

Replying to jou:

ID< no more needed i patch 3.

Thanks.

comment:5 Changed 3 years ago by ChrisNelson

  • Status changed from new to assigned

comment:6 Changed 3 years ago by anonymous

  • Summary changed from More charts per page patch to [PATCH] More charts per page patch

comment:7 follow-up: Changed 3 years ago by ChrisNelson

Is patch3 comprehensive or do I need all the files?

comment:8 Changed 3 years ago by rjollos

  • Cc rjollos added

comment:9 in reply to: ↑ 7 Changed 3 years ago by jou

Replying to ChrisNelson:

Is patch3 comprehensive or do I need all the files?

It's comprehensive. But I noticed a bug, the hide/show option with subtickets is not working. I will correct it today.

Changed 3 years ago by jou

comment:10 Changed 3 years ago by anonymous

I fixed the problem with the hide/show feature - patch.4.zip

comment:11 follow-up: Changed 3 years ago by ChrisNelson

I'd love to use this but I can't apply it:

$ patch jsgantt.js ../../MoreCharts.patch 
(Stripping trailing CRs from patch.)
patching file jsgantt.js
Hunk #1 FAILED at 73.
Hunk #2 FAILED at 84.
Hunk #3 FAILED at 812.
Hunk #4 FAILED at 844.
Hunk #5 FAILED at 864.
Hunk #6 FAILED at 1164.
Hunk #7 FAILED at 1218.
Hunk #8 FAILED at 1485.
Hunk #9 FAILED at 1501.
Hunk #10 FAILED at 1509.
Hunk #11 FAILED at 1558.
Hunk #12 FAILED at 1576.
Hunk #13 FAILED at 1593.
Hunk #14 FAILED at 2067.
Hunk #15 FAILED at 2097.
Hunk #16 FAILED at 2105.
Hunk #17 FAILED at 2116.
Hunk #18 FAILED at 2124.
Hunk #19 FAILED at 2341.
19 out of 19 hunks FAILED -- saving rejects to file jsgantt.js.rej
(Stripping trailing CRs from patch.)
patching file jsgantt.js
Hunk #1 FAILED at 3.
Hunk #2 FAILED at 166.
Hunk #3 FAILED at 231.
Hunk #4 FAILED at 241.
Hunk #5 FAILED at 510.
Hunk #6 FAILED at 640.
Hunk #7 FAILED at 1015.
Hunk #8 FAILED at 1104.
8 out of 8 hunks FAILED -- saving rejects to file jsgantt.js.rej

Changed 3 years ago by jou

here are the patched files

comment:12 in reply to: ↑ 11 ; follow-up: Changed 3 years ago by jou

Replying to ChrisNelson:

I uploaded the patched files.

comment:13 in reply to: ↑ 12 Changed 3 years ago by ChrisNelson

Replying to jou:

Replying to ChrisNelson:

I uploaded the patched files.

Thank you but what is the basis for that change? When I diff that against my current tip there are more differences than yours.

comment:14 follow-up: Changed 3 years ago by anonymous

I took the code from svn - trunk.

comment:15 in reply to: ↑ 14 ; follow-up: Changed 3 years ago by ChrisNelson

Replying to anonymous:

I took the code from svn - trunk.

Yes. But when?

comment:16 in reply to: ↑ 15 Changed 3 years ago by jou

Replying to ChrisNelson:

Replying to jou:

I took the code from svn - trunk.

Yes. But when?

13.10.2011.

comment:17 Changed 3 years ago by ChrisNelson

I merged that to the current tip. It mostly seems to work. The format selector radio buttons don't have unique IDs so thee selection only shows up in one chart (the last one the user touches). I'll have to get that resolved before I can push this change.

comment:18 Changed 3 years ago by ChrisNelson

(In [10856]) Allow multiple charts per page. Refs #9268.

Based on a patch from jou. Thanks!

comment:19 Changed 3 years ago by ChrisNelson

(In [10857]) Fix format radio buttons in multiple charts. Refs #9268.

comment:20 Changed 3 years ago by anonymous

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

This works for me and I haven't heard any complaints in over a week.

comment:21 follow-up: Changed 3 years ago by rjollos

Sounds like the TracJsGanttPlugin#Knownissues could be removed.

comment:22 in reply to: ↑ 21 Changed 3 years ago by ChrisNelson

Replying to rjollos:

Sounds like the TracJsGanttPlugin#Knownissues could be removed.

Yeah, thanks; done. (Also removed some "Planned enhancements" that are done.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from ChrisNelson. Next status will be 'closed'.
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.