Class Box

Models a message box's message, title and options.

class

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(message: string, title?: string, options?: Array<string>, autoclose?: boolean, settings?: Object): Box

Parameters

  • message: string
  • title?: string optional
  • options?: Array<string> optional
  • autoclose?: boolean optional
  • settings?: Object optional

Returns

Box

Properties

public static defaultOptions: Array<string>

The options to display in the message box if none are specified.

default

['Ok']

static

public static defaultTitle: string

The title to be used for the message box if one is not provided.

default

Application

static

public static defaultViewMarkup: string

The markup for the message box's view.

Methods

public getView(): HTMLElement

Provides the view to the composition system.

Returns

HTMLElement

The view of the message box.

public selectOption(dialogResult: string)

Selects an option and closes the message box, returning the selected option through the dialog system's promise.

Parameters

  • dialogResult: string

    The result to select.

public static setDefaults(settings: Object)

Sets the classes and styles used throughout the message box markup.

method

setDefaults

Parameters

  • settings: Object

    A settings object containing the following optional properties: buttonClass, primaryButtonClass, secondaryButtonClass, class, style.

public static setViewUrl(viewUrl: string)

Configures a custom view to use when displaying message boxes.

method

setViewUrl

Parameters

  • viewUrl: string

    The view url relative to the base url which the view locator will use to find the message box's view.