chore(bootstrap): import Bootstrap modules

This commit is contained in:
Panagiotis Papadopoulos
2025-02-21 20:41:00 +01:00
parent fc6b9e00bc
commit ba3599911f
18 changed files with 44 additions and 26 deletions

View File

@@ -1,4 +1,5 @@
import BasicWidget from "../basic_widget.js";
import { Tooltip, Dropdown } from "bootstrap";
const TPL = `
<div class="dropdown right-dropdown-widget dropend">
@@ -28,10 +29,10 @@ export default class RightDropdownButtonWidget extends BasicWidget {
doRender() {
this.$widget = $(TPL);
this.$dropdownMenu = this.$widget.find(".dropdown-menu");
this.dropdown = bootstrap.Dropdown.getOrCreateInstance(this.$widget.find("[data-bs-toggle='dropdown']"));
this.dropdown = Dropdown.getOrCreateInstance(this.$widget.find("[data-bs-toggle='dropdown']"));
this.$tooltip = this.$widget.find(".tooltip-trigger").attr("title", this.title);
this.tooltip = new bootstrap.Tooltip(this.$tooltip, {
this.tooltip = new Tooltip(this.$tooltip, {
placement: this.settings.titlePlacement,
fallbackPlacements: [this.settings.titlePlacement]
});