[Planner Dev] [Fwd: HTML Export - my solution to my problem.]



Hello,

I couldn't find address to this list since project name and site have changed, so I've been exchanging email with Mikael who suggested to post the changes I made to HTML export here.
I'm forwarding our email below.

Regards to all,

Ryszard Klos

-------- Original Message --------
Subject: HTML Export - my solution to my problem.
Date: Wed, 26 Nov 2003 22:37:56 -0600
From: Ryszard Klos <ryszardklos netscape net>
To: micke imendio com
References: <3FB81DFB 4050309 netscape net> <1069293299 3969 12 camel chili home hallendal net>


Hello,

Today I've spent some time trying to meke HTML export work for me. I've just done it, so I'm writing what changes I had to make - just change few minus signs.

In 'mrproject2html.xsl' I've switched minus from first select to second.

<!-- Determine project length in seconds -->
<xsl:variable name="projlength">
  <xsl:for-each select="//project//task">
    <xsl:sort data-type="number"
     select=(had '-' before)    "date:seconds(date:add (date:date (concat (substring (@end, 1, 4),
                                                   '-', substring (@end, 5, 2),
                                                   '-', substring (@end, 7, 2))),
                               date:duration ((3600 * substring (@end, 10, 2))+
                                              (60 * substring (@end, 12, 2))+
                                              substring (@end, 14, 2))))"
      order="descending"/>
    <xsl:if test="position()=1">
      <xsl:copy-of
        select=(it was no '-' sign) "-(date:seconds ($projstart) - date:seconds (
                           date:add (date:date (concat (substring (@end, 1, 4),
                                                 '-', substring (@end, 5, 2),
                                                 '-', substring (@end, 7, 2))),
                               date:duration ((3600 * substring (@end, 10, 2))+
                                              (60 * substring (@end, 12, 2))+
                                              substring (@end, 14, 2)))))"/>
      </xsl:if>
    </xsl:for-each>
  </xsl:variable>



And in 'html1_gantt.xsl'

my line  <xsl:variable name="ttoday" select="$s2px * (date:seconds() + $sprojstart)"/>
old         <xsl:variable name="ttoday" select="$s2px * -(date:seconds() - $sprojstart)"/>

and

my
      <xsl:variable name="tstart"
        select="floor ($s2px * (date:seconds ($taskstart) + $sprojstart))"/>

      <xsl:variable name="tend"
        select="floor ($s2px * (date:seconds ($taskend) + $sprojstart))"/>

old
      <xsl:variable name="tstart"
        select="floor ($s2px * (-date:seconds ($taskstart) - $sprojstart))"/>

      <xsl:variable name="tend"
        select="floor ($s2px * (-date:seconds ($taskend) - $sprojstart))"/>

what looks betterfor me, when I'm adding time to project start date to get task start date.


Sincerely,

Ryszard Klos






micke imendio com wrote:
mån 2003-11-17 klockan 02.01 skrev Ryszard Klos:
  
Hi,
    

Hi!

  
I've just installed MrProject 0.10 and I've tried export to HTML, nice
feature, but there is something wrong with Gantt chart.
First of all the width of tasks, there are huge I have like 84000px for task
when table is set to 700px. There must be some multiplication by 500 
involved.
    

I was about to ask you to bug report this, then I realized we haven't
got the issue tracker up and running yet :) 

Richard we'll have to remember to add this once we do.

  
I don't know if this also causes browser like Konqueror to display this 
chart without any indentation. Netscape crashes for print preview and 
works extremally slow.
    

I've only tried in IE and Mozilla and it used to work (haven't checked
for quite a while though).

  
The end date of the project is incorrect.
    

In the HTML output?

  
I've check the HTML code in quanta, and looks like the indentation and 
width of the tasks are incorrect.
As far as MrProject I'd like to be able print chart with competition and
custom colors. 
    

Hmm .. you mean having different tasks with different colors in the
output? Do you mean completion? (ie. percentage done?)

  
Also when inserting task or subtask program should allow start writing
the task name without additional mouse click.
    

Hmm .. I guess we could focus the new entry, have you tried this
richard?

Regards,
  Mikael Hallendal
  


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]