pda screen width optimized
authorBernhard Tittelbach <xro@realraum.at>
Fri, 23 Apr 2010 22:46:04 +0000 (22:46 +0000)
committerBernhard Tittelbach <xro@realraum.at>
Fri, 23 Apr 2010 22:46:04 +0000 (22:46 +0000)
powersensordaemon/switch.cgi

index 765778c..eb36804 100755 (executable)
@@ -42,20 +42,17 @@ echo "<head>"
 echo "<title>Realraum rf433ctl</title>"
 echo "</head>"
 echo "<body>"
-echo "<h1>Realraum rf433ctl</h1>"
-echo "<table cellspacing='0'>"
+#echo "<h1>Realraum rf433ctl</h1>"
 for DISPID in $VALIDIDS; do
   NAME="$(eval echo \$DESC_$DISPID)"
   [ -z "$NAME" ] && NAME=$DISPID
   echo "<form action=\"/cgi-bin/switch.cgi\">"
   echo "<input type=\"hidden\" name=\"id\" value=\"$DISPID\" />"
-#  echo " <tr><td>$NAME</td><td><a href=\"switch.cgi?id=$DISPID&power=on\"><button value=\"ON\" /></a></td><td><a href=\"switch.cgi?id=$DISPID&power=off\"><button value=\"OFF\" /></a></td></tr>"
-  echo "<tr><td style=\"font-size:11pt; border-top:1px solid black; border-right:1px solid black; border-left:1px solid black;\">$NAME</td></tr><tr><td align='right' style=\"border-bottom:1px solid black; border-right:1px solid black; border-left:1px solid black;\">"
+  echo "<div style=\"float:left; margin:2px; max-width:220px; font-size:11pt; border:1px solid black;\"><div style='width:9em; display:inline-block;'>$NAME</div><span style='float:right; text-align:right;'>"
   echo " <input type='submit' name='power' value='on' />"
   echo " <input type='submit' name='power' value='off' />"
-  echo "</td></tr><tr><td style=\"height:1ex;\"></td></tr>"
+  echo "</span></div>"
   echo "</form>"
 done
-echo "</table>"
 echo "</body>"
 echo "</html>"