Class: exports

exports

A class representing an view for an unordered list of items


new exports( [collection] [, options])

Create a new List View (unordered)

Parameters:
Name Type Argument Default Description
collection Array.<core#Model> <optional>
[]

The collection of models to render in the list. Defaults to an empty array.

options Object <optional>
{}

An optional options hash

Properties
Name Type Argument Description
template function <optional>

A templating function that accepts a model and returns a <li> element as either an HTML string or an HTML element. This function will be used by the render method to render the list.

Extends

  • core#View

Members


cid :String

The client ID (CID) of this model. This property is set automatically when a new model is created.

Type:
  • String

collection :Array.<core#Model>

The collection of models to render in this list.

Type:
  • Array.<core#Model>

el :HTMLULElement

A reference to the <ul> for the current list, if rendered

Type:
  • HTMLULElement

el :HTMLElement

A reference to the HTML element for this view

Type:
  • HTMLElement

template :function

The templating function for rendering each item in the list. Should return a <li> as either an HTML string or an HTML element. Make sure the template function is bound to its original context to retain any encapsulated variables.

Type:
  • function

Class: exports

exports

An Event Emitter class


new exports()

Members


cid :String

The client ID (CID) of this model. This property is set automatically when a new model is created.

Type:
  • String

collection :Array.<core#Model>

The collection of models to render in this list.

Type:
  • Array.<core#Model>

el :HTMLULElement

A reference to the <ul> for the current list, if rendered

Type:
  • HTMLULElement

el :HTMLElement

A reference to the HTML element for this view

Type:
  • HTMLElement

template :function

The templating function for rendering each item in the list. Should return a <li> as either an HTML string or an HTML element. Make sure the template function is bound to its original context to retain any encapsulated variables.

Type:
  • function

Class: exports

exports

A base model that each of the other models extends from.


new exports()

Members


cid :String

The client ID (CID) of this model. This property is set automatically when a new model is created.

Type:
  • String

collection :Array.<core#Model>

The collection of models to render in this list.

Type:
  • Array.<core#Model>

el :HTMLULElement

A reference to the <ul> for the current list, if rendered

Type:
  • HTMLULElement

el :HTMLElement

A reference to the HTML element for this view

Type:
  • HTMLElement

template :function

The templating function for rendering each item in the list. Should return a <li> as either an HTML string or an HTML element. Make sure the template function is bound to its original context to retain any encapsulated variables.

Type:
  • function

Class: exports

exports

A basic View class


new exports()

Members


cid :String

The client ID (CID) of this model. This property is set automatically when a new model is created.

Type:
  • String

collection :Array.<core#Model>

The collection of models to render in this list.

Type:
  • Array.<core#Model>

el :HTMLULElement

A reference to the <ul> for the current list, if rendered

Type:
  • HTMLULElement

el :HTMLElement

A reference to the HTML element for this view

Type:
  • HTMLElement

template :function

The templating function for rendering each item in the list. Should return a <li> as either an HTML string or an HTML element. Make sure the template function is bound to its original context to retain any encapsulated variables.

Type:
  • function