$q = new StationQuery;
$q->joinWith('Station.System');
$stations = $q->orderBy('System.Name')->orderByName()->find();
+ echo "<div id=\"stations\">";
foreach ($stations as $station) {
$station_name = $station->getName();
$system_name = $station->getSystem()->getName();
$type = $station->getType();
echo "<p><strong>$station_name</strong> $type in <em>$system_name</em></p>\n";
}
+ echo "</div>";
echo "<hr>\n";
$sq = new SystemQuery;
$q = new SystemQuery;
$systems = $q->orderByName()->find();
if (! count($systems)) echo "<p>No systems</p>\n";
+ echo "<div id=\"systems\">\n";
foreach ($systems as $system) {
$system_name = $system->getName();
echo "<p><strong>$system_name</strong></p>\n";
}
+ echo "</div>\n";
echo "<hr>\n";
form();
--- /dev/null
+/* Document onload. */
+function loaded() {
+ var div = document.getElementById('stations');
+ console.log([div.offsetHeight, window.innerHeight].join(' vs '));
+ if (div && div.offsetHeight > window.innerHeight * 0.9) div.style.height = '80%';
+}
+
+document.onload = loaded();
table.entries { background-color: black; }
table.entries th, table.entries td { text-align: center; }
.classification .bbcode { display: none; background-color: rgba(0, 0, 0, 0.1); }
+#systems { overflow-x: auto; }
+#stations { overflow-x: auto; }
--- /dev/null
+/* Document onload. */
+function loaded() {
+ var div = document.getElementById('systems');
+ console.log([div.offsetHeight, window.innerHeight].join(' vs '));
+ if (div && div.offsetHeight > window.innerHeight * 0.9) div.style.height = '80%';
+}
+
+document.onload = loaded();