Class: oDialog

$. oDialog

$.oDialog Base Class -- helper class for showing GUI content.

new $.oDialog()

openHarmony/openHarmony_dialog.js, line 59
The base class for the $.oDialog.

Methods

alert(labelText, title, okButtonText)

openHarmony/openHarmony_dialog.js, line 113
Prompts with an alert dialog (informational).
Name Type Description
labelText string optional The label/internal text of the dialog.
title string optional The title of the confirmation dialog.
okButtonText string optional The text on the OK button of the dialog.

alertBox(labelText, title, okButtonText, htmlSupport)

openHarmony/openHarmony_dialog.js, line 147
Prompts with an alert dialog with a text box which can be selected (informational).
Name Type Default Description
labelText string optional The label/internal text of the dialog.
title string optional The title of the confirmation dialog.
okButtonText string "OK" optional The text on the OK button of the dialog.
htmlSupport bool false optional

browseForFile(text, filter, getExisting, acceptMultiple, startDirectory){Array.<string>}

openHarmony/openHarmony_dialog.js, line 260
Prompts with a file selector window
Name Type Default Description
text string "Select a file:" optional The title of the confirmation dialog.
filter string "*" optional The filter for the file type and/or file name that can be selected. Accepts wildcard charater "*".
getExisting string true optional Whether to select an existing file or a save location
acceptMultiple string false optional Whether or not selecting more than one file is ok. Is ignored if getExisting is falses.
startDirectory string optional The directory showed at the opening of the dialog.
Returns:
Type Description
Array.<string> The list of selected Files, 'undefined' if the dialog is cancelled

browseForFolder(text, startDirectory){string}

openHarmony/openHarmony_dialog.js, line 298
Prompts with a browse for folder dialog (informational).
Name Type Description
text string optional The title of the confirmation dialog.
startDirectory string optional The directory showed at the opening of the dialog.
Returns:
Type Description
string The path of the selected folder, 'undefined' if the dialog is cancelled

chooseFile(text, filter, getExisting, acceptMultiple, startDirectory){Array.<oFile>}

openHarmony/openHarmony_dialog.js, line 323
Prompts with a file selector window
Name Type Default Description
text string "Select a file:" optional The title of the file browser dialog.
filter string "*" optional The filter for the file type and/or file name that can be selected. Accepts wildcard charater "*".
getExisting string true optional Whether to select an existing file or a save location
acceptMultiple string false optional Whether or not selecting more than one file is ok. Is ignored if getExisting is false.
startDirectory string optional The directory showed at the opening of the dialog.
Returns:
Type Description
Array.<oFile> An oFile array, or 'undefined' if the dialog is cancelled

chooseFolder(text, startDirectory){oFolder}

openHarmony/openHarmony_dialog.js, line 368
Prompts with a browse for folder dialog.
Name Type Description
text string optional The title of the file browser dialog.
startDirectory string optional The directory showed at the opening of the dialog.
Returns:
Type Description
oFolder An oFolder for the selected folder, or undefined if dialog was cancelled

confirm(labelText, title, okButtonText, cancelButtonText){bool}

openHarmony/openHarmony_dialog.js, line 63
Prompts with a confirmation dialog (yes/no choice).
Name Type Description
labelText string optional The label/internal text of the dialog.
title string optional The title of the confirmation dialog.
okButtonText string optional The text on the OK button of the dialog.
cancelButtonText string optional The text on the CANCEL button of the dialog.
Returns:
Type Description
bool Result of the confirmation dialog.

prompt(labelText, title, prefilledText)

openHarmony/openHarmony_dialog.js, line 242
Prompts for a user input.
Name Type Description
labelText string optional The label/internal text of the dialog.
title string optional The title of the confirmation dialog.
prefilledText string optional The text to display in the input area.

toast(labelText, position, duration, color)

openHarmony/openHarmony_dialog.js, line 189
Prompts with an toast alert. This is a small message that can't be clicked and only stays on the screen for the duration specified.
Name Type Default Description
labelText string The label/internal text of the dialog.
position $.oPoint optional The position on the screen where the toast will appear (by default, slightly under the middle of the screen).
duration float 2000 optional The duration of the display (in milliseconds).
color $.oColorValue "#000000" optional The color of the background (a 50% alpha value will be applied).