Modal: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 76: | Line 76: | ||
Removes the footer from the modal. | Removes the footer from the modal. | ||
==== modal.setFooterCheckbox(labelName: <code>String</code>, callback: <code>Function</code>, defaultState: <code>Boolean</code>): <code>void</code> ==== | ==== modal.setFooterCheckbox(labelName: <code>String</code>, callback: <code>Function<any></code>, defaultState: <code>Boolean</code>): <code>void</code> ==== | ||
Adds a checkbox to the left section of the footer. | Adds a checkbox to the left section of the footer. | ||
| Line 101: | Line 101: | ||
Clears a section of the footer. | Clears a section of the footer. | ||
==== modal.onSubmit(callback: <code>Function</code>): <code>void</code> ==== | ==== modal.onSubmit(callback: <code>Function<any></code>): <code>void</code> ==== | ||
Set event callback. | Set event callback. | ||
This will be called whenever the form is submitted. | This will be called whenever the form is submitted. | ||
==== modal.onOpen(callback: <code>Function</code>): <code>void</code> ==== | ==== modal.onOpen(callback: <code>Function<any></code>): <code>void</code> ==== | ||
Set event callback. | Set event callback. | ||
This will be called whenever the form is opened. | This will be called whenever the form is opened. | ||
==== modal.onClose(callback: <code>Function</code>): <code>void</code> ==== | ==== modal.onClose(callback: <code>Function<any></code>): <code>void</code> ==== | ||
Set event callback. | Set event callback. | ||
This will be called whenever the form is closed. | This will be called whenever the form is closed. | ||
==== modal.onTabChange(callback: <code>Function</code>): <code>void</code> ==== | ==== modal.onTabChange(callback: <code>Function<any></code>): <code>void</code> ==== | ||
Set event callback. | Set event callback. | ||
This will be called whenever the tab is changed. | This will be called whenever the tab is changed. | ||
==== modal.checkboxFieldOnInput(callback: <code>Function</code>): <code>void</code> ==== | ==== modal.checkboxFieldOnInput(callback: <code>Function<any></code>): <code>void</code> ==== | ||
Set event callback. | Set event callback. | ||
| Line 186: | Line 186: | ||
Object { | Object { | ||
input: HTMLInputElement | input: HTMLInputElement | ||
} | |||
</syntaxhighlight>FormInputObj:<syntaxhighlight lang="typescript"> | |||
Object { | |||
input: HTMLInputElement, | |||
value: String, | |||
validation: "number" | "required", | |||
validationFailed: Boolean, | |||
type: "text" | "color", | |||
label: HTMLLabelElement | |||
} | |||
</syntaxhighlight>TabContext:<syntaxhighlight lang="typescript"> | |||
Object { | |||
id: Number, | |||
tabButton: HTMLElement, | |||
client: HTMLElement, | |||
inputField: HTMLElement, | |||
formTitle: HTMLElement, | |||
formField: HTMLElement, | |||
formInputs: Array<FormInputObj>, | |||
hasSubmitted: Boolean, | |||
cbField: HTMLElement, | |||
cbList: Array<CheckboxObj>, | |||
cbCallback: Function<any> | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||