mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-24 21:05:03 +02:00
Added datatables with turbo frames.
This commit is contained in:
parent
41e0b251a9
commit
fed1621a58
5 changed files with 308 additions and 180 deletions
17
assets/js/register_events.js
Normal file
17
assets/js/register_events.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
'use strict';
|
||||
|
||||
const RegisterEventHelper = class {
|
||||
constructor() {
|
||||
this.registerToasts();
|
||||
}
|
||||
|
||||
registerLoadHandler(fn) {
|
||||
document.addEventListener('turbo:load', fn);
|
||||
}
|
||||
|
||||
registerToasts() {
|
||||
this.registerLoadHandler(() => $(".toast").toast('show'));
|
||||
}
|
||||
}
|
||||
|
||||
export default new RegisterEventHelper();
|
Loading…
Add table
Add a link
Reference in a new issue