Skip to content

Commit 4ab3a26

Browse files
committed
Add tooltips for mapping
1 parent bfba591 commit 4ab3a26

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

head.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@
5656
$url = "https://dsomm.timo-pagel.de{$_SERVER['SCRIPT_NAME']}";
5757
echo "<link rel='canonical' href=$url>";
5858
?>
59+
<script>
60+
$(function () {
61+
$('[data-toggle="popover"]').popover({placement: "bottom", trigger: "hover"}).on('click', function () {
62+
$(this).popover('toggle');
63+
});
64+
})</script>
5965
</head>
6066

6167
<?php

index.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,4 @@
1313
echo "<h1>Activtities per Dimension</h1>";
1414
echo '<div class="extra">'.getInfos($dimensions) . '</div>';
1515
?>
16-
<script>
17-
$(function () {
18-
$('[data-toggle="popover"]').popover({placement: "bottom", trigger: "hover"}).on('click', function () {
19-
$(this).popover('toggle');
20-
});
21-
})</script>
16+

mappings.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ function getFlattenedArray($array, $index) {
4747
echo "<tr>";
4848
echo "<td>$dimension</td>";
4949
echo "<td>$subdimension</td>";
50-
echo "<td>$activityName</td>";
50+
$tooltip = "<div class='popoverdetails'>" . build_table_tooltip ( $content ) . "</div>";
51+
echo "<td><div data-toggle=\"popover\" data-title=\"$activityName\" data-content=\"$tooltip\" type=\"button\" data-html=\"true \">" . $activityName . "</div></td>";
5152
echo "<td>" . getFlattenedArray($content, "samm2") . "</td>";
5253
echo "<td>" . getFlattenedArray($content, "iso27001-2017") . "</td>";
5354
}

0 commit comments

Comments
 (0)