Contains convenience functions to generate UI elements
Idea is to provide convenience "intention-based" functions to generate commonly-used UI elements
and hide their implementation details (markup).
- Source:
- ui/ui.helpers.js
Members
-
<static, readonly> self.NOTIFICATION_TYPES :string
-
Type of available notification style
Type:
- string
- Source:
- ui/ui.helpers.js
Properties:
Name Type Default Description ERRORstring error Error notification.
NOTICEstring warning Notice notification.
SUCCESSstring success Success notification.
HELPstring help Help notification.
INFOstring info Info notification.
WARNINGstring warning Warning prompt
-
<static, readonly> self.PROMPT_TYPES :string
-
Type of available prompt style
Type:
- string
- Source:
- ui/ui.helpers.js
Properties:
Name Type Default Description DEFAULTstring default Default prompt
ERRORstring error Error prompt
NOTICEstring warning Notice prompt
SUCCESSstring success Success prompt
HELPstring help Help prompt
INFOstring info Info prompt
WARNINGstring warning Warning prompt
Methods
-
clearWait()
-
Removes the wait indicator
- Source:
- ui/ui.helpers.js
-
notify(config)
-
Notifies the user
Parameters:
Name Type Description configObject Notification configuration
Properties
Name Type Description headingString Notification heading
contentString Notification content
typeString Notification type, see Granite.author.ui.helpers.NOTIFICATION_TYPES
- Source:
- ui/ui.helpers.js
-
prompt(config)
-
Prompts a dialog to the user
Parameters:
Name Type Description configObject Prompt configuration
Properties
Name Type Argument Description titleString Prompt dialog title
messageString Prompt dialog message content
typeString Prompt dialog type, see Granite.author.ui.helpers.PROMPT_TYPES
actionsArray.<Object> The action buttons available to the user
Properties
Name Type Argument Default Description idString Action button id
textString Action button text
handlerfunction <optional>
Action handler
primaryBoolean <optional>
false truestyles the action as primarywarningBoolean <optional>
false truestyles the action as a warningcallbackfunction <optional>
The callback function. The action.id and action will be passed as parameters
- Source:
- ui/ui.helpers.js
-
wait( [element])
-
Displays a wait indicator
Parameters:
Name Type Argument Description elementHTMLElement <optional>
Element to append the wait indicator to
- Source:
- ui/ui.helpers.js