mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
chore(bootstrap): import Bootstrap modules
This commit is contained in:
@@ -11,6 +11,7 @@ import dialogService from "../../services/dialog.js";
|
||||
import options from "../../services/options.js";
|
||||
import type FNote from "../../entities/fnote.js";
|
||||
import type { NoteType } from "../../entities/fnote.js";
|
||||
import { Dropdown, Modal } from "bootstrap";
|
||||
|
||||
const TPL = `
|
||||
<div class="revisions-dialog modal fade mx-auto" tabindex="-1" role="dialog">
|
||||
@@ -101,9 +102,9 @@ export default class RevisionsDialog extends BasicWidget {
|
||||
private revisionId: string | null;
|
||||
|
||||
//@ts-ignore
|
||||
private modal: bootstrap.Modal;
|
||||
private modal: Modal;
|
||||
//@ts-ignore
|
||||
private listDropdown: bootstrap.Dropdown;
|
||||
private listDropdown: Dropdown;
|
||||
|
||||
private $list!: JQuery<HTMLElement>;
|
||||
private $listDropdown!: JQuery<HTMLElement>;
|
||||
@@ -126,12 +127,12 @@ export default class RevisionsDialog extends BasicWidget {
|
||||
doRender() {
|
||||
this.$widget = $(TPL);
|
||||
//@ts-ignore
|
||||
this.modal = bootstrap.Modal.getOrCreateInstance(this.$widget);
|
||||
this.modal = Modal.getOrCreateInstance(this.$widget);
|
||||
|
||||
this.$list = this.$widget.find(".revision-list");
|
||||
this.$listDropdown = this.$widget.find(".revision-list-dropdown");
|
||||
//@ts-ignore
|
||||
this.listDropdown = bootstrap.Dropdown.getOrCreateInstance(this.$listDropdown, { autoClose: false });
|
||||
this.listDropdown = Dropdown.getOrCreateInstance(this.$listDropdown, { autoClose: false });
|
||||
this.$content = this.$widget.find(".revision-content");
|
||||
this.$title = this.$widget.find(".revision-title");
|
||||
this.$titleButtons = this.$widget.find(".revision-title-buttons");
|
||||
|
||||
Reference in New Issue
Block a user