Global functions
f7
The Framework7 app instance for PostalPoint's entire UI, created by new Framework7(). See https://framework7.io/docs/app for details.
getPluginFolder([id]) ⇒ string
Get the filesystem path to a plugin's installation folder.
Kind: global function
Returns: string - "/home/user/.config/postalpoint-retail/Default/storage/plugins/...", "C:\Users\user\AppData...", etc
| Param | Type | Description |
|---|---|---|
| [id] | string |
Plugin ID. If omitted or empty, will return the parent folder plugins are installed within. |
getAppFolder() ⇒ string
Get the filesystem path to the PostalPoint installation folder.
alert(text, title, [callback]) ⇒ Promise
Display a simple alert-style dialog box with an "OK" button.
Kind: global function
Returns: Promise - Resolves when the user closes the dialog.
| Param | Type | Default | Description |
|---|---|---|---|
| text | string |
Body text of the dialog. Can include HTML tags. | |
| title | string |
Dialog title. | |
| [callback] | function |
|
Function to call when the alert is closed. |
confirm(text, title, [callback], [cancelCallback]) ⇒ Promise
Display a simple confirm dialog box with OK and Cancel buttons.
Kind: global function
Returns: Promise - Resolves when the user closes the dialog, with value true if OK is pressed, or false if Cancel is pressed.
| Param | Type | Default | Description |
|---|---|---|---|
| text | string |
Body text of the dialog. Can include HTML tags. | |
| title | string |
Dialog title. | |
| [callback] | function | null |
|
Function to call when the OK button is pressed. |
| [cancelCallback] | function | null |
|
Function to call when the Cancel button is pressed. |
prompt(text, title, [callback], [cancelCallback], defaultValue) ⇒ Promise
Display a simple confirm dialog box with OK and Cancel buttons.
Kind: global function
Returns: Promise - Resolves when the user closes the dialog, with the input box's value if OK is pressed, or false if Cancel is pressed.
| Param | Type | Default | Description |
|---|---|---|---|
| text | string |
Body text of the dialog. Can include HTML tags. The input box will be appended to this. | |
| title | string |
Dialog title. | |
| [callback] | function | null |
|
Function to call when the OK button is pressed. Is passed the input value. |
| [cancelCallback] | function | null |
|
Function to call when the Cancel button is pressed. Is passed the input value. |
| defaultValue | string |
Text to pre-fill in the input box. |