Modal

From Our World of Text Wiki
Revision as of 17:09, 18 August 2023 by Owot (talk | contribs) (Created page with "== Introduction == Modals are popup windows that let users input information into a form. thumb|A URL modal == API == === Constructor === <syntaxhighlight lang="javascript"> let modal = new Modal(); </syntaxhighlight> === Functions === modal.createForm() modal.submitForm() modal.cancelForm() modal.alignForm() modal.unalignForm() modal.addEntry(label, type, validation) modal.setSize(width, height) modal.setMinimumSize(width, height) modal...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Introduction

Modals are popup windows that let users input information into a form.

 
A URL modal

API

Constructor

let modal = new Modal();

Functions

modal.createForm()

modal.submitForm()

modal.cancelForm()

modal.alignForm()

modal.unalignForm()

modal.addEntry(label, type, validation)

modal.setSize(width, height)

modal.setMinimumSize(width, height)

modal.setMaximumSize(width, height)

modal.setFormTitle(title, opts)

modal.setFooter()

modal.removeFooter()

modal.setFooterCheckbox(labelName, callback, defaultState)

modal.setFooterContentLeft(data)

modal.setFooterContentCenter(data)

modal.setFooterContentRight(data)

modal.removeFooterContentLeft()

modal.removeFooterContentCenter()

modal.removeFooterContentRight()

modal.onSubmit(callback)

modal.onOpen(callback)

modal.onClose(callback)

modal.checkboxFieldOnInput(callback)

modal.onTabChange(callback)

modal.open(...params)

modal.close(canceled)

modal.createCheckboxField()

modal.addCheckbox(label, parent)

modal.addTab(id, title)

modal.focusTab(id)

modal.getCurrentTabId()

modal.hideTab(id)

modal.showTab(id)

modal.getTabData(id)

modal.append(elm)

modal.createClose()

Static functions

Modal.closeAll()

Static variables

Modal.isOpen

Modal.current

Modal.list