home *** CD-ROM | disk | FTP | other *** search
/ ftp.tcs3.com / ftp.tcs3.com.tar / ftp.tcs3.com / DRIVERS / Audio / Office2010 / ProPlus.WW / ProPsWW2.cab / HIERARCHY.XSL < prev    next >
Extensible Markup Language  |  2007-02-04  |  6KB  |  182 lines

  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl">
  3.  
  4.     <!-- MAIN -->
  5.     <xsl:template match="/">
  6.         <html>
  7.         <head>
  8.             <title>Tree Menu</title>
  9.             <style type="text/css">
  10.             BODY, TABLE, TR, TD, DIV
  11.             {
  12.                 font-family:        tahoma, arial, sans-serif;
  13.                 font-size:            11px;
  14.             }
  15.  
  16.             .header TD
  17.             {
  18.                 background-color:    navy;
  19.                 color:                white;
  20.                 font-weight:        bold;
  21.             }
  22.  
  23.             .previewHeader
  24.             {
  25.                 background-color:    navy;
  26.             }
  27.  
  28.             .previewBody
  29.             {
  30.                 background-color:    lightgrey;
  31.             }
  32.  
  33.             .recordRow
  34.             {
  35.                 cursor:                default;
  36.             }
  37.  
  38.             #previewParentSubject
  39.             {
  40.                 font-size:            13px;
  41.                 color:                white;
  42.             }
  43.  
  44.             #previewSubject
  45.             {
  46.                 font-size:            17px;
  47.                 font-weight:        bold;
  48.                 color:                white;
  49.             }
  50.             </style>
  51.             <script language="javascript" src="Hierarchy.js"></script>
  52.         </head>
  53.         <body onload="highlightProjectTask()">
  54.  
  55.             <table cellpadding="3" cellspacing="0" border="1" width="100%">
  56.             <tr class="header">
  57.                 <td>Task</td>
  58.                 <td width="100">Start</td>
  59.                 <td width="100">Finish</td>
  60.                 <td width="100">Assigned To</td>
  61.                 <td width="100">Priority</td>
  62.                 <td width="100">Status</td>
  63.                 <td width="100">Description</td>
  64.             </tr>
  65.             <xsl:apply-templates select="ProjectToolReport/Task"/>
  66.             </table>
  67.  
  68.             <br/>
  69.  
  70.             <table cellpadding="2" cellspacing="0" border="0" width="100%">
  71.             <tr>
  72.                 <td class="previewHeader">
  73.                     <table cellpadding="2" cellspacing="0" border="0">
  74.                     <tr>
  75.                         <td width="30" rowspan="2"></td>
  76.                         <td id="previewParentSubject"></td>
  77.                     </tr>
  78.                     <tr>
  79.                         <td id="previewSubject"></td>
  80.                     </tr>
  81.                     </table>
  82.                 </td>
  83.             </tr>
  84.             <tr>
  85.                 <td class="previewBody">
  86.                     <table cellpadding="2" cellspacing="0" border="0">
  87.                     <tr>
  88.                         <td width="30" rowspan="6"></td>
  89.                         <td id="previewAssignedToLabel">Assigned To:</td>
  90.                         <td width="15" rowspan="6"></td>
  91.                         <td id="previewAssignedTo"></td>
  92.                     </tr>
  93.                     <tr>
  94.                         <td>Start Date:</td>
  95.                         <td id="previewStartDate"></td>
  96.                     </tr>
  97.                     <tr>
  98.                         <td>Finish Date:</td>
  99.                         <td id="previewDueDate"></td>
  100.                     </tr>
  101.                     <tr>
  102.                         <td>Status:</td>
  103.                         <td id="previewStatus"></td>
  104.                     </tr>
  105.                     <tr>
  106.                         <td>Priority:</td>
  107.                         <td id="previewPriority"></td>
  108.                     </tr>
  109.                     <tr>
  110.                         <td>Description:</td>
  111.                         <td id="previewDescription"></td>
  112.                     </tr>
  113.                     </table>
  114.                 </td>
  115.             </tr>
  116.             </table>
  117.  
  118.         </body>
  119.  
  120.         </html>
  121.     </xsl:template>
  122.  
  123.     <xsl:template match="Task">
  124.         <tr onclick="highlightRow(this)" class="recordRow" childstatus="visible">
  125.             <xsl:attribute name="id"><xsl:value-of select="ID"/></xsl:attribute>
  126.             <xsl:attribute name="parentid"><xsl:value-of select="ParentID"/></xsl:attribute>
  127.             <xsl:attribute name="depth"><xsl:eval>depth(this) - 2</xsl:eval></xsl:attribute>
  128.             <xsl:attribute name="ProjectTaskId"><xsl:value-of select="ProjectTaskId"/></xsl:attribute>
  129.             <xsl:attribute name="ProjectTaskLeader"><xsl:value-of select="ProjectTaskLeader"/></xsl:attribute>
  130.             <!-- <xsl:attribute name="description"><xsl:value-of select="Description"/></xsl:attribute> -->
  131.             <td valign="top">
  132.                 <xsl:attribute name="id"><xsl:eval>getTaskId(this) + "_Subject"</xsl:eval></xsl:attribute>
  133.                 <img src="spacer.gif" height="9" align="absmiddle"><xsl:attribute name="width"><xsl:eval>(depth(this) - 2) * 9</xsl:eval></xsl:attribute></img>
  134.                 <xsl:choose>
  135.                     <xsl:when test="./Task">
  136.                         <a><xsl:attribute name="href"><xsl:eval>"javascript:collapseExpandRow('" + getTaskId(this) + "')"</xsl:eval></xsl:attribute><img src="minus.gif" width="9" height="9" hspace="3" border="0" align="absmiddle"><xsl:attribute name="id"><xsl:eval>getTaskId(this) + "Image"</xsl:eval></xsl:attribute></img></a>
  137.                     </xsl:when>
  138.                     <xsl:otherwise>
  139.                         <img src="spacer.gif" width="9" height="9" hspace="3" border="0" align="absmiddle"/>
  140.                     </xsl:otherwise>
  141.                 </xsl:choose>
  142.                 <xsl:value-of select="TaskName"/> 
  143.             </td>
  144.             <td  nowrap="true" valign="top">
  145.                 <xsl:attribute name="id"><xsl:eval>getTaskId(this) + "_StartDate"</xsl:eval></xsl:attribute>
  146.                 <xsl:value-of select="StartDate"/> 
  147.             </td>
  148.             <td width="100" nowrap="true" valign="top">
  149.                 <xsl:attribute name="id"><xsl:eval>getTaskId(this) + "_DueDate"</xsl:eval></xsl:attribute>
  150.                 <xsl:value-of select="FinishDate"/> 
  151.             </td>
  152.             <td width="100" nowrap="true" valign="top">
  153.                 <xsl:attribute name="id"><xsl:eval>getTaskId(this) + "_AssignedTo"</xsl:eval></xsl:attribute>
  154.                 <xsl:value-of select="AssignedTo"/> 
  155.             </td>
  156.             <td width="60" nowrap="true" valign="top">
  157.                 <xsl:attribute name="id"><xsl:eval>getTaskId(this) + "_Priority"</xsl:eval></xsl:attribute>
  158.                 <xsl:value-of select="Priority"/> 
  159.             </td>
  160.             <td width="60" nowrap="true" valign="top">
  161.                 <xsl:attribute name="id"><xsl:eval>getTaskId(this) + "_Status"</xsl:eval></xsl:attribute>
  162.                 <xsl:value-of select="Status"/> 
  163.             </td>
  164.             <td width="150"  wrap="true" valign="top">
  165.                 <xsl:attribute name="id"><xsl:eval>getTaskId(this) + "_Description"</xsl:eval></xsl:attribute>
  166.                 <xsl:value-of select="Description"/> 
  167.             </td>
  168.         </tr>
  169.         <xsl:apply-templates select="Task"/>
  170.     </xsl:template>
  171.  
  172.     <xsl:script>
  173.     <![CDATA[
  174.     function getTaskId(i_objNode)
  175.     {
  176.         return i_objNode.selectSingleNode("ID").text;
  177.     }
  178.     ]]>
  179.     </xsl:script>
  180.  
  181. </xsl:stylesheet>
  182.