Class Index | File Index

Classes


Class slikcalc.ColumnCalc

ColumnCalc
Defined in: ColumnCalc.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Calculator ojbect for performing column-based calculations
Field Summary
Field Attributes Field Name and Description
 
Array of row objects to use in calculator
Method Summary
Method Attributes Method Name and Description
 
addRow(config)
Adds a row to the calculator to be included with calculations.
 
Processes the rows and applies the totalOperator upon each value, placing the total in the totalId element
 
Runs on page load.
 
Adds event listeners for row checkboxes and inputs
Class Detail
slikcalc.ColumnCalc(config)
Calculator ojbect for performing column-based calculations
Parameters:
{Object} config
(Required) Configuration object, see slikcalc.BaseCalc for options
Field Detail
rows
Array of row objects to use in calculator
Method Detail
addRow(config)
Adds a row to the calculator to be included with calculations.
Parameters:
{Object} config
Configuration object for row definitions, with the following options:
  • id : Element id that holds the value to calculate
  • checkbox.id : (Optional) Element id of checkbox
  • checkbox.invert : Defaults to false. If true, row is included in total calculcation when un-checked, and omitted when checked

calculate()
Processes the rows and applies the totalOperator upon each value, placing the total in the totalId element

initialize()
Runs on page load. Sets up event listeners if registerEventListeners is set to true.

setupEventListeners()
Adds event listeners for row checkboxes and inputs

Documentation generated by JsDoc Toolkit 2.0.2 on Thu Sep 11 2008 15:52:44 GMT-0600 (MDT)