changeset 396:2b77599d0324

Stuff.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 05 Dec 2013 13:40:24 +0200
parents 9f95b27b8e52
children d8fd57e7b90e
files admajax.php admin.css msite.inc.php
diffstat 3 files changed, 40 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/admajax.php	Thu Dec 05 12:19:43 2013 +0200
+++ b/admajax.php	Thu Dec 05 13:40:24 2013 +0200
@@ -220,11 +220,12 @@
 
 function stGetShowModeButton($mode, $name, $cmode)
 {
-  return stGetFormRadioButtonInput(
-    "showMode", "", "", $mode,
-    $cmode == $mode,
-    $name,
-    "onClick=\"setShowMode(".$mode.")\"");
+  return
+    "<input type=\"radio\" id=\"showMode".$mode.
+    "\" name=\"showMode\" value=\"".$mode."\" ".
+    "onClick=\"setShowMode(".$mode.")\" ".
+    ($cmode == $mode ? "checked=\"checked\" ": "")."/>".
+    "<label for=\"showMode".$mode."\">".chentities($name)."</label>";
 }
 
 
@@ -498,18 +499,16 @@
       case "info":
         $showMode = stGetDisplayVar("showMode");
         echo
-          "<div id=\"ctrlGlobalControls\">\n".
-          "<div>\n".
+          "<div id=\"ctrlModeControls\">\n".
           "Active mode:\n".
           stGetShowModeButton(SMODE_DISABLED, "Off/disabled", $showMode)."\n".
           stGetShowModeButton(SMODE_ROTATE, "Slide rotation", $showMode)."\n".
           stGetShowModeButton(SMODE_COMPO, "Compo mode", $showMode)."\n".
           "</div>\n".
-          "<div>\n".
-          stGetFormButtonInput("syscheck", "", "", " Perform system check ", "performSystemCheck()")."\n".
-          stGetFormButtonInput("generate", "", "", " Add missing show positions ", "generateEntryPositions(0, 1)")."\n".
-          stGetFormButtonInput("regenerate", "", "", " ReGenerate ALL show positions ", "generateEntryPositions(0, 0)")."\n".
-          "</div>\n".
+          "<div id=\"ctrlSystemControls\">\n".
+          stGetFormButtonInput("syscheck", "", "", "Perform system check", "performSystemCheck()")."\n".
+          stGetFormButtonInput("generate", "", "", "Add missing show positions", "generateEntryPositions(0, 1)")."\n".
+          stGetFormButtonInput("regenerate", "", "", "ReGenerate ALL show positions", "generateEntryPositions(0, 0)")."\n".
           "</div>\n";
 
         echo
--- a/admin.css	Thu Dec 05 12:19:43 2013 +0200
+++ b/admin.css	Thu Dec 05 13:40:24 2013 +0200
@@ -1,3 +1,23 @@
+#ctrlModeControls input[type="radio"] {
+	display: none;
+}
+
+#ctrlModeControls input[type="radio"] + label:before {
+	content: "O";
+	display: inline-block;
+	color: green;
+	font-size: 2em;
+}
+
+#ctrlModeControls input[type="radio"]:checked + label:before {
+	content: "X";
+	display: inline-block;
+	color: red;
+	font-weight: bold;
+	font-size: 2em;
+}
+
+
 div.tabHeaders {
 	margin-top: 10pt;
 	margin-bottom: 0px;
@@ -103,7 +123,9 @@
 	background: rgba(0,255,0,0.2);
 }
 
-#ctrlGlobalControls {
+
+
+#ctrlModeControls, #ctrlSystemControls {
 	border: 2px solid green;
 	padding: 0.5em;
 	border-radius: 0.5em;
@@ -111,6 +133,9 @@
 	margin: 0.2em;
 }
 
+#ctrlSystemControls {
+}
+
 
 #ctrlEditDisplaySlide {
 	position: absolute;
--- a/msite.inc.php	Thu Dec 05 12:19:43 2013 +0200
+++ b/msite.inc.php	Thu Dec 05 13:40:24 2013 +0200
@@ -7,9 +7,9 @@
 require_once "msitegen.inc.php";
 
 // Define modes of party information display system
-define("SMODE_DISABLED", 0);
-define("SMODE_ROTATE", 1);
-define("SMODE_COMPO", 2);
+define("SMODE_DISABLED", 1);
+define("SMODE_ROTATE", 2);
+define("SMODE_COMPO", 3);
 
 
 // Define sizes of database fields, see createdb.php