Class: ListBase

XV. ListBase

XV.ListBase contains functionality shared between lists that has to do with formatting and action menu handling.

new ListBase()

Source:

Extends

Members

formatted

An array of data types that require special formatting in displays
Inherited From:
Source:

Methods

<static> actionSelected()

A list item has been selected. Delegate to the method cited in the action, and pass it an object with the relevant attributes.
Source:

<static> doneHelper(inEvent)

Helper function for creating a callback to refresh a row after some custom action is completed.
Parameters:
Name Type Description
inEvent Object
Source:
Returns:
Function

<static> haveAllAnswers(index) → {Boolean}

Returns whether all actions on the list have been determined to be available or not.
Parameters:
Name Type Description
index Number
Source:
Returns:
Type
Boolean

<static> modelChanged()

When a model changes, we are notified. We check the list to see if the model is of the same recordType. If so, we check to see if the newly changed model should still be on the list, and refresh appropriately.
Source:

<static> resetActions(Index)

Reset actions permission checks will be regenerated.
Parameters:
Name Type Description
Index Number
Source:

<static> selectedIndexes() → {Array}

Helper fuction that returns an array of indexes based on the current selection.
Source:
Returns:
Type
Array

<static> selectionChanged()

Re-evaluates actions menu.
Source:

formatBoolean(Value) → {String}

Localize a boolean to yes/no text.
Parameters:
Name Type Description
Value Number
Inherited From:
Source:
Returns:
Type
String

formatCost(Value) → {String}

Localize a number to cost string in the base currency.
Parameters:
Name Type Description
Value Number
Inherited From:
Source:
Returns:
Type
String

formatDate(Date) → {String}

Localize a date.
Parameters:
Name Type Description
Date Date
Inherited From:
Source:
Returns:
Type
String

formatDueDate(Date, View, Model) → {String}

Localize a date and add the class for `error` to the view if the date is before today.
Parameters:
Name Type Description
Date Date
View Object
Model Object
Inherited From:
Source:
Returns:
Type
String

formatExtendedPrice(Value) → {String}

Localize a number to an extended price string in the base currency.
Parameters:
Name Type Description
Value Number
Inherited From:
Source:
Returns:
Type
String

formatHours(Value) → {String}

Localize a number to an hours string in the base currency.
Parameters:
Name Type Description
Value Number
Inherited From:
Source:
Returns:
Type
String

formatMoney(Value) → {String}

Localize a number to a currency string using the base currency.
Parameters:
Name Type Description
Value Number
Inherited From:
Source:
Returns:
Type
String

formatPercent(Value) → {String}

Localize a number to a percent string.
Parameters:
Name Type Description
Value Number
Inherited From:
Source:
Returns:
Type
String

formatPurchasePrice(Value) → {String}

Localize a number to a purchase price string in the base currency.
Parameters:
Name Type Description
Value Number
Inherited From:
Source:
Returns:
Type
String

formatQuantity(Value) → {String}

Localize a number to a quantity string.
Parameters:
Name Type Description
Value Number
Inherited From:
Source:
Returns:
Type
String

formatQuantityPer(Value) → {String}

Localize a number to a quantity string.
Parameters:
Name Type Description
Value Number
Inherited From:
Source:
Returns:
Type
String

formatSalesPrice(Value) → {String}

Localize a number to an sales price string in the base currency.
Parameters:
Name Type Description
Value Number
Inherited From:
Source:
Returns:
Type
String

formatUnitRatio(Value) → {String}

Localize a number to a unit ratio string.
Parameters:
Name Type Description
Value Number
Inherited From:
Source:
Returns:
Type
String

formatWeight(Value) → {String}

Localize a number to a weight string.
Parameters:
Name Type Description
Value Number
Inherited From:
Source:
Returns:
Type
String