API Docs for: 0.13.12
Show:

view.Base Class

Extends class.Base
Defined in: src\firebrick.js:2807
Module: Firebrick.class

Extends

Methods

_init

(
  • callback
)
private

Parameters:

  • callback Function

_isBound

(
  • checkId
)
Boolean private

has the data been bound

Parameters:

  • checkId Boolean

    [default=false] optional - if true it will also check that the target it bound with the current view and not just generally bound to

Returns:

Boolean:

_render

(
  • those
)
private

Parameters:

  • those Object

    of Firebrick.views.renderTo

_renderHTML

(
  • html
)
Object private

Parameters:

  • html String

Returns:

Object:

self

bind

()

Called by view.Base:render()

bindContent

()

detroy

() Object

unbind and remove from DOM

Returns:

Object:

self

getData

() Object

Returns data store data as object

Returns:

Object:

getEnclosedBindId

() String

Returns:

String:

getEnclosedTarget

() JQuery Object | Null

Returns:

JQuery Object | Null:

getStore

()

Returns the store linked to the view

getTarget

() Object | Null

Returns:

Object | Null:

jquery object

hide

()

hide target view.Base:getTarget

init

()

Called on creation

initStore

(
  • Firebrick.view.Base
)
Object private

Converts View data into a Store if not already done

Parameters:

  • Firebrick.view.Base Object

    object

Returns:

Object:

self

initSubViews

() private

initView

() Object

Construct the view with template and data binding

Returns:

Object:

self

isTargetBound

() Boolean

has data been bound to the target by THIS view

Returns:

Boolean:

isTargetBound

() Boolean

has data been bound to the target by A|ANY view

Returns:

Boolean:

isVisible

()

prepHtml

() String

prepare the HTML for rendering

Returns:

String:

html

remove

() Object

remove from dom

Returns:

Object:

self

render

() Object

Calls renderTo without parameters

Returns:

Object:

self

setDisposeCallback

(
  • el
)

Parameters:

  • el HTMLElement

show

()

show target view.Base:getTarget

startLoader

() private

stopLoader

() private

unbind

() Object

unbind the data from this view

Returns:

Object:

self

unbound

() private

called by view.Base:setDisposeCallback

update

(
  • data
)
Object

update the view with new data

Parameters:

  • data Object

    extra data you wish to pass to the view

Returns:

Object:

self

Properties

_state

String private

State the view is current in. "initial", "rendered", "unbound", "destroyed"

Default: "initial"

animations

$.show() Arguments

Default: null

appendTarget

Boolean

whether to append or overwrite the content of the target

Default: false

applyBindingsToDescendants

Boolean

bindings are applied to its decendants, not on the target itself

Default: false

async

Boolean

whether or not the template is to load asyncronously

Default: true

autoRender

Boolean

render the view on class creation

Default: true

bindAttribute

String

custom attribute to add to the element to mark as bound

Default: "fb-view-bind"

controller

String | Object name of the controller | | controller class itself

controller to bind to the view

Default: null

enclosedBind

Boolean

wrap the view inside its own div which gets bound separatly to its context

Default: false

enclosedBindIdPrefix

String

Default: "fb-enclosed-bind-"

html

String html

parsed html using the tpl and data

Default: ""

isView

Boolean private

boolean whether class is view

loading

Boolean private

whether the loader is being shown or not

Default: false

loadingTpl

String

loading template - loaded into target is showLoading == true

Default: Firebrick.templates:loadingTpl

showLoading

Boolean

whether to show that the view is loading

Default: true

store

String | Store Object

bind a store or plain data to the view

Default: null

subViews

String | Array of Strings | Object | Array of Objects

define subviews to load after creation of this view

Example:

    subViews: MyApp.view.MyView
    subViews: ["MyApp.view.MyView", "MyApp.view.MyView1"]
    subViews: Firebrick.defineView(...)
    subViews: [Firebrick.defineView(...), Firebrick.defineView(...)]

target

String | Object jquery selector | | jquery object

Target to which to render the html content

Default: null

tpl

String

set when the view is loaded by the ajax request

Default: ""