mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-22 12:29:23 +02:00
* Patch from Graeme Geldenhuys to include javascript in css/xsl
git-svn-id: trunk@5465 -
This commit is contained in:
parent
ab2e7337e3
commit
b26b3e06dd
@ -4,19 +4,23 @@ body
|
|||||||
font-size: x-small;
|
font-size: x-small;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
a
|
a
|
||||||
{
|
{
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
background-color: Transparent
|
background-color: Transparent
|
||||||
}
|
}
|
||||||
|
|
||||||
a:link
|
a:link
|
||||||
{
|
{
|
||||||
color: #0033ff;
|
color: #0033ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:visited
|
a:visited
|
||||||
{
|
{
|
||||||
color: #003399;
|
color: #003399;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:active, a:hover
|
a:active, a:hover
|
||||||
{
|
{
|
||||||
color:#69c;
|
color:#69c;
|
||||||
@ -31,16 +35,17 @@ h2
|
|||||||
color: white;
|
color: white;
|
||||||
background-color: #006699;
|
background-color: #006699;
|
||||||
}
|
}
|
||||||
|
|
||||||
h3
|
h3
|
||||||
{
|
{
|
||||||
padding: 4px 4px 4px 6px;
|
padding: 4px 4px 4px 6px;
|
||||||
border: 1px solid #003399;
|
border: 1px solid #003399;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
/* #003399; */
|
|
||||||
background-color: #0099CC;
|
background-color: #0099CC;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-size: medium;
|
font-size: medium;
|
||||||
}
|
}
|
||||||
|
|
||||||
table
|
table
|
||||||
{
|
{
|
||||||
padding:0px;
|
padding:0px;
|
||||||
@ -48,12 +53,14 @@ table
|
|||||||
margin-left: -2px;
|
margin-left: -2px;
|
||||||
margin-right: -2px;
|
margin-right: -2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
th, td
|
th, td
|
||||||
{
|
{
|
||||||
padding: 2px 4px 2px 4px;
|
padding: 2px 4px 2px 4px;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
font-size: x-small;
|
font-size: x-small;
|
||||||
}
|
}
|
||||||
|
|
||||||
address
|
address
|
||||||
{
|
{
|
||||||
font-family: verdana, arial, helvetica, Sans-Serif;
|
font-family: verdana, arial, helvetica, Sans-Serif;
|
||||||
@ -65,42 +72,71 @@ address
|
|||||||
.title
|
.title
|
||||||
{
|
{
|
||||||
background-color: #bbb;
|
background-color: #bbb;
|
||||||
/* #bbb; #D8D8D8 #D3E4FF */
|
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.resultmessage
|
.resultmessage
|
||||||
{
|
{
|
||||||
background-color: #D3E4FF;
|
background-color: #D3E4FF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.success
|
.success
|
||||||
{
|
{
|
||||||
background-color: lightgreen;
|
background-color: lightgreen;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.failure
|
.failure
|
||||||
{
|
{
|
||||||
background-color: #FF00FF;
|
background-color: #FF00FF;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notrun
|
.notrun
|
||||||
{
|
{
|
||||||
background-color: yellow;
|
background-color: yellow;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.error
|
.error
|
||||||
{
|
{
|
||||||
background-color: red;
|
background-color: red;
|
||||||
color: black;
|
color: black;
|
||||||
font-size: 9pt;
|
font-size: 9pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right
|
.right
|
||||||
{
|
{
|
||||||
font-size: 8pt;
|
font-size: 8pt;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.backToTop
|
.backToTop
|
||||||
{
|
{
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.testsuitelabel
|
||||||
|
{
|
||||||
|
background-color: cadetblue;
|
||||||
|
color: black;
|
||||||
|
cursor:pointer; cursor:hand; /* cross browser hack */
|
||||||
|
padding-top: 3px;
|
||||||
|
border: 1px solid #F5F5F5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.testsuiteshowall
|
||||||
|
{
|
||||||
|
display:inline;
|
||||||
|
cursor:pointer; cursor:hand; /* cross browser hack */
|
||||||
|
}
|
||||||
|
|
||||||
|
.testsuitehideall
|
||||||
|
{
|
||||||
|
display:inline;
|
||||||
|
cursor:pointer; cursor:hand; /* cross browser hack */
|
||||||
|
}
|
||||||
|
|
||||||
|
div.testcontent {
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
@ -9,6 +9,56 @@
|
|||||||
<style type="text/css" title="fpcUnit" media="screen">
|
<style type="text/css" title="fpcUnit" media="screen">
|
||||||
@import "fpcunit.css";
|
@import "fpcunit.css";
|
||||||
</style>
|
</style>
|
||||||
|
<script>
|
||||||
|
window.onload = function () {
|
||||||
|
var x = document.getElementsByTagName('div');
|
||||||
|
for (var i=0;i<x.length;i++)
|
||||||
|
{
|
||||||
|
if (x[i].className == 'testsuitelabel')
|
||||||
|
x[i].onclick = clickSuite;
|
||||||
|
if (x[i].className == 'testsuiteshowall')
|
||||||
|
x[i].onclick = openSuites;
|
||||||
|
if (x[i].className == 'testsuitehideall')
|
||||||
|
x[i].onclick = closeSuites;
|
||||||
|
}
|
||||||
|
|
||||||
|
closeSuites();
|
||||||
|
}
|
||||||
|
|
||||||
|
function closeSuites()
|
||||||
|
{
|
||||||
|
var x = document.getElementsByTagName('div');
|
||||||
|
for (var i=0;i<x.length;i++)
|
||||||
|
{
|
||||||
|
if (x[i].className == 'testcontent')
|
||||||
|
x[i].style.display = 'none';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function openSuites()
|
||||||
|
{
|
||||||
|
var x = document.getElementsByTagName('div');
|
||||||
|
for (var i=0;i<x.length;i++)
|
||||||
|
{
|
||||||
|
if (x[i].className == 'testcontent')
|
||||||
|
x[i].style.display = 'block';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function clickSuite(e)
|
||||||
|
{
|
||||||
|
if (!e) var e = window.event;
|
||||||
|
if (e.target) var tg = e.target;
|
||||||
|
else if (e.srcElement) var tg = e.srcElement;
|
||||||
|
while (tg.nodeName != 'DIV') // Safari GRRRRRRRRRR
|
||||||
|
tg = tg.parentNode;
|
||||||
|
var nextSib = tg.nextSibling;
|
||||||
|
while (nextSib.nodeType != 1)
|
||||||
|
nextSib = nextSib.nextSibling;
|
||||||
|
var nextSibStatus = (nextSib.style.display == 'none') ? 'block' : 'none';
|
||||||
|
nextSib.style.display = nextSibStatus;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
@ -101,18 +151,24 @@ unexpected results.</p>
|
|||||||
<!-- Test Listing Table -->
|
<!-- Test Listing Table -->
|
||||||
<table border="0" rules="none" width="100%">
|
<table border="0" rules="none" width="100%">
|
||||||
<tr align="left" class="title">
|
<tr align="left" class="title">
|
||||||
<th width="89%" align="left">Name</th>
|
<td align="left">Name<br/><div class="testsuiteshowall">[show all]</div><div class="testsuitehideall">[hide all]</div></td>
|
||||||
<th width="11%" align="left">Elapsed Time<br/>(hh:mm:ss.zzz)</th>
|
<td width="150" align="right">Elapsed Time<br/>(hh:mm:ss.zzz)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<xsl:for-each select="TestListing/TestSuite/Test">
|
|
||||||
<xsl:variable name="testName" select="@Name"/>
|
|
||||||
<xsl:variable name="elapsedTime" select="ElapsedTime"/>
|
|
||||||
<tr class="success">
|
|
||||||
<td><xsl:value-of select="$testName"/></td>
|
|
||||||
<td><xsl:value-of select="ElapsedTime"/></td>
|
|
||||||
</tr>
|
|
||||||
</xsl:for-each>
|
|
||||||
</table>
|
</table>
|
||||||
|
<xsl:for-each select="TestListing/TestSuite">
|
||||||
|
<div class="testsuitelabel"><xsl:value-of select="@Name"/></div>
|
||||||
|
<div class="testcontent">
|
||||||
|
<table border="0" cellspacing="1" width="100%">
|
||||||
|
<xsl:for-each select="./Test">
|
||||||
|
<tr class="success">
|
||||||
|
<td><xsl:value-of select="@Name"/></td>
|
||||||
|
<td width="150" align="right"><xsl:value-of select="ElapsedTime"/></td>
|
||||||
|
</tr>
|
||||||
|
</xsl:for-each> <!-- Test -->
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</xsl:for-each> <!-- TestSuite -->
|
||||||
|
|
||||||
</div> <!-- testlisting -->
|
</div> <!-- testlisting -->
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user