Changeset 530 for trunk/coverager
- Timestamp:
- 02/20/2008 03:48:48 AM (11 months ago)
- Location:
- trunk/coverager
- Files:
-
- 3 modified
-
coverager.css (modified) (2 diffs)
-
coverager.php (modified) (3 diffs)
-
coverager.tpl.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/coverager/coverager.css
r461 r530 3 3 th { font-size: 12px; } 4 4 table { border-collapse: collapse; } 5 table.center { margin-left: auto; margin-right: auto; } 6 table\-center { text-align: center; } 5 7 table.cycles { border: 1px solid black; margin-top: 5px; margin-bottom: 5px; } 6 8 table.cycles .col1 { background-color: #f5f5f5; } … … 55 57 .lineCov { background-color: #F0F0F0; } 56 58 .lineNoCov { background-color: #ffe0e0; } 59 div.code { 60 border: 1px solid gray; 61 font-size: 12px; 62 } 57 63 pre.code { 58 64 font-family: monospace; 59 65 font-size: 12px; 60 66 white-space: pre; 61 border: 1px solid gray;67 padding: 0; margin: 0; 62 68 } 63 69 -
trunk/coverager/coverager.php
r464 r530 114 114 $lines = explode('<br />', $lines); 115 115 $last = array_pop($lines); 116 $lines[count($lines) - 1] = $last; 116 117 $filecov = sprint_cov($fileinfo['cov'], $lines, false); 117 $filecov .= $last;118 118 unset($source); 119 119 } … … 325 325 } 326 326 if (isset($cov[$offs])) { 327 $lines[$l] = sprintf("<li class=\"line%sCov\"> %s\t%s\n</li>"327 $lines[$l] = sprintf("<li class=\"line%sCov\"><pre class=\"code\"> %s\t%s\n</pre></li>" 328 328 , $cov[$offs] ? '' : 'No' 329 329 , $cov[$offs] … … 331 331 } 332 332 else { 333 $lines[$l] = "<li> \t$line\n</li>";333 $lines[$l] = "<li><pre class=\"code\">\t$line\n</pre></li>"; 334 334 } 335 335 } -
trunk/coverager/coverager.tpl.php
r393 r530 1 <!DOCTYPE HTMLPUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 3 <head> … … 56 56 $l_tds = _T("TODO"); 57 57 return <<<EOS 58 <table align="center" cellpadding="2" cellspacing="0" border="0" class="cycles"> 58 <div class="table-center"> 59 <table cellpadding="2" cellspacing="0" border="0" class="cycles center"> 59 60 <tr> 60 61 <th>{$l_dir}</th><th>{$l_per}</th><th>{$l_hit}</th><th>{$l_lns}</th><th>{$l_tds}</th> … … 105 106 return <<<EOS 106 107 </table> 108 </div> 107 109 EOS; 108 110 } … … 117 119 $l_lns = _T("Lines"); 118 120 return <<<EOS 119 <br>120 <table align="center" cellpadding="2" cellspacing="0" border="0" class="cycles">121 <div class="center-table"> 122 <table cellpadding="2" cellspacing="0" border="0" class="cycles center"> 121 123 <tr> 122 124 <th>{$l_fil}</th><th>{$l_per}</th><th>{$l_hit}</th><th>{$l_lns}</th> … … 162 164 return <<<EOS 163 165 </table> 166 </div> 164 167 EOS; 165 168 } … … 172 175 $path_html = htmlspecialchars($path); 173 176 echo <<<EOS 174 <a href="?">$l_root</a> $path<br /> 177 <div> 178 <a href="?">$l_root</a> $path<br /> 179 </div> 175 180 EOS; 176 181 echo dir_head($dirinfo); … … 199 204 $dir_html = htmlspecialchars($dir); 200 205 echo <<<EOS 201 <a href="?">$l_root</a> <a href="?path={$dir_url}">{$dir_html}</a>/<strong>{$filename}</strong><br /> 206 <div> 207 <a href="?">$l_root</a> <a href="?path={$dir_url}">{$dir_html}</a>/<strong>{$filename}</strong><br /> 208 </div> 202 209 EOS; 203 210 … … 209 216 $tplfile_html = htmlspecialchars($tplfile); 210 217 echo <<<EOS 211 <a href="#tpl">{$tplfile_html}</a><br /> 218 <div> 219 <a href="#tpl">{$tplfile_html}</a><br /> 220 </div> 212 221 EOS; 213 222 } … … 216 225 } 217 226 echo <<<EOS 218 <pre class="code"><ol>{$filecov}</ol></pre> 227 <div class="code"> 228 <ol>{$filecov}</ol> 229 </div> 219 230 EOS; 220 231 if ($tplfile) { 221 232 echo <<<EOS 222 233 <a name="tpl">{$tplfile}</a> 223 <pre class="code"><ol>{$tplcov}</ol></pre> 234 <div class="code"> 235 <ol>{$tplcov}</ol> 236 </div> 224 237 EOS; 225 238 }

