Classes
Methods
(static) bumpGridScroll()
(static) createMenu(menuObj)
- Description:
Create a nwjs native menu from object
More info about nwjs's native menu at : https://docs.nwjs.io/en/latest/References/Menu/
- Source:
Parameters:
Name | Type | Description |
---|---|---|
menuObj |
Array.<Obj> | Array of menu object |
(static) disableButtons()
(static) drawWordWrapByTagField(options)
Parameters:
Name | Type | Description |
---|---|---|
options |
(static) form($elm, optionsopt) → {Promise.<Object>}
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
$elm |
jQuery | Object | jQuery object or customField object representing the element to which the form will be appended. |
||||||||||||
options |
Object |
<optional> |
{}
|
Options for customization. Properties
|
Returns:
- A promise that resolves to the form field values when the form is submitted successfully, or rejects if an error occurs.
- Type
- Promise.<Object>
(static) off(evt, fn)
Example
ui.off('transLoaded', (e, opt)=> {
// do something
})
Parameters:
Name | Type | Description |
---|---|---|
evt |
String | Event name |
fn |
function | Function to trigger |
(static) on(evt, fn)
- Description:
Create a new event with JQuery eventing convenience
- Source:
- Since:
- 4.3.20
Example
ui.on('transLoaded', (e, opt)=> {
// do something
})
Parameters:
Name | Type | Description |
---|---|---|
evt |
String | Event name |
fn |
function | Function to trigger |
(static) onDOMReady(fn)
- Description:
This function is called when the DOM is ready. It takes a function as a parameter and calls it immediately if the DOM is already available.
If the DOM is not available, it adds an event listener to call the function when the DOMContentLoaded event is fired.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
fn |
function | The function to be called when the DOM is ready. |
(static) onReady(onReadyEvent)
- Description:
This function is called when the UI is ready. It takes a function as a parameter and adds it to the onReadyPool if the UI is not initialized.
If the UI is already initialized, it calls all the functions in the onReadyPool and then clears the pool.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
onReadyEvent |
function | The function to be called when the UI is ready. |
(static) one(evt, fn)
- Description:
Run the event once
Trigger an event and immediately removes it
- Source:
- Since:
- 4.3.20
Parameters:
Name | Type | Description |
---|---|---|
evt |
String | Event name |
fn |
function | Function to trigger |
(static) openImportTrans(transFile, optionsopt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
transFile |
String | Path to the file |
|
options |
Object |
<optional> |
options |
(async, static) saveAs(filePath) → {Promise.<string>}
Parameters:
Name | Type | Description |
---|---|---|
filePath |
String | Default path of the file |
Returns:
- Path of the file. Empty when canceled
- Type
- Promise.<string>
(async, static) saveAsTPP(filePath) → {Promise.<string>}
Parameters:
Name | Type | Description |
---|---|---|
filePath |
String | Default path of the file |
Returns:
- Path of the file. Empty when canceled
- Type
- Promise.<string>
(static) setCurrentCellText(value, trigger)
Parameters:
Name | Type | Description |
---|---|---|
value |
String | New value |
trigger |
Boolean | Immidiately trigger change event |
(static) trigger(evt, fn)
Parameters:
Name | Type | Description |
---|---|---|
evt |
String | Event name |
fn |
function | Function to trigger |
Events
busyOverlayClosed
busyOverlayOpened
dialogRowPropertiesOpened
loadingScreenIsClosed
optionsWindowClosed
- Description:
Triggered when option window is closed
- Source:
- Since:
- 4.3.20
optionsWindowClosed
- Description:
Triggered when option window is closed
- Source:
- Since:
- 4.5.1
optionsWindowOpened
- Description:
Triggered when option window is opened
- Source:
- Since:
- 4.3.20