mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-10 10:24:31 +02:00
Use bootstrap popover for title attribute in datatables
This commit is contained in:
parent
b941b97eee
commit
91e9c6e048
1 changed files with 6 additions and 3 deletions
|
@ -59,13 +59,16 @@ class RegisterEventHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
registerTooltips() {
|
registerTooltips() {
|
||||||
this.registerLoadHandler(() => {
|
const handler = () => {
|
||||||
$(".tooltip").remove();
|
$(".tooltip").remove();
|
||||||
//Exclude dropdown buttons from tooltips, otherwise we run into endless errors from bootstrap (bootstrap.esm.js:614 Bootstrap doesn't allow more than one instance per element. Bound instance: bs.dropdown.)
|
//Exclude dropdown buttons from tooltips, otherwise we run into endless errors from bootstrap (bootstrap.esm.js:614 Bootstrap doesn't allow more than one instance per element. Bound instance: bs.dropdown.)
|
||||||
$('a[title], label[title], button[title]:not([data-bs-toggle="dropdown"]), p[title], span[title], h6[title], h3[title], i.fas[title]')
|
$('a[title], label[title], button[title]:not([data-bs-toggle="dropdown"]), p[title], span[title], h6[title], h3[title], i[title]')
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
.tooltip("hide").tooltip({container: "body", placement: "auto", boundary: 'window'});
|
.tooltip("hide").tooltip({container: "body", placement: "auto", boundary: 'window'});
|
||||||
});
|
};
|
||||||
|
|
||||||
|
this.registerLoadHandler(handler);
|
||||||
|
document.addEventListener('dt:loaded', handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
registerSpecialCharInput() {
|
registerSpecialCharInput() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue