Grundriss aus der Datenbank: Etagen und Raeume in homeMesh
Etagen, Raeume, Kachelpositionen und Kachelwerte standen als Tabelle in restricted/rooms.php, die Werte zusaetzlich ueberschreibbar in solarLog.kachelWerte. Fuer ein anderes Haus haette man den Quelltext umschreiben muessen. Jetzt liegen sie in homeMesh.floors und homeMesh.rooms (homeMesh_grundriss.sql). rooms.php liest sie und gibt sie in der bisherigen Form weiter; Startseite, Menue, Editor und Einstellungen sind unveraendert - vorher und nachher als HTML verglichen, gleich bis auf Livewerte und die zwei neuen Felder nr und thermostat in homeRooms. - Vorgabe einer Kachel ist jetzt allein das Thermostat (rooms.thermostat): Soll, Ist, Feuchte - sonst nichts. Was bisher im Code als Vorgabe stand, gilt damit als selbst gesetzt. - Grundrissbild je Etage (floors.bild) statt assets/img/<code>.png. - Standard-Etage (floors.standard) statt "OG" an vier Stellen. - meshDb() in eigener Datei, sonst Ring zwischen rooms.php und automations.php. - solarLog_kacheln.sql entfaellt; die Tabelle kachelWerte liest niemand mehr. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+4
-3
@@ -74,7 +74,7 @@ require_once(__DIR__ . "/reiter.php");
|
||||
to=<?= $andere === $etage ? "1.0" : "0.0" ?> dur="0.7s"
|
||||
repeatCount="1" calcMode="spline" keyTimes="0;1" keySplines=".1,0,.27,1" fill="freeze" />
|
||||
<?php endforeach; ?>
|
||||
<image href="assets/img/<?= $etage ?>.png" height="100%" width="100%" x=0 y=0 />
|
||||
<image href="<?= htmlspecialchars((string)etageBild($etage)) ?>" height="100%" width="100%" x=0 y=0 />
|
||||
</g>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
@@ -114,7 +114,7 @@ require_once(__DIR__ . "/reiter.php");
|
||||
</g>
|
||||
<?php endforeach; ?>
|
||||
<?php foreach (floorsWithPlan() as $floor): ?>
|
||||
<g id="<?= $floor ?>_Info" <?php if ($floor != "OG") echo 'opacity="0" '; ?><?php if($_GET["floor"] != $floor){echo "display='none'";} ?> >
|
||||
<g id="<?= $floor ?>_Info" <?php if ($floor != standardEtage()) echo 'opacity="0" '; ?><?php if($_GET["floor"] != $floor){echo "display='none'";} ?> >
|
||||
<?php foreach (array_map("mitWerten", roomsOnFloor($floor)) as $room): ?>
|
||||
<?php
|
||||
/*
|
||||
@@ -247,7 +247,8 @@ require_once(__DIR__ . "/reiter.php");
|
||||
// die der Browser dafuer beim Broker anmelden muss.
|
||||
const homeRooms = <?= json_encode(roomsWithTile(), JSON_UNESCAPED_UNICODE) ?>;
|
||||
const homeTopics = <?= json_encode(tileTopics(), JSON_UNESCAPED_UNICODE) ?>;
|
||||
<?php if ($_GET["floor"] != "OG" && in_array($_GET["floor"], floorsWithPlan())): ?>
|
||||
const homeStandardEtage = <?= json_encode(standardEtage()) ?>;
|
||||
<?php if ($_GET["floor"] != standardEtage() && in_array($_GET["floor"], floorsWithPlan())): ?>
|
||||
document.addEventListener('readystatechange', function () {
|
||||
if (event.target.readyState === 'complete') {
|
||||
switchFloor('<?= $_GET["floor"] ?>');
|
||||
|
||||
Reference in New Issue
Block a user