Revision: 2d29c102a880
Author: Pekka Klärck
Date: Mon Jun 20 12:12:12 2011
Log: enhanced print support - both report and log look pretty good in
print now
http://code.google.com/p/robotframework/source/detail?r=2d29c102a880
Modified:
/src/robot/webcontent/common.css
/src/robot/webcontent/print.css
/src/robot/webcontent/report.css
/src/robot/webcontent/report.html
=======================================
--- /src/robot/webcontent/common.css Mon Jun 20 10:50:46 2011
+++ /src/robot/webcontent/common.css Mon Jun 20 12:12:12 2011
@@ -100,13 +100,13 @@
table.statistics th {
background: #C6C6C6;
}
-.col_stat_name {
- width: 40em;
-}
.col_stat {
width: 3em;
text-align: center;
}
+.col_graph {
+ width: 11em;
+}
.stat_name {
float: left;
}
@@ -129,9 +129,8 @@
background: red;
}
.graph {
- position: relative;
border: 1px solid black;
- width: 11em;
+ width: 100%;
height: 0.75em;
padding: 0px;
background: #E9E9E9;
=======================================
--- /src/robot/webcontent/print.css Tue Jun 14 23:23:59 2011
+++ /src/robot/webcontent/print.css Mon Jun 20 12:12:12 2011
@@ -1,17 +1,17 @@
body {
- background: white;
+ background: white !important;
padding: 0px;
font-size: 8pt;
}
-
a:link, a:visited {
color: black;
}
-
.header, table.details, table.statistics {
width: 100%;
}
-
-#generated_ago, .expand {
+#generated_ago, #report_or_log_link, #normal_selector, .expand {
display: none;
}
+#print_selector {
+ visibility: visible;
+}
=======================================
--- /src/robot/webcontent/report.css Mon Jun 20 10:32:45 2011
+++ /src/robot/webcontent/report.css Mon Jun 20 12:12:12 2011
@@ -1,10 +1,10 @@
/* Summary links */
a.summary_fail {
- color: red;
+ color: red !important;
font-weight: bold;
}
a.summary_pass {
- color: #009900;
+ color: #009900 !important;
}
/* Generic table styles */
table {
@@ -36,21 +36,22 @@
vertical-align: top;
padding-right: 1em;
border: none;
- padding: 2px 4px;
+ padding: 0.2em 0.4em;
}
table.details td {
vertical-align: top;
border: none;
- padding: 2px 4px;
+ padding: 0.2em 0.4em;
white-space: pre-wrap;
}
-#selector th, #selector td {
+table.details #selector th, table.details #selector td {
padding-top: 0.5em;
padding-bottom: 1em;
-}
-.normal_whitespace {
white-space: normal;
}
+#print_selector {
+ visibility: hidden;
+}
/* Tabs - adapted from http://www.htmldog.com/articles/tabs */
#detail_tabs {
list-style: none;
=======================================
--- /src/robot/webcontent/report.html Mon Jun 20 10:32:45 2011
+++ /src/robot/webcontent/report.html Mon Jun 20 12:12:12 2011
@@ -151,16 +151,19 @@
function ensureTotalDetailsAreVisible(type) {
document.getElementById('radio_'+type).checked = true;
+ $('#print_selector').text(type);
window.location.hash = 'total_'+type
}
function ensureTagDetailsAreVisible(name) {
document.getElementById('tag_detail_selector').value = name;
+ $('#print_selector').text(name);
window.location.hash = 'tag_'+name;
}
function ensureSuiteDetailsAreVisible(name) {
document.getElementById('suite_detail_selector').value = name;
+ $('#print_selector').text(name);
window.location.hash = 'suite_'+name;
}
@@ -340,7 +343,6 @@
</tr>
</script>
-
<script type="text/x-jquery-tmpl" id="detailsHeaderTemplate">
<h2 id="${linkTarget}">Test Details</h2>
<ul id="detail_tabs">
@@ -354,12 +356,13 @@
<table class="details" id="details_header">
<tr id="selector">
<th>Type:</th>
- <td class="normal_whitespace">
+ <td id="normal_selector">
<input id="radio_Critical Tests" type="radio" name="totals_radio"
onclick="totalDetailSelected('Critical Tests');">
<label for="radio_Critical Tests">Critical Tests</label><br>
<input id="radio_All Tests" type="radio" name="totals_radio"
onclick="totalDetailSelected('All Tests');">
<label for="radio_All Tests">All Tests</label>
</td>
+ <td id="print_selector"></td>
</tr>
</table>
</script>
@@ -368,7 +371,7 @@
<table class="details" id="details_header">
<tr id="selector">
<th>Name:</th>
- <td class="normal_whitespace">
+ <td id="normal_selector">
<select id="tag_detail_selector"
onchange="tagDetailSelected(this.options[this.selectedIndex].value);">
<option value="">Select tag...</option>
{{each tags}}
@@ -376,6 +379,7 @@
{{/each}}
</select>
</td>
+ <td id="print_selector"></td>
</tr>
</table>
</script>
@@ -384,7 +388,7 @@
<table class="details" id="details_header">
<tr id="selector">
<th>Name:</th>
- <td class="normal_whitespace">
+ <td id="normal_selector">
<select id="suite_detail_selector"
onchange="suiteDetailSelected(this.options[this.selectedIndex].value);">
<option value="">Select suite...</option>
{{each suites}}
@@ -392,6 +396,7 @@
{{/each}}
</select>
</td>
+ <td id="print_selector"></td>
</tr>
</table>
</script>