Col
(type in module tri
)
Provides an object rendition of the Static Col defined in the Table object
defined in the Javascript file.
Referred to in this documentation as the dynamic instance of the Col object.
The public methods attached to the Col object and described herein are
accessible from the HTML code assuming a Col object is available.
Constructor of the the Col object. Performs the following functions:
Col type into 'virt' (col property points to a function) or 'field'cid property that makes the each column unique in the entire system across
all Tables.cidprops – {Object} –
Properties array used to define the column in static object.
Builds an array of Action objects from a Col whose type is 'actions'. The
following algorithm is used to build the array.
editRecord and dropRecord actions unless the
Col addDefault property is falsemethClass, method, click, whatClass function pointers into the $scope.$scope – {scope} –
of HTML caller
oObj – {Object} –
obsolete. not referenced.
{Object[]}
– array of Action objects
Returns field name in table column is related to. For type = 'virt' the constant 'field' is returned.
{string}
– related field name
Returns the hint field that is added to Standard Editor input fields as a 'title=' string.
If hint in the column definition is a function it is called with the signature this.hint(scope,this). Otherwise the string value is returned.
{string}
– computed hint.
Returns the getTitle value with blanks replaced by '-'. Used in the HTML
templates to create element IDs based on the column name that can be refenced in the CSS.
{string}
– title modified
Returns the hint field that is added to the list columns of the Lister.
The field is assumed to be a function which is called with signature this.listHint(scope,oObj,this) where
oObj is the row being displayed.
{string}
– computed hint.
Returns the place-holder field that is added to Standard Editor input fields as a 'placeHolder=' string.
If place in the column definition is a function it is called with the signature this.place(scope,this). Otherwise the string value is returned.
{string}
– computed place-holder.
Returns the Col title
{string}
– Col name used for public display
Returns the value of oObj for the Col. Invokes any necessary functions
to calculate the value. If the nMax field is present the computed string
is checked that is does not exceed that length. If it does it is shortened and
the string ... added such that the string's length equals the nMax field.
scope – {Object} –
The present scope
oObj – {Object} –
the data object to extract the Col from.
nMax – {number} –
optional max string length returned
{string}
– the computed value
Extends the supplied array of Col objects with this Col if it matches
the sType parameter which can have the following values:
scope – {Object} –
caller scope
oCols – {Object[]} –
array of Col objects to extend
sType – {string} –
to match against Col type. sType = null matches all.