recent activities via API (#761)
This commit is contained in:
28
assets/js/plugins/KimaiEvent.js
Normal file
28
assets/js/plugins/KimaiEvent.js
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* [KIMAI] KimaiEvent: helper to trigger events
|
||||
*/
|
||||
|
||||
import KimaiPlugin from "../KimaiPlugin";
|
||||
|
||||
export default class KimaiEvent extends KimaiPlugin {
|
||||
|
||||
getId() {
|
||||
return 'event';
|
||||
}
|
||||
|
||||
trigger(name) {
|
||||
if (name === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
document.dispatchEvent(new Event(name));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user