Class Index | File Index

Classes


Class Alfresco.module.HistoricPropertiesViewer

HistoricPropertiesViewer component.

Popups a YUI panel and lets the user view the properties (metadata) from previous versions of a document
Constructor Summary
Constructor Attributes Constructor Name and Description
 
HistoricPropertiesViewer constructor.
Field Summary
Field Attributes Field Name and Description
 
The default config for the gui state for the historic properties dialog.
 
A reference to the earliest version.
 
The merged result of the defaultShowConfig and the config passed in
 
A local cache of the document version response
 
Object container for storing YUI widget and HTMLElement instances.
Method Summary
Method Attributes Method Name and Description
 
Instantiates a YUI Menu Button & Writes the Menu HTML for it.
 
 
Trigger an AJAX request to load the properties via the forms service
 
Fired when the user clicks the cancel button.
 
Fired by YUILoaderHelper when required component script files have
 
onNavButtonClick(event, p_obj)
Triggered by the user clicking on the Next or Previous navigation buttons.
 
Fired when loadProperties successfully returns
 
onTemplateLoaded(response)
Called when the dialog html template has been returned from the server.
 
onVersionMenuChange(sType, aArgs, p_obj)
Fired when the option in the dropdown version menu is changed
 
setMenuTitle(title)
Updates the title on the dropdown box with the current version number.
 
show(config)
Show can be called multiple times and will display the dialog
 
update(newNodeRef)
This function updates the display, menu and config with a new NodeRef.
 
Determines if the Next and Previous buttons should be enabled.
Constructor Detail
Alfresco.module.HistoricPropertiesViewer(htmlId)
HistoricPropertiesViewer constructor.

HistoricPropertiesViewer is considered a singleton so constructor should be treated as private,
please use Alfresco.module.getHistoricPropertiesViewerInstance() instead.
Parameters:
{string} htmlId
The HTML id of the parent element
Returns:
{Alfresco.module.HistoricPropertiesViewer} The new HistoricPropertiesViewer instance
Field Detail
{object} defaultShowConfig
The default config for the gui state for the historic properties dialog.
The user can override these properties in the show() method.

{object} earliestVersion
A reference to the earliest version.
Set when creating the dropdown menu

{object} showConfig
The merged result of the defaultShowConfig and the config passed in
to the show method.

{array} versions
A local cache of the document version response
this is retrieved during set up & updated on each show

{object} widgets
Object container for storing YUI widget and HTMLElement instances.
Method Detail
createMenu(The)
Instantiates a YUI Menu Button & Writes the Menu HTML for it.
Parameters:
{HTMLElement} The
containing element for the Version History Dialogue

{string} getVersionNodeRef(-)
Parameters:
{string} -
either "previous", "next", or a version label
Returns:
{string} - nodeRef to the specified version

loadProperties()
Trigger an AJAX request to load the properties via the forms service

onCancelButtonClick(event)
Fired when the user clicks the cancel button.
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.

onNavButtonClick(event, p_obj)
Triggered by the user clicking on the Next or Previous navigation buttons.
Parameters:
event
p_obj

onPropertiesLoaded(response)
Fired when loadProperties successfully returns
Loads the results of the AJAX call into the HTML element we grabbed a reference to earlier
Parameters:
response

onTemplateLoaded(response)
Called when the dialog html template has been returned from the server.
Creates the YIU gui objects such as the panel.
Parameters:
{object} response
a Alfresco.util.Ajax.request response object

onVersionMenuChange(sType, aArgs, p_obj)
Fired when the option in the dropdown version menu is changed
Parameters:
sType
aArgs
p_obj

setMenuTitle(title)
Updates the title on the dropdown box with the current version number.
Parameters:
title

show(config)
Show can be called multiple times and will display the dialog
in different ways depending on the config parameter.
Parameters:
{object} config
describes how the dialog should be displayed
The config object is in the form of:
{
nodeRef: {string}, // the nodeRef
version: {string} // the version to show properties of
}

update(newNodeRef)
This function updates the display, menu and config with a new NodeRef.
Parameters:
newNodeRef

updateNavState()
Determines if the Next and Previous buttons should be enabled.
Buttons are disabled by added a disabled class to them

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