mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-07-02 07:21:33 +00:00
Moved alerts and dialogs from unsupported bootbox to Sweetalert2 library
This commit is contained in:
parent
a489380f49
commit
99e56c4b1d
12 changed files with 842 additions and 805 deletions
|
|
@ -19,8 +19,7 @@
|
|||
|
||||
import {Controller} from "@hotwired/stimulus";
|
||||
import {visit} from "@hotwired/turbo";
|
||||
import * as bootbox from "bootbox";
|
||||
import "../../css/components/bootbox_extensions.css";
|
||||
import {ConfirmSwal} from "../../helpers/swal";
|
||||
import "../../css/components/dirty_form.css";
|
||||
|
||||
/**
|
||||
|
|
@ -207,11 +206,10 @@ export default class extends Controller {
|
|||
}
|
||||
|
||||
_confirmNavigation(onConfirm) {
|
||||
bootbox.confirm({
|
||||
title: this.confirmTitleValue,
|
||||
message: this.confirmMessageValue,
|
||||
callback: (result) => { if (result) onConfirm(); }
|
||||
});
|
||||
ConfirmSwal.fire({
|
||||
titleText: this.confirmTitleValue,
|
||||
text: this.confirmMessageValue,
|
||||
}).then(({isConfirmed}) => { if (isConfirmed) onConfirm(); });
|
||||
}
|
||||
|
||||
_handleLinkClick(event) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue