Views Class
Item Index
Methods
Properties
Methods
_basicViewConfigurations
-
config
Basic view configurations when defining/creating a view with shorthand function calls
Parameters:
-
configObject(optional)
Returns:
_loadSubView
-
subView
used by initSubViews
Parameters:
-
subViewObject
Returns:
subView passed
bootView
-
options
used by Firebrick.Boot:prepApplication to render the "view/Index.html" when autoRender is true
Parameters:
-
optionsObject-
viewDataObjectto pass to the view Store parameter
-
createView
-
name -
config
Create and render a view (shorthand function)
Parameters:
-
nameStringexample: "MyApp.view.MyView"
-
configObject(optional) object to config the View class with
Returns:
Firebrick.view.Base class
Example:
createView({...})
createView("MyApp.view.MyView")
createView("MyApp.view.MyView", {...})
defineView
-
name -
config
Note: different to Firebrick.define() for classes - Firebrick.defineView, defines and fetches if not already loaded the given view by name
Parameters:
-
nameStringname of the view to me shown "MyApp.view.MyView"
-
configObject(optional) object to config the View class with
Returns:
Firebrick.view.Base class
getBody
-
refresh
Shortcut to get jQuery("body")
Parameters:
-
refreshBoolean[default=false] (optional) if true gets the body object fresh from dom and not from cache
Returns:
jquery object
getTarget
-
selector
find the target using a selector - same as jQuery(selector)
Parameters:
-
selectorString, jQuery Object
Returns:
jquery object || null
initSubViews
-
view
initialise subviews of a view
Parameters:
-
viewObject
Returns:
view passed
renderTo
-
target -
html -
append -
options
Render HTML or Template to the given target
Parameters:
-
targetJQuery Object -
htmlStringtemplate or html
-
appendBoolean[default=false] if true will append to instead of overwriting content of target
-
options$.show ( options )arguments - optional
Returns:
target
Properties
_body
Object jquery object
private
jQuery body object (cache) - is set initally by {{crossLink Firebrick.views:getBody}}{{/crossLink}}
