Class Alfresco.module.RevertVersion
RevertVersion component.
Popups a YUI panel and lets the user choose version and comment for the revert.
Popups a YUI panel and lets the user choose version and comment for the revert.
Defined in: revert-version.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Alfresco.module.RevertVersion(htmlId)
RevertVersion constructor.
|
| Field Attributes | Field Name and Description |
|---|---|
|
The default config for the gui state for the revert dialog.
|
|
|
The merged result of the defaultShowConfig and the config passed in
|
|
|
Object container for storing YUI widget and HTMLElement instances.
|
| Method Attributes | Method Name and Description |
|---|---|
|
onCancelButtonClick(event)
Fired when the user clicks the cancel button.
|
|
|
Fired by YUILoaderHelper when required component script files have
|
|
|
onRevertFailure(response)
Called when a node failed to be reverted
|
|
|
onRevertSuccess(response)
Called when a node has been successfully reverted
|
|
|
onTemplateLoaded(response)
Called when the revert dialog html template has been returned from the server.
|
|
|
show(config)
Show can be called multiple times and will display the revert dialog
|
Constructor Detail
Alfresco.module.RevertVersion(htmlId)
RevertVersion constructor.
RevertVersion is considered a singleton so constructor should be treated as private,
please use Alfresco.module.getRevertVersionInstance() instead.
RevertVersion is considered a singleton so constructor should be treated as private,
please use Alfresco.module.getRevertVersionInstance() instead.
- Parameters:
- {string} htmlId
- The HTML id of the parent element
- Returns:
- {Alfresco.module.RevertVersion} The new RevertVersion instance
Field Detail
{object}
defaultShowConfig
The default config for the gui state for the revert dialog.
The user can override these properties in the show() method.
The user can override these properties in the show() method.
{object}
showConfig
The merged result of the defaultShowConfig and the config passed in
to the show method.
to the show method.
{object}
widgets
Object container for storing YUI widget and HTMLElement instances.
Method Detail
onCancelButtonClick(event)
Fired when the user clicks the cancel button.
Closes the panel.
Closes the panel.
- Parameters:
- {object} event
- a Button "click" event
onComponentsLoaded()
Fired by YUILoaderHelper when required component script files have
been loaded into the browser.
been loaded into the browser.
onRevertFailure(response)
Called when a node failed to be reverted
Informs the user.
Informs the user.
- Parameters:
- response
onRevertSuccess(response)
Called when a node has been successfully reverted
- Parameters:
- response
onTemplateLoaded(response)
Called when the revert dialog html template has been returned from the server.
Creates the YIU gui objects such as the panel.
Creates the YIU gui objects such as the panel.
- Parameters:
- {object} response
- a Alfresco.util.Ajax.request response object
show(config)
Show can be called multiple times and will display the revert dialog
in different ways depending on the config parameter.
in different ways depending on the config parameter.
- Parameters:
- {object} config
- describes how the revert dialog should be displayed
The config object is in the form of:
{
nodeRef: {string}, // the nodeRef to revert
version: {string} // the version to revert nodeRef to
}