Add info tooltip to subnet generator on /tools

This commit is contained in:
Laura Hausmann 2021-05-02 23:56:51 +02:00
parent 6efef7b368
commit 1b390fe2db
Signed by: zotan
GPG key ID: 5EC1D38FFC321311
3 changed files with 45 additions and 22 deletions

View file

@ -40,6 +40,11 @@ body {
border-top: none !important;
}
.tools span.hoverinfo {
font-size: 1.15em;
cursor: pointer;
}
@media (max-width: 767px) {
.tools .row > div {
padding: 0;
@ -102,4 +107,15 @@ body {
#subnet_out {
white-space: pre-wrap;
}
.tools .glyphicon-question-sign {
color: #ffffff;
cursor: default;
opacity: 0.25;
}
.tools .glyphicon-question-sign:hover {
opacity: 0.75;
}

View file

@ -24,6 +24,12 @@ subnetInput.oninput = subnetChanged;
$(document).ready(function() {
randomChanged();
$("span.glyphicon-question-sign").each(function(k, el) {
$(el).attr("data-title", $(el).closest("tr").find("th").text()).popover({
placement: "auto right",
container: "body",
});
});
});
function expandChanged(e){

View file

@ -92,6 +92,7 @@
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<span class="glyphicon glyphicon-question-sign pull-right hoverinfo" data-toggle="popover" data-trigger="hover" data-content="Example usage: To generate a random /64 subnet out of fd00::/8, use fd00::/8/64 as input"></span>
<h3 class="panel-title">Random Subnet</h3>
</div>
<div class="panel-body">