View Issue Details

IDProjectCategoryView StatusLast Update
464RackTablesdefaultpublic2013-10-05 23:55
Reporteruser105Assigned Toadoom42  
PrioritylowSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Target Version0.20.6Fixed in Version0.20.6 
Summary464: Printer-friendly CSS
DescriptionIt was requested on the mailing list to enable some printer-friendly CSS for a full rack view.
Additional InformationAndrzej wrote:

Is there any chances to get printable view of the whole rack?
So far I'm using small modification of css/pi.css file:

@media print{
body table.maintable { font-size: 80% }
.mainheader { display: none; }
.menubar { display: none; }
div.greynavbar { border-top-width: 0px; }
.greynavbar * a[class=std] { display: none; }
.greynavbar * a[class=attn] { display: none; }
td.atom.state_Th div a { color: red; font-weight: bold; }
td.atom div a { font-weight: normal ; }
}
TagsNo tags attached.

Relationships

has duplicate 705 closed Print View 

Activities

2011-09-02 04:53

 

464-Printer_Friendly.patch (4,148 bytes)   
Index: wwwroot/css/print.css
===================================================================
--- wwwroot/css/print.css	(revision 0)
+++ wwwroot/css/print.css	(revision 0)
@@ -0,0 +1,119 @@
+body table.maintable {
+	font-size: 80%;
+}
+
+.tdright {
+	text-align: right;
+}
+
+.tdleft {
+	text-align: left;
+}
+
+.tdcenter {
+	text-align: center;
+}
+
+table.objectview {
+	width: 100%;
+}
+
+td.pcleft {
+	vertical-align: top;
+	text-align: center;
+}
+
+td.pcright {
+	vertical-align: top;
+	text-align: center;
+}
+
+.mainheader {
+	display: none;
+}
+
+.menubar {
+	display: none;
+}
+
+#foldertab li {
+	list-style: none;
+	margin: 0;
+	display: none;
+}
+
+div.greeting {
+	display: none;
+}
+
+div.searchform {
+	display: none;
+}
+
+div.greynavbar {
+	border-top-width: 0px;
+}
+
+.greynavbar * a[class=std] {
+	display: none;
+}
+
+.greynavbar * a[class=attn] {
+	display: none;
+}
+
+td.atom.state_Th div a {
+	color: red;
+	font-weight: bold;
+}
+
+td.atom div a {
+	font-weight: normal;
+}
+
+.portlet {
+	text-align: center;
+	background-color: #ffffff;
+	border: 1px dashed #3c78b5;
+	padding: 5px;
+	margin: 5px;
+}
+
+.portlet h2 {
+	padding: 0px;
+	margin: 0px;
+}
+.portlet img {
+	display: none;
+}
+.portlet a {
+	color: black;
+	text-decoration: none;
+}
+
+.rack {
+	font: bold 12px Verdana, sans-serif;
+	border: 1px solid black;
+	border-top: 0px solid black;
+	border-right: 0px solid black;
+	text-align: center;
+}
+
+.rack th {
+	border-top: 1px solid black;
+	border-right: 1px solid black;
+}
+
+.rack td {
+	border-top: 1px solid black;
+	border-right: 1px solid black;
+}
+
+th.sticker {
+	text-align: right;
+}
+
+td.sticker {
+	text-align: left;
+}
+
Index: wwwroot/inc/interface.php
===================================================================
--- wwwroot/inc/interface.php	(revision 4775)
+++ wwwroot/inc/interface.php	(working copy)
@@ -7004,11 +7004,11 @@
 	echo implode(' : ', array_reverse ($items));
 	echo "</td>";
 	// Search form.
-	echo "<td><table border=0 cellpadding=0 cellspacing=0><tr><td>Search:</td>";
+	echo "<td><div class=searchform><table border=0 cellpadding=0 cellspacing=0><tr><td>Search:</td>";
 	echo "<form name=search method=get><td>";
 	echo '<input type=hidden name=page value=search>';
 	// This input will be the first, if we don't add ports or addresses.
-	echo "<input type=text name=q size=20 tabindex=1000></td></form></tr></table></td>";
+	echo "<input type=text name=q size=20 tabindex=1000></td></form></tr></table></div></td>";
 }
 
 function getTitle ($pageno)
Index: wwwroot/inc/init.php
===================================================================
--- wwwroot/inc/init.php	(revision 4775)
+++ wwwroot/inc/init.php	(working copy)
@@ -96,6 +96,7 @@
 	100 => "<link rel='ICON' type='image/x-icon' href='?module=chrome&uri=pix/favicon.ico' />",
 );
 addCSS ('css/pi.css');
+addCSS ('css/print.css', FALSE, 'print');
 
 if (!isset ($script_mode) or $script_mode !== TRUE)
 {
Index: wwwroot/inc/interface-lib.php
===================================================================
--- wwwroot/inc/interface-lib.php	(revision 4775)
+++ wwwroot/inc/interface-lib.php	(working copy)
@@ -532,7 +532,7 @@
 // They automatically appear in the <head> of your page.
 // $data is a CSS filename, or CSS code w/o tags around, if $inline = TRUE
 // Styles are included in the order of adding.
-function addCSS ($data, $inline = FALSE)
+function addCSS ($data, $inline = FALSE, $media = "screen")
 {
 	static $styles = array();
 	static $seen_filenames = array();
@@ -551,6 +551,7 @@
 		(
 			'type' => 'file',
 			'style' => $data,
+			'media' => $media,
 		);
 		$seen_filenames[$data] = 1;
 	}
@@ -569,7 +570,7 @@
 		if ($item['type'] == 'inline')
 			echo '<style type="text/css">' . "\n" . trim ($item['style'], "\r\n") . "\n</style>\n";
 		elseif ($item['type'] == 'file')
-			echo "<link rel=stylesheet type='text/css' href='?module=chrome&uri=${item['style']}' />\n";
+			echo "<link rel=stylesheet type='text/css' href='?module=chrome&uri=${item['style']}' media='${item['media']}' />\n";
 
 	// add JS scripts
 	foreach (addJS (NULL) as $group_name => $js_list)
464-Printer_Friendly.patch (4,148 bytes)   
infrastation

infrastation

2011-10-15 09:45

administrator   ~0000450

Retargeting, as long as this is not going to be implemented in the next couple of days.

Issue History

Date Modified Username Field Change
2011-09-02 04:32 user105 New Issue
2011-09-02 04:34 user105 Assigned To => user105
2011-09-02 04:34 user105 Status new => assigned
2011-09-02 04:34 user105 Projection none => minor fix
2011-09-02 04:34 user105 ETA none => < 1 month
2011-09-02 04:34 user105 Target Version => 0.19.10
2011-09-02 04:53 user105 File Added: 464-Printer_Friendly.patch
2011-10-15 09:45 infrastation Note Added: 0000450
2011-10-15 09:45 infrastation Target Version 0.19.10 => 0.19.11
2012-01-07 12:02 infrastation Target Version 0.19.11 => 0.19.12
2012-03-29 14:59 infrastation Target Version 0.19.12 => 0.19.13
2013-01-12 07:52 infrastation Relationship added has duplicate 705
2013-01-12 19:05 adoom42 Target Version 0.19.13 =>
2013-07-22 05:19 adoom42 Assigned To user105 =>
2013-07-22 05:22 adoom42 Status assigned => new
2013-10-05 23:55 adoom42 Assigned To => adoom42
2013-10-05 23:55 adoom42 Status new => closed
2013-10-05 23:55 adoom42 Resolution open => fixed
2013-10-05 23:55 adoom42 Fixed in Version => 0.20.6
2013-10-05 23:55 adoom42 Target Version => 0.20.6