Einstellungsseite: Reiter, Kachelwerte und Geraeteliste
Die Einstellungen bestanden aus einer einzigen langen Spalte mit den Preistabellen. Sie bekommt Reiter, und darin zwei neue Flaechen: was die Kacheln der Startseite anzeigen, und welche Geraete es ueberhaupt gibt. Reiter gab es vorher dreimal in drei Ausfuehrungen - die Etagen ueber den Automatismen mit eigenem switchTab(), die Geraetegruppen im Raum-Modal mit eigener CSS-Klasse, und die Einstellungsseite noch einmal anders. Jetzt baut restricted/reiter.php alle drei; umgeschaltet wird von Bootstrap, den offenen Reiter merkt reiterMerken() in der Adresse. Kachelwerte: was auf einer Kachel steht, stand fest in rooms.php. Die neue Tabelle kachelWerte (solarLog_kacheln.sql) ueberschreibt das je Raum, die Maske waehlt die Messwerte aus demselben Katalog wie der Automatik-Editor - nach Etage sortiert, die Geraete des eigenen Raums oben. Fehlt die Tabelle, zeigt jede Kachel weiter ihre Vorgabe. Geraete: die Zuordnung Geraet -> Raum war ein Modal, erreichbar ueber ein Zahnrad neben den Automatismen. Sie ist eine Einstellung und steht jetzt dort, zusammen mit dem, was fehlte: seit wann ein Geraet nichts mehr meldet, in welchen Automatiken es steckt, und ein Loeschknopf. Letzterer ist noetig, weil der Suchlauf nichts loescht - er legt an und frischt auf, damit die Automatiken ihre Zustands-Ids behalten; ein abgebautes Geraet bliebe sonst fuer immer stehen. Geloescht wird nur, was in keiner Automatik vorkommt. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+26
-22
@@ -1,4 +1,7 @@
|
||||
<?php require_once(__DIR__ . "/rooms.php"); ?>
|
||||
<?php
|
||||
require_once(__DIR__ . "/rooms.php");
|
||||
require_once(__DIR__ . "/reiter.php");
|
||||
?>
|
||||
<!--begin::App Main-->
|
||||
<main class="app-main">
|
||||
<!--begin::App Content Header-->
|
||||
@@ -185,12 +188,6 @@
|
||||
<div class="card-header pb-0 pt-1">
|
||||
<h3 class="card-title">Automatismen</h3>
|
||||
<div class="card-tools">
|
||||
<!-- Zuordnung Geraet -> Raum: sie ordnet die Geraeteliste im
|
||||
Editor nach Raeumen statt nach Geraeteart. -->
|
||||
<button type="button" class="btn btn-tool" title="Geräte den Räumen zuordnen"
|
||||
onclick="openRoomModal()">
|
||||
<i class="bi bi-house-gear"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-tool" data-lte-toggle="card-remove">
|
||||
<i class="bi bi-x-lg"></i>
|
||||
</button>
|
||||
@@ -198,28 +195,35 @@
|
||||
|
||||
</div>
|
||||
<div class="card-body pb-1">
|
||||
<div class="card-header p-0 pt-1">
|
||||
<ul class="nav nav-tabs" id="actions-tab" role="tablist">
|
||||
<?php foreach ($floors as $etage): $offen = $_GET["floor"] == $etage; ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?php if ($offen) echo "active"; ?>" id="actions-<?= $etage ?>-tab"
|
||||
href="#actions-<?= $etage ?>" onclick="switchTab('actions-<?= $etage ?>')"
|
||||
title="<?= htmlspecialchars(floorLabel($etage)) ?>"
|
||||
aria-controls="actions-<?= $etage ?>" aria-selected="<?= $offen ? "true" : "false" ?>"><?= $etage ?></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
/*
|
||||
* Eine Etage, ein Reiter. Gezeichnet von reiterLeiste() aus
|
||||
* restricted/reiter.php - dieselbe Bauart wie im Raum-Modal und
|
||||
* auf der Einstellungsseite. Frueher stand hier ein eigenes
|
||||
* Markup samt eigenem switchTab() in homeMQTT.js; umgeschaltet
|
||||
* wird jetzt von Bootstrap wie ueberall sonst.
|
||||
*
|
||||
* Der Name "actions" haelt die Element-Ids, an denen
|
||||
* autoActionFuncs.js haengt: actions-OG, actions-OG-list.
|
||||
*/
|
||||
$autoReiter = array_map(function ($etage) {
|
||||
return ["id" => $etage, "titel" => $etage,
|
||||
"titel2" => floorLabel($etage)];
|
||||
}, $floors);
|
||||
$autoOpt = ["name" => "actions", "aktiv" => $_GET["floor"],
|
||||
"klasse" => "mb-2"];
|
||||
$autoOpt["aktiv"] = reiterAktiv($autoReiter, $autoOpt);
|
||||
?>
|
||||
<?= reiterLeiste($autoReiter, $autoOpt) ?>
|
||||
<div class="tab-content" id="actions-tabContent">
|
||||
<?php foreach ($floors as $etage): ?>
|
||||
<div class="tab-pane fade <?php if ($_GET["floor"] == $etage) echo "active show"; ?>"
|
||||
id="actions-<?= $etage ?>" role="tabpanel" aria-labelledby="actions-<?= $etage ?>-tab">
|
||||
<?= reiterFlaecheAuf($etage, $autoOpt) ?>
|
||||
<!-- Inhalt kommt aus ajax/AutoAction.php?action=list, gefuellt von
|
||||
refreshAutomations() in js/solar/autoActionFuncs.js -->
|
||||
<div id="actions-<?= $etage ?>-list">Wird geladen...</div>
|
||||
<button type="button" class="btn btn-success" title="Neue Automatik"
|
||||
onclick="openAutoActionModal('?action=editor&floor=<?= $etage ?>')"><i class="bi bi-plus-square"></i></button>
|
||||
</div>
|
||||
<?= reiterFlaecheZu() ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user