mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 19:12:27 +08:00
fix(client): import to bootstrap modal
This commit is contained in:
parent
80afac902a
commit
31a8d7dc9f
@ -1,5 +1,5 @@
|
|||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import bootstrap from "bootstrap";
|
import { Modal } from "bootstrap";
|
||||||
|
|
||||||
function reloadFrontendApp(reason?: string) {
|
function reloadFrontendApp(reason?: string) {
|
||||||
if (reason) {
|
if (reason) {
|
||||||
@ -205,7 +205,7 @@ function getMimeTypeClass(mime: string) {
|
|||||||
|
|
||||||
function closeActiveDialog() {
|
function closeActiveDialog() {
|
||||||
if (glob.activeDialog) {
|
if (glob.activeDialog) {
|
||||||
bootstrap.Modal.getOrCreateInstance(glob.activeDialog[0]).hide();
|
Modal.getOrCreateInstance(glob.activeDialog[0]).hide();
|
||||||
glob.activeDialog = null;
|
glob.activeDialog = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -249,7 +249,7 @@ async function openDialog($dialog: JQuery<HTMLElement>, closeActDialog = true) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
saveFocusedElement();
|
saveFocusedElement();
|
||||||
bootstrap.Modal.getOrCreateInstance($dialog[0]).show();
|
Modal.getOrCreateInstance($dialog[0]).show();
|
||||||
|
|
||||||
$dialog.on('hidden.bs.modal', () => {
|
$dialog.on('hidden.bs.modal', () => {
|
||||||
$(".aa-input").autocomplete("close");
|
$(".aa-input").autocomplete("close");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user