Added style to radiobuttons

Wed, 30 Jul 2014 19:39:50 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Wed, 30 Jul 2014 19:39:50 +0200
changeset 154
83502d2099eb
parent 153
866a947b732a
child 155
0d86f3c0a07b

Added style to radiobuttons

www-thermferm/liveview.php file | annotate | diff | comparison | revisions
--- a/www-thermferm/liveview.php	Wed Jul 30 19:05:11 2014 +0200
+++ b/www-thermferm/liveview.php	Wed Jul 30 19:39:50 2014 +0200
@@ -132,7 +132,7 @@
 	$outstr .= '       });'.PHP_EOL;
 
 	$outstr .= '       var settings'.$unr.' = {'.PHP_EOL;
-	$outstr .= '         title: "Fermentation temperature '.$unr.'",'.PHP_EOL;
+	$outstr .= '         title: "Fermentation temperature",'.PHP_EOL;
 	$outstr .= '         description: "",'.PHP_EOL;
 	$outstr .= '         padding: { left: 5, top: 5, right: 5, bottom: 5 },'.PHP_EOL;
 	$outstr .= '         titlePadding: { left: 90, top: 0, right: 0, bottom: 10 },'.PHP_EOL;
@@ -159,22 +159,23 @@
 	$outstr .= '             ]'.PHP_EOL;
 	$outstr .= '           }]'.PHP_EOL;
 	$outstr .= '       };'.PHP_EOL;
-	$outstr .= '       $("#fermentor_chart_'.$unr.'").jqxChart(settings'.$unr.');'.PHP_EOL;
+	$outstr .= '       $("#fermentor_chart_'.$unit.'").jqxChart(settings'.$unr.');'.PHP_EOL;
 	strcmp($mode, "OFF") ? $se = "" : $se = ", checked: true";
-	$outstr .= '       $("#selButton1_'.$unit.'").jqxRadioButton({ groupName: "'.$unit.'", width: 150, height: 18'.$se.'});'.PHP_EOL;
+	$outstr .= '       $("#selButton1_'.$unit.'").jqxRadioButton({ groupName: "'.$unit.'", theme: "'.$my_style.'", width: 150, height: 18'.$se.'});'.PHP_EOL;
 	strcmp($mode, "NONE") ? $se = "" : $se = ", checked: true";
-	$outstr .= '       $("#selButton2_'.$unit.'").jqxRadioButton({ groupName: "'.$unit.'", width: 150, height: 18'.$se.'});'.PHP_EOL;
+	$outstr .= '       $("#selButton2_'.$unit.'").jqxRadioButton({ groupName: "'.$unit.'", theme: "'.$my_style.'", width: 150, height: 18'.$se.'});'.PHP_EOL;
 	strcmp($mode, "FRIDGE") ? $se = "" : $se = ", checked: true";
-	$outstr .= '       $("#selButton3_'.$unit.'").jqxRadioButton({ groupName: "'.$unit.'", width: 150, height: 18'.$se.', disabled: true});'.PHP_EOL;
+	(strcmp($heater, "no") || strcmp($cooler, "no")) ? $dis = "" : $dis = ", disabled: true";
+	$outstr .= '       $("#selButton3_'.$unit.'").jqxRadioButton({ groupName: "'.$unit.'", theme: "'.$my_style.'", width: 150, height: 18'.$se.$dis.'});'.PHP_EOL;
 	strcmp($mode, "BEER") ? $se = "" : $se = ", checked: true";
-	$outstr .= '       $("#selButton4_'.$unit.'").jqxRadioButton({ groupName: "'.$unit.'", width: 150, height: 18'.$se.', disabled: true});'.PHP_EOL;
+	$outstr .= '       $("#selButton4_'.$unit.'").jqxRadioButton({ groupName: "'.$unit.'", theme: "'.$my_style.'", width: 150, height: 18'.$se.$dis.'});'.PHP_EOL;
 	strcmp($mode, "PROFILE") ? $se = "" : $se = ", checked: true";
-	$outstr .= '       $("#selButton5_'.$unit.'").jqxRadioButton({ groupName: "'.$unit.'", width: 150, height: 18'.$se.', disabled: true});'.PHP_EOL;
+	$outstr .= '       $("#selButton5_'.$unit.'").jqxRadioButton({ groupName: "'.$unit.'", theme: "'.$my_style.'", width: 150, height: 18'.$se.$dis.'});'.PHP_EOL;
 
 	$outstr .= '     });'.PHP_EOL;
 	$outstr .= '    </script>'.PHP_EOL;
 	$outstr .= '    <div id="fermentor">'.PHP_EOL;
-	$outstr .= '     <div id="fermentor_chart_'.$unr.'" style="width:720px; height:377px; float:left"></div>'.PHP_EOL;
+	$outstr .= '     <div id="fermentor_chart_'.$unit.'" style="width:720px; height:377px; float:left"></div>'.PHP_EOL;
 
 	$outstr .= '     <div id="fermentor_panel_top">'.PHP_EOL;
 	$outstr .= '      <div id="fermentor_selector">'.PHP_EOL;

mercurial