1
0

Added a tooltip on hovering version numbers. Will show details soon.

This commit is contained in:
2018-01-07 00:55:45 +01:00
parent 61706d8651
commit 29d65bed78
3 changed files with 81 additions and 8 deletions

View File

@ -64,22 +64,22 @@ foreach ($allVars as $family => $models) {
$allVersions = $db->getAllVersionsForModel($model);
echo '<table><tbody>';
foreach ($variants as $ref => $name) {
echo '<tr><td class="ref">';
echo '<tr data-ref="' . $ref . '"><th class="ref">';
if (mb_strlen($name) > 0) {
echo '<abbr title="' . $name . '">' . $ref . '</abbr>';
} else {
echo $ref;
}
echo '</td>';
echo '</th>';
$refVersions = $db->getAllVersionsForRef($ref);
$allOta = $db->getAllVersionsForRef($ref, $db::OTA_ONLY);
foreach ($allVersions as $v) {
if (in_array($v, $refVersions, true)) {
if (in_array($v, $allOta)) {
echo '<td>' . $v . '</td>';
} else {
echo '<td class="fullonly mdc-theme--secondary-dark">' . $v . '</td>';
$moreClasses = '';
if (!in_array($v, $allOta)) {
$moreClasses = ' fullonly mdc-theme--secondary-dark';
}
echo '<td class="version' . $moreClasses . '">' . $v . '</td>';
} else {
echo '<td class="empty">- - -</td>';
}
@ -91,6 +91,14 @@ foreach ($allVars as $family => $models) {
echo '</div>';
}
?>
<div id="tooltip" class="mdc-card">
<section class="mdc-card__primary">
<h1 id="tooltip-title" class="mdc-card__title">Title</h1>
</section>
<section id ="tooltip-text" class="mdc-card__supporting-text">
Contents here.
</section>
</div>
</main>
</body>
</html>