SNJS Dialogs

SNJS Dialogs provides an object which makes it easy for developers to create dialogs for their applications.

Dialog(type) 
type can be either Dialog.DIALOG_POP or Dialog.DIALOG_CONTEXTUAL.
Dialog.DIALOG_POP 
Used for a popup dialog.
Dialog.DIALOG_CONTEXTUAL 
Used for an inlined dialog.
onconfirm 
Can be used to set an event handler which is fired when the "confirm" button is clicked.
oncancel 
Can be used to set an event handler which is fired when the "cancel" button is clicked.
setStyle 
Can be used to set the style for the dialog.
showMessage(title, content, button_confirm = 'Okay') 
Displays a dialog with only a confirm button. title and content can be either strings or pre-rendered SNML blocks.
showChoice(title, content, button_confirm = 'Okay', button_cancel = 'Cancel') 
Displays a dialog with Confirm and Cancel buttons. title and content can be either strings or pre-rendered SNML blocks.
setContext 
Sets where the Contextual Dialog is pointing to.
hide 
Hides the dialog.