www-thermferm/liveview.php

changeset 375
f707d22c72f8
parent 374
20999ef6d487
child 380
75afd21885f2
--- a/www-thermferm/liveview.php	Sun Jun 14 22:48:45 2015 +0200
+++ b/www-thermferm/liveview.php	Sun Jun 21 19:51:58 2015 +0200
@@ -201,13 +201,17 @@
 	$outstr .= '         document.close();'.PHP_EOL;
 	$outstr .= '         newWindow.print();'.PHP_EOL;
 	$outstr .= '       });'.PHP_EOL;
-	$outstr .= '       $("#print_'.$unr.'").jqxButton({ width: 100, height: 25, theme: "ui-redmond" });'.PHP_EOL;
+	$outstr .= '       $("#print_'.$unr.'").jqxButton({ width: 70, height: 25, theme: "ui-redmond" });'.PHP_EOL;
 
 	$outstr .= '       $("#pngButton_'.$unr.'").click(function () {'.PHP_EOL;
 			      	// call the export server to create a PNG image
 	$outstr .= '       	$("#fermentor_chart_'.$unit.'").jqxChart("saveAsPNG", "Chart_'.$name.'.png", getExportServer'.$unr.'());'.PHP_EOL;
 	$outstr .= '       });'.PHP_EOL;
-	$outstr .= '       $("#pngButton_'.$unr.'").jqxButton({ width: 100, height: 25, theme: "ui-redmond" });'.PHP_EOL;
+	$outstr .= '       $("#pdfButton_'.$unr.'").click(function () {'.PHP_EOL;
+	$outstr .= '            $("#fermentor_chart_'.$unit.'").jqxChart("saveAsPDF", "Chart_'.$name.'.pdf", getExportServer'.$unr.'());'.PHP_EOL;
+	$outstr .= '       });'.PHP_EOL;
+	$outstr .= '       $("#pngButton_'.$unr.'").jqxButton({ width: 70, height: 25, theme: "ui-redmond" });'.PHP_EOL;
+	$outstr .= '       $("#pdfButton_'.$unr.'").jqxButton({ width: 70, height: 25, theme: "ui-redmond" });'.PHP_EOL;
 
 	$outstr .= '       setInterval(function(){'.PHP_EOL;
 	$outstr .= '         $.getJSON("getstate.php?uuid='.$unit.'", function(data) {'.PHP_EOL;
@@ -409,9 +413,10 @@
 	$outstr .= '     </div> <!-- fermentor_panel_control -->'.PHP_EOL;
 
 	$outstr .= '     <div id="fermentor_panel_buttons">'.PHP_EOL;
-	$outstr .= '     <div style="margin-top: 2px; margin-left: 10px;">'.PHP_EOL;
-	$outstr .= '      <input style="float: left;" id="print_'.$unr.'" type="button" value="Print Graph" />'.PHP_EOL;
-	$outstr .= '      <input style="float: left; margin-left: 15px;" id="pngButton_'.$unr.'" type="button" value="Save Graph" />'.PHP_EOL;
+	$outstr .= '     <div style="margin-top: 2px; margin-left: 5px;">'.PHP_EOL;
+	$outstr .= '      <input style="float: left;" id="print_'.$unr.'" type="button" value="Print" />'.PHP_EOL;
+	$outstr .= '      <input style="float: left; margin-left: 7px;" id="pngButton_'.$unr.'" type="button" value="as PNG" />'.PHP_EOL;
+	$outstr .= '      <input style="float: left; margin-left: 7px;" id="pdfButton_'.$unr.'" type="button" value="as PDF" />'.PHP_EOL;
 	$outstr .= '     </div>'.PHP_EOL;
 	$outstr .= '     </div> <!-- fermentor_panel_buttons -->'.PHP_EOL;
 

mercurial