OTRS API Reference JavaScript

Namespace: Core.UI.Dialog

Core.UI. Dialog

Contains the code for the different dialogs.
Author:
  • OTRS AG
Source:

Methods

(static) CloseDialog(Object)

Closes all dialogs specified.
Parameters:
Name Type Description
Object jQueryObject The jQuery object that defines the dialog or any child element of it, which should be closed.
Source:

(static) MakeDialogWait()

Shows a spinner overlay on the currently visible modal dialog. Is meant for showing the user that something is about to happen, e.g. if changing a field within a dialog causes a page reload.
Source:

(static) ShowAlert(Headline, Text, CloseFunction)

Shows an alert dialog.
Parameters:
Name Type Description
Headline String The bold headline text.
Text String The description.
CloseFunction function The special function which is started on closing the dialog (optional, if used also the removing of the dialog itself must be handled).
Source:

(static) ShowContentDialog(HTML, Title, PositionTop, PositionLeft, Modal, Buttons, AllowAutoGrow)

Shows a default dialog.
Parameters:
Name Type Description
HTML String The content HTML which should be shown.
Title String The title of the dialog.
PositionTop Number | String The top position the dialog is positioned initially.
PositionLeft Numer | String The left position the dialog is positioned initially.
Modal Boolean If defined and set to true, an overlay is shown for a modal dialog.
Buttons Array The button array.
AllowAutoGrow Boolean If true, the InnerContent of the dialog can resize until the max window height is reached, if false (default), InnerContent of small dialogs does not resize over 200px.
Source:

(static) ShowDialog(Params)

The main dialog function used for all different types of dialogs.
Parameters:
Name Type Description
Params Object The different config options.
Properties
Name Type Description
Modal Boolean Shows a dark background overlay behind the dialog (default: false)
Type String Alert|Search (default: undefined) Defines a special type of dialog.
Title String Defines the title of the dialog window (default: undefined).
Headline String Defines a special headline within the dialog window (default: undefined).
Text String The text which is outputtet in the dialog window (default: undefined).
HTML String Used for content dialog windows. Contains a complete HTML snippet or an jQuery object with containing HTML (default: undefined).
PositionTop Number Defines the top position of the dialog window (default: undefined).
PositionBottom Number Defines the bottom position of the dialog window (default: undefined).
PositionLeft Number | String Defines the left position of the dialog window. 'Center' centers the window (default: undefined).
PositionRight Number Defines the right position of the dialog window (default: undefined).
CloseOnClickOutside Boolean If true, clicking outside the dialog closes the dialog (default: false).
CloseOnEscape Boolean If true, pressing escape key closes the dialog (default: false).
AllowAutoGrow Boolean If true, the InnerContent of the dialog can resize until the max window height is reached, if false (default), InnerContent of small dialogs does not resize over 200px.
HideHeader Boolean Hide the header by setting this to true
HideFooter Boolean Hide the footer by setting this to true
Buttons Object Array of Hashes with the following properties (buttons are placed in a div "footer" of the dialog):
Properties
Name Type Description
Label String Text of the button.
Type String 'Submit'|'Close' (default: none) Special type of the button - invokes a standard function.
Class String Optional class parameters for the button element.
Function function The function which is executed on click (optional).
Source:

(static) ShowWaitingDialog(Title, Text)

Shows a waiting dialog (with spinner icon) and customizable title and text
Parameters:
Name Type Description
Title String The title of the dialog.
Text String The text of the dialog.
Source: