Amiro.CMS JS API Reference (available from v5.12) Amiro.Ru / Manual

Class AMI.ModuleComponentList

List component class.
Defined in: AMI.ModuleComponentList.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
AMI.ModuleComponentList(oModule, componentType, componentId)
Class of list component inhertited from AMI.ModuleComponent that contais a set of methods for list creating and reloading.
Field Summary
Field Attributes Field Name and Description
 
Default columns width.
 
Templates that are used to create list.
Method Summary
Method Attributes Method Name and Description
 
formatColumnContent(columnName, content, oTemplateData)
Formats cell content by field type.
 
getColumnTemplate(columnName, columnType)
Get template for cell by column name and column type.
 
mouseOutRow(oRow, evt)
Handler for mouseout of list row.
 
mouseOverRow(oRow, evt)
Handler for mouseover of list row.
 
Called when the component received data from server.
 
Create paginator and set its content to DOM element with class = "pagination".
 
setRowClassById(id, className)
Find row by id in row data and set special class for TR.
Class Detail
AMI.ModuleComponentList(oModule, componentType, componentId)
Class of list component inhertited from AMI.ModuleComponent that contais a set of methods for list creating and reloading. Class contains list highlighting methods as well.
Parameters:
{AMI.Module} oModule
Module object.
{string} componentType
Type of component (filter_form, form, list).
{string} componentId
Id of current component.
Field Detail
columnsWidthByType
Default columns width. Could be overriden in child.

templateList
Templates that are used to create list.
Method Detail
{string} formatColumnContent(columnName, content, oTemplateData)
Formats cell content by field type.
Parameters:
{string} columnName
Name of column for current cell.
{mixed} content
Object or string with cell content. If it is object content.format should be exist.
{object} oTemplateData
current data for cell template. Custom variables should be added to this object.
Returns:
{string} Content of the cell.

{string} getColumnTemplate(columnName, columnType)
Get template for cell by column name and column type.
Parameters:
{string} columnName
Name of the column, parameter of array returned from server.
{string} columnType
Type (format) of the column.
Returns:
{string} Template for requested cell.

{void} mouseOutRow(oRow, evt)
Handler for mouseout of list row. Changes class to default.
Parameters:
{DOM object} oRow
Target row object.
{object} evt
Browser event object.
Returns:
{void}

{void} mouseOverRow(oRow, evt)
Handler for mouseover of list row. Changes class to 'over'.
Parameters:
{DOM object} oRow
Target row object.
{object} evt
Browser event object.
Returns:
{void}

{void} setBlockDataFromObject(oData)
Called when the component received data from server. Creates and draws list.
Parameters:
{object} oData
Data that was received from server.
Returns:
{void}

{void} setPaginationContent(itemCount)
Create paginator and set its content to DOM element with class = "pagination". There are could be several elements with pagination class.
Parameters:
{integer} itemCount
Total number of items for current filter.
Returns:
{void}

{void} setRowClassById(id, className)
Find row by id in row data and set special class for TR.
Parameters:
{number} id
Id value for id field in row data.
{string} className
class that should be set for the row.
Returns:
{void}

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Apr 22 2011 12:43:56 GMT+0700 (NOVST)