diff --git a/src/main/resources/static/js/toolkit.js b/src/main/resources/static/js/toolkit.js index 118b1c8..8a86320 100644 --- a/src/main/resources/static/js/toolkit.js +++ b/src/main/resources/static/js/toolkit.js @@ -148,6 +148,23 @@ $(document).ready(function () { // Toasts $('.toast').each(function () { (new bootstrap.Toast(this, {})).show(); - }) + }); + // Tooltips + $('.xapi-alignment-tooltip').each(function () { + (new bootstrap.Tooltip(this, { + title: 'x', + container: this.parentNode, + placement: 'left' + })); + }).on('input', function () { + const tt = bootstrap.Tooltip.getInstance(this).tip; + tt.lastElementChild.innerText = this.value; + } + ); + $(window).on('inserted.bs.tooltip', function (ev) { + const inpEl = ev.target.parentNode.firstElementChild; + const tt = bootstrap.Tooltip.getInstance(inpEl).tip; + tt.lastElementChild.innerText = inpEl.value; + }); }); diff --git a/src/main/resources/templates/bootstrap/datasim/alignment.html b/src/main/resources/templates/bootstrap/datasim/alignment.html index 5397c21..6414906 100644 --- a/src/main/resources/templates/bootstrap/datasim/alignment.html +++ b/src/main/resources/templates/bootstrap/datasim/alignment.html @@ -65,7 +65,8 @@

Map affinities

-