Class Index | File Index

Classes


Class Alfresco.util.PopupManager

Provides a common interface for displaying popups in various forms
Defined in: alfresco.js
Field Summary
Field Attributes Field Name and Description
<inner>  
Alfresco Slingshot aliases
<static>  
Alfresco.util.PopupManager.defaultDisplayMessageConfig
The default config for the displaying messages, can be overriden
<static>  
Alfresco.util.PopupManager.defaultDisplayPromptConfig
The default config for displaying "prompt" messages, can be overriden
<static>  
Alfresco.util.PopupManager.defaultGetUserInputConfig
The default config for the getting user input, can be overriden
<static>  
Alfresco.util.PopupManager.zIndex
The html zIndex startvalue that will be incremented for each popup
Method Summary
Method Attributes Method Name and Description
<static>  
Alfresco.util.PopupManager.displayForm(config)
Displays a form inside a dialog
<static>  
Alfresco.util.PopupManager.displayMessage(config, parent)
Intended usage: To quickly assure the user that the expected happened.
<static>  
Alfresco.util.PopupManager.displayPrompt(config, parent)
Intended usage: To inform the user that something unexpected happened
<static>  
Alfresco.util.PopupManager.displayWebscript(config)
Displays a webscript inside a dialog
<static>  
Alfresco.util.PopupManager.getUserInput(config)
Intended usage: To ask the user for a simple text input, similar to JavaScript's prompt() function.
Field Detail
<inner> $html
Alfresco Slingshot aliases

<static> {object} Alfresco.util.PopupManager.defaultDisplayMessageConfig
The default config for the displaying messages, can be overriden
when calling displayMessage()

<static> {object} Alfresco.util.PopupManager.defaultDisplayPromptConfig
The default config for displaying "prompt" messages, can be overriden
when calling displayPrompt()

<static> {object} Alfresco.util.PopupManager.defaultGetUserInputConfig
The default config for the getting user input, can be overriden
when calling getUserInput()

<static> {int} Alfresco.util.PopupManager.zIndex
The html zIndex startvalue that will be incremented for each popup
that is displayed to make sure the popup is visible to the user.
Method Detail
<static> Alfresco.util.PopupManager.displayForm(config)
Displays a form inside a dialog
Parameters:
config
config.title
{String} The dialog title
config.properties
{Object} An object literal with the form properties
config.success
{Object} A callback object literal used on form success
config.successMessage
{String} A submit success message
config.failure
{Object} A callback object literal used on form failure
config.failureMessage
{String} A submit failure message

<static> Alfresco.util.PopupManager.displayMessage(config, parent)
Intended usage: To quickly assure the user that the expected happened.

Displays a message as a popup on the screen.
In default mode it fades, is visible for half a second and then fades out.
Parameters:
{object} config
The config object is in the form of:
{
text: {string}, // The message text to display, mandatory
spanClass: {string}, // The class of the span wrapping the text
effect: {YAHOO.widget.ContainerEffect}, // the effect to use when shpwing and hiding the message,
// default is YAHOO.widget.ContainerEffect.FADE
effectDuration: {int}, // time in seconds that the effect should be played, default is 0.5
displayTime: {int}, // time in seconds that the message will be displayed, default 2.5
modal: {true} // if the message should modal (the background overlayed with a gray transparent layer), default is false
}
{HTMLElement} parent
(optional) Parent element in which to render prompt. Defaults to document.body if not provided

<static> Alfresco.util.PopupManager.displayPrompt(config, parent)
Intended usage: To inform the user that something unexpected happened
OR that ask the user if if an action should be performed.

Displays a message as a popup on the screen with a button to make sure
the user responds to the prompt.

In default mode it shows with an OK button that needs clicking to get closed.
Parameters:
{object} config
The config object is in the form of:
{
title: {string}, // the title of the dialog, default is null
text: {string}, // the text to display for the user, mandatory
icon: null, // the icon to display next to the text, default is null
effect: {YAHOO.widget.ContainerEffect}, // the effect to use when showing and hiding the prompt, default is null
effectDuration: {int}, // the time in seconds that the effect should run, default is 0.5
modal: {boolean}, // if a grey transparent overlay should be displayed in the background
close: {boolean}, // if a close icon should be displayed in the right upper corner, default is false
buttons: [] // an array of button configs as described by YUI's SimpleDialog, default is a single OK button
noEscape: {boolean} // indicates the the message has already been escaped (e.g. to display HTML-based messages)
}
{HTMLElement} parent
(optional) Parent element in which to render prompt. Defaults to document.body if not provided

<static> Alfresco.util.PopupManager.displayWebscript(config)
Displays a webscript inside a dialog
Parameters:
config
config.title
{String} The dialog title
config.method
{String} (Optional) Defaults to "GET"
config.url
{String} THe url to the webscript to load
config.properties
{Object} An object literal with the webscript parameters

<static> {YAHOO.widget.SimpleDialog} Alfresco.util.PopupManager.getUserInput(config)
Intended usage: To ask the user for a simple text input, similar to JavaScript's prompt() function.
Parameters:
{object} config
The config object is in the form of:
{
title: {string}, // the title of the dialog, default is null
text: {string}, // optional label next to input box
value: {string}, // optional default value to populate textbox with
callback: {object} // Object literal specifying function callback to receive user input. Only called if default button config used.
// fn: function, obj: optional pass-thru object, scope: callback scope
icon: null, // the icon to display next to the text, default is null
effect: {YAHOO.widget.ContainerEffect}, // the effect to use when showing and hiding the prompt, default is null
effectDuration: {int}, // the time in seconds that the effect should run, default is 0.5
modal: {boolean}, // if a grey transparent overlay should be displayed in the background
initialShow {boolean} // whether to call show() automatically on the panel
close: {boolean}, // if a close icon should be displayed in the right upper corner, default is true
buttons: [] // an array of button configs as described by YUI's SimpleDialog, default is a single OK button
okButtonText: {string} // Allows just the label of the OK button to be overridden
noEscape: {boolean} // indicates the the text property has already been escaped (e.g. to display HTML-based messages)
html: {string}, // optional override for function-generated HTML field. Note however that you must supply your own
// button handlers in this case in order to get the user's input from the Dom.
}
Returns:
{YAHOO.widget.SimpleDialog} The dialog widget

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Feb 16 2012 12:24:28 GMT-0000 (GMT)