API Docs for: 2.10.19
Show:

oreesh-dialog Class

Dialog

// Can be created dynamically
var dialog = new OreeshDialog();


<!-- Or via HTML -->
<oreesh-dialog 
    title="Error: No Students!" 
    message="This class contains no students!  You will have to add some students before you are able to continue"
    yes-button-text="Yes!"
    large-icon-src="http://oreesh.s3.amazonaws.com.edgesuite.net/latest/img/oreesh.png"
    small-icon="error">
</oreesh-dialog>

Notes: icon-large-src has priority over icon-small. If there is not icon-large-src or icon-small, then it will be text only.

Methods

close

()

Closes the dialog, removing it from the screen.

noButtonCallback

()

The callback function to be executed when No or X (close) button is pressed.

var od = document.createElement('oreesh-dialog');
od.noButtonCallback = function() {...};

open

()

Opens the dialog, making it appear on the screen.

yesButtonCallback

()

The callback function to be executed when Yes or Ok, (or X (close) button when mode="alert") button is pressed.

var od = document.createElement('oreesh-dialog');
od.yesButtonCallback = function() {...};

Attributes

hide-close-icon

Boolean

Hide X (close) button.

large-icon-src

String

Use this to specify the path to a large image.

mode

String

Dialog mode controls the amount of buttons. Use alert for a dialog with a single Ok button. Use confirmation for a dialog with a Yes and a No button.

Default: alert

no-button-text

String

Specifies the text on the No button (confirmation mode only).

Default: No

ok-button-text

String

Specifies the text on the Ok button (alert mode only).

Default: OK

opacity

String

Sets the opacity value. Options are low, high, or none. This is binded to the oreesh-overlay opacity attribute.

prevent-backdrop-tap

Boolean

Prevent backdrop-tap callback call.

small-icon

String

The icon which will be shown if there is no large-icon-src specified. The only option is error.

title

String

The title of dialog. Text which appears at the top of the dialog.

yes-button-text

String

Specifies the text on the Yes button (confirmation mode only).

Default: Yes

z-index-backdrop

Number

Custom z-index style for backdrop area.

z-index-content

Number

Custom z-index style for content area.