maps.nyc.gov

Class: Dialog

nyc.Dialog

new Dialog()

Class for alert, yes/no and input dialogs
Source:
Fires:

Extends

Members

(static) EventType :string

Dialog event type
Type:
  • string
Properties:
Name Type Description
OK string Dialog ok event type
YES_NO string Dialog yes-no event type
INPUT string Dialog input event type
LOGIN string Dialog login event type
Source:

(static) Type :string

Dialog type
Type:
  • string
Properties:
Name Type Description
OK string Dialog with OK button
YES_NO string Dialog with Yes and No buttons
YES_NO_CANCEL string Dialog with Yes, No and Cancel buttons
INPUT string Dialog to accept user input
LOGIN string Dialog to accept user name and password
Source:

container :JQuery

The dialog container
Type:
  • JQuery
Source:

Methods

input(options)

Show the input dialog
Parameters:
Name Type Description
options nyc.Dialog.Options Dialog options
Source:

login(options)

Show the ok dialog
Parameters:
Name Type Description
options nyc.Dialog.Options Dialog options
Source:

off(eventName, evtHdlr, hdlrScopeopt)

Remove a previously connected event handler
Parameters:
Name Type Attributes Description
eventName string The name of the event to which the handler will be connected
evtHdlr function The event handler function
hdlrScope Object <optional>
The scope in which to invoke the event handler
Inherited From:
Source:

ok(options)

Show the ok dialog
Parameters:
Name Type Description
options nyc.Dialog.Options Dialog options
Source:

on(eventName, evtHdlr, hdlrScopeopt)

Connect a function to an event
Parameters:
Name Type Attributes Description
eventName string The name of the event to which the handler will be connected
evtHdlr function The event handler function
hdlrScope Object <optional>
The scope in which to invoke the event handler
Inherited From:
Source:

one(eventName, evtHdlr, hdlrScopeopt)

Connect a function to an event for a single invocation
Parameters:
Name Type Attributes Description
eventName string The name of the event to which the handler will be connected
evtHdlr function The event handler function
hdlrScope Object <optional>
The scope in which to invoke the event handler
Inherited From:
Source:

trigger(eventName, dataopt)

Trigger a named event with event data
Parameters:
Name Type Attributes Description
eventName string The name of the event to trigger
data Object <optional>
The event data
Inherited From:
Source:

yesNo(options)

Show the yes-no dialog
Parameters:
Name Type Description
options nyc.Dialog.Options Dialog options
Source:

yesNoCancel(options)

Show the yes-no dialog
Parameters:
Name Type Description
options nyc.Dialog.Options Dialog options
Source:

Type Definitions

Options

Dialog options.
Type:
  • Object
Properties:
Name Type Attributes Description
message string Message text
buttonText Array.<string> <optional>
Button text list
buttonHref Array.<string> <optional>
Button href list
placeholder string <optional>
Placeholder text for input dialog
callback function <optional>
Callback function
Source:

Events

input

The result of a dialog event
Type:
  • string
Source:

login

The result of a dialog event
Type:
  • Object
Properties:
Name Type Description
user string The user name
password string The password
Source:

ok

The result of a dialog event
Type:
  • boolean
Source:

yesno

The result of a dialog event
Type:
  • boolean
Source: