mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
- Form SDK implementation - Basic Forms - Dynamics Forms - Basic Blocks + Data Model Block - Form Compilation - Turbo integration
27 lines
524 B
JavaScript
27 lines
524 B
JavaScript
class TurboStreamEvent extends HTMLElement {
|
|
|
|
// register the custom element
|
|
static {
|
|
customElements.define('turbo-stream-event', TurboStreamEvent);
|
|
}
|
|
|
|
constructor() {
|
|
super();
|
|
|
|
this.style.display = 'none';
|
|
|
|
const event = new CustomEvent("itop:TurboStreamEvent", {
|
|
detail: {
|
|
id: this.getAttribute('id'),
|
|
form_id: this.dataset.formId,
|
|
block_class: this.dataset.formBlockClass,
|
|
view_data: this.dataset.viewData,
|
|
valid: this.dataset.valid,
|
|
},
|
|
});
|
|
|
|
document.dispatchEvent(event);
|
|
}
|
|
|
|
}
|