Views Class
Item Index
Methods
Properties
Methods
_basicViewConfigurations
-
config
Basic view configurations when defining/creating a view with shorthand function calls
Parameters:
-
config
Object(optional)
Returns:
_loadSubView
-
subView
used by initSubViews
Parameters:
-
subView
Object
Returns:
subView passed
bootView
-
options
used by Firebrick.Boot:prepApplication to render the "view/Index.html" when autoRender is true
Parameters:
-
options
Object-
viewData
Objectto pass to the view Store parameter
-
createView
-
name
-
config
Create and render a view (shorthand function)
Parameters:
-
name
Stringexample: "MyApp.view.MyView"
-
config
Object(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:
-
name
Stringname of the view to me shown "MyApp.view.MyView"
-
config
Object(optional) object to config the View class with
Returns:
Firebrick.view.Base class
getBody
-
refresh
Shortcut to get jQuery("body")
Parameters:
-
refresh
Boolean[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:
-
selector
String, jQuery Object
Returns:
jquery object || null
initSubViews
-
view
initialise subviews of a view
Parameters:
-
view
Object
Returns:
view passed
renderTo
-
target
-
html
-
append
-
options
Render HTML or Template to the given target
Parameters:
-
target
JQuery Object -
html
Stringtemplate or html
-
append
Boolean[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}}