Why isn't the "normalFont" class used to set the background color in
table rows and headers?  See http://style.tigris.org/ for an example.

[EMAIL PROTECTED] writes:

> stephenh    2002/11/01 15:20:38
> 
>   Modified:    src/conf default.properties
>                src/templates/doc/html datamodel.vm table.vm
>                xdocs    properties-reference.xml
>   Log:
>   - Added patch from Tom Schindl <[EMAIL PROTECTED]> to use some simple 
>CSS/Javascript stuff on the HTML schema output (works in both IE and Mozilla)
>   
>   - Changed patch to allow customization of font and fk highlight formatting via 
>torque.doc.html.normalFont and torque.doc.html.fkColor
>   
>   - Documented the new properties
>   
>   Revision  Changes    Path
>   1.12      +2 -0      jakarta-turbine-torque/src/conf/default.properties
>   
>   Index: default.properties
>   ===================================================================
>   RCS file: /home/cvs/jakarta-turbine-torque/src/conf/default.properties,v
>   retrieving revision 1.11
>   retrieving revision 1.12
>   diff -u -r1.11 -r1.12
>   --- default.properties      24 Oct 2002 20:31:04 -0000      1.11
>   +++ default.properties      1 Nov 2002 23:20:38 -0000       1.12
>   @@ -136,6 +136,8 @@
>    
>    torque.idTableXMLFile = ${idTableXMLFile}
>    torque.doc.format = ${documentationFormat}
>   +torque.doc.html.normalFont = font-family: Verdana; font-size: 10pt;
>   +torque.doc.html.fkColor = afe295
>    torque.initialID = ${initialID}
>    
>    
>   
>   
>   
>   1.4       +14 -10    jakarta-turbine-torque/src/templates/doc/html/datamodel.vm
>   
>   Index: datamodel.vm
>   ===================================================================
>   RCS file: /home/cvs/jakarta-turbine-torque/src/templates/doc/html/datamodel.vm,v
>   retrieving revision 1.3
>   retrieving revision 1.4
>   diff -u -r1.3 -r1.4
>   --- datamodel.vm    28 Sep 2002 16:15:32 -0000      1.3
>   +++ datamodel.vm    1 Nov 2002 23:20:38 -0000       1.4
>   @@ -2,21 +2,25 @@
>    <html>
>    <header>
>      <title>$dataModel.name</title>
>   +  <style>
>   +  .normalFont {
>   +    $docHtmlNormalFont
>   +  }
>   +  </style>
>    </header>
>    
>   -<body>
>   -  <h1><center>Torque Generated Tables</center></h1>
>   -  <table border="1">
>   -    <tr>
>   -      <th>Table Name</th>
>   -      <th>OM Class</th>
>   -      <th>Description</th>
>   +<body class="normalFont">
>   +  <table border="1" cellspacing="0" cellpadding="0">
>   +    <tr bgcolor="#CCCCCC">
>   +      <th class="normalFont">Table Name</th>
>   +      <th class="normalFont">OM Class</th>
>   +      <th class="normalFont">Description</th>
>        <tr>
>      #foreach ($tbl in $database.tables)
>        <tr>
>   -      <td><a href="#$tbl.Name">$tbl.Name</a></td>
>   -      <td>$tbl.JavaName</td>
>   -      <td>#if ($tbl.Description) $tbl.Description#else &nbsp;#end</td>
>   +      <td class="normalFont"><a href="#$tbl.Name">$tbl.Name</a></td>
>   +      <td class="normalFont">$tbl.JavaName</td>
>   +      <td class="normalFont">#if ($tbl.Description) $tbl.Description#else 
>&nbsp;#end</td>
>        </tr>
>      #end
>      </table>
>   
>   
>   
>   1.4       +29 -19    jakarta-turbine-torque/src/templates/doc/html/table.vm
>   
>   Index: table.vm
>   ===================================================================
>   RCS file: /home/cvs/jakarta-turbine-torque/src/templates/doc/html/table.vm,v
>   retrieving revision 1.3
>   retrieving revision 1.4
>   diff -u -r1.3 -r1.4
>   --- table.vm        29 Dec 2001 00:57:01 -0000      1.3
>   +++ table.vm        1 Nov 2002 23:20:38 -0000       1.4
>   @@ -2,29 +2,39 @@
>    <h2>$table.Name</h2>
>    $!table.Description
>    <p/>
>   -<table border="1">
>   +<table border="1" cellspacing="0">
>      <tr>
>   -    <th>Name</th>
>   -    <th>Type</th>
>   -    <th>Size</th>
>   -    <th>Default</th>
>   -    <th>JavaName</th>
>   -    <th>PK</th>
>   -    <th>FK</th>
>   -    <th>not null</th>
>   -    <th>Description</th>
>   +    <th class="normalFont" bgcolor="#CCCCCC">Name</th>
>   +    <th class="normalFont" bgcolor="#CCCCCC">Type</th>
>   +    <th class="normalFont" bgcolor="#CCCCCC">Size</th>
>   +    <th class="normalFont" bgcolor="#CCCCCC">Default</th>
>   +    <th class="normalFont" bgcolor="#CCCCCC">JavaName</th>
>   +    <th class="normalFont" bgcolor="#CCCCCC">PK</th>
>   +    <th class="normalFont" bgcolor="#CCCCCC">FK</th>
>   +    <th class="normalFont" bgcolor="#CCCCCC">not null</th>
>   +    <th class="normalFont" bgcolor="#CCCCCC">Description</th>
>      </tr>
>    #foreach ($col in $table.Columns)
>      <tr>
>   -    <td>$col.Name</td>
>   -    <td>$col.Type</td>
>   -    <td>#if ($col.printSize()) $col.printSize()#else &nbsp;#end</td>
>   -    <td>#if ($col.DefaultValue) $col.DefaultValue#else &nbsp;#end</td>
>   -    <td>$col.JavaName</td>
>   -    <td>#if ($col.isPrimaryKey()==true)X#else &nbsp;#end</td>
>   -    <td>#if ($col.isForeignKey()==true)X#else &nbsp;#end</td>
>   -    <td>#if ($col.isNotNull()==true)X#else &nbsp;#end</td>
>   -    <td>#if ($col.Description) $col.Description#else &nbsp;#end</td>
>   +    <td class="normalFont" id="$table.Name$col.Name">$col.Name</td>
>   +    <td class="normalFont">$col.Type</td>
>   +    <td class="normalFont">#if ($col.printSize() && $col.printSize().length() > 
>0) $col.printSize() #else &nbsp;#end</td>
>   +    <td class="normalFont">#if ($col.DefaultValue) $col.DefaultValue#else 
>&nbsp;#end</td>
>   +    <td class="normalFont">$col.JavaName</td>
>   +    <td class="normalFont"><center> #if ($col.isPrimaryKey()==true)X#else 
>&nbsp;#end </center></td>
>   +    <td class="normalFont"><center> #if ($col.isForeignKey()==true)X#else 
>&nbsp;#end </center></td>
>   +    <td class="normalFont"><center> #if ($col.isNotNull()==true)X#else &nbsp;#end 
></center></td>
>   +    <td class="normalFont">#if ($col.Description) $col.Description#else 
>&nbsp;#end</td>
>      </tr>
>    #end
>    </table>
>   +<script>
>   +#foreach ( $fk in $table.ForeignKeys )
>   +if( document.getElementById  )
>   +{
>   +var col = document.getElementById("$table.Name$fk.LocalColumnNames");
>   +col.style.backgroundColor = "$docHtmlFkColor";
>   +col.title="Foreignkey from $fk.ForeignTableName.$fk.ForeignColumnNames";
>   +}
>   +#end
>   +</script>
>   
>   
>   
>   1.5       +16 -0     jakarta-turbine-torque/xdocs/properties-reference.xml
>   
>   Index: properties-reference.xml
>   ===================================================================
>   RCS file: /home/cvs/jakarta-turbine-torque/xdocs/properties-reference.xml,v
>   retrieving revision 1.4
>   retrieving revision 1.5
>   diff -u -r1.4 -r1.5
>   --- properties-reference.xml        24 Oct 2002 20:31:05 -0000      1.4
>   +++ properties-reference.xml        1 Nov 2002 23:20:38 -0000       1.5
>   @@ -320,6 +320,22 @@
>      </td>
>    </tr>
>    <tr>
>   +  <td><code> torque.doc.html.normalFont </code></td>
>   +  <td><code> font-family: Verdana; font-size: 10pt; </code></td>
>   +  <td>
>   +    The value for the CSS class <code>normalFont</code> that is used to format
>   +    the text of the HTML output.
>   +  </td>
>   +</tr>
>   +<tr>
>   +  <td><code> torque.doc.html.fkColor </code></td>
>   +  <td><code> afe295 </code></td>
>   +  <td>
>   +    The color that the names of foreign key columns are highlighted with in the
>   +    HTML output.
>   +  </td>
>   +</tr>
>   +<tr>
>      <td><code> torque.initialID </code></td>
>      <td><code> 101 </code></td>
>      <td>

--
To unsubscribe, e-mail:   <mailto:turbine-torque-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-torque-dev-help@;jakarta.apache.org>

Reply via email to