awa.mvc.ModelTabContainerView Class
/var/www/azaleahealth.com/branches/docs/source_repo/awa/resources/apps/js/awa/mvc/ModelTabContainerView.js:5
Fills in a lot of the work required for tab views that focus on a specific model. example: myrna/CustomersMainView.js
Item Index
Methods
- allowedEvents
- bindToModel
- createTab
- destroy
- doChildrenLayouts
- doLayout
- getTabView
- getWidget
- insertTab
- on
- onDestroyed
- onNewTabID
- onRendered
- onSelectedTabClosed
- onTabCreated
- onTabDestroyed
- onTabDisplayed
- refresh
- render
- requestChange
- requestClose
- setCurrentTab
- setCurrentTabAsContentList
- setElement
- triggerDestroyed
- triggerRendered
- viewOptions
Methods
allowedEvents
()
Undefined
Returns:
bindToModel
-
[model]
Parameters:
-
[model]awa.mvc.Model | Backbone.Model optionalModel to bind to
Returns:
createTab
-
params -
$container
Parameters:
-
paramsObjectThis can be either the constructor method or an already constructed view. I'd suggest you construct your view first as it's easier to track any issues.-
onTabSelectString | FunctionThis can be a string location or a function that carries out its own process. It is recommended that you also set a location per Tab.
-
[view]awa.mvc.View | Constructor optionalView instance that is displayed in tab panel
-
[viewArgs]Array optionalArguments applied to the view class
-
[title]String optionalTab title
-
[index]String optional???
-
[identifier]String optionalidentifying key, should be dom safe
-
[template]String | Function optionaltemplate to render into tab
-
[args]Object optionaldont use this
-
[locked]Boolean optionalPrevents user from closing tab
-
[icon]String optionalIcon for title
-
-
$containerObjectdont use this
Returns:
destroy
()
awa.mvc.View
Returns:
doChildrenLayouts
()
Undefined
Returns:
doLayout
()
Undefined
Returns:
getTabView
-
id
Parameters:
-
idStringTab identifier
Returns:
getWidget
()
Array
Returns:
insertTab
-
params
Parameters:
-
paramsObjectThis can be either the constructor method or an already constructed view. I'd suggest you construct your view first as it's easier to track any issues.
Returns:
on
-
event -
callback -
context
More Magic
Parameters:
-
eventStringEvent string
-
callbackFunctionCallback
-
contextObjectContext
Returns:
onDestroyed
-
callback -
context
More Magic
Parameters:
-
callbackFunctionCallback
-
contextObjectContext
Returns:
onNewTabID
-
args
Parameters:
-
argsObjectOptions object-
tabIdentifierStringweb safe string identifier for tab
-
idStringweb safe string identifier for tab. either this or tabIdentifier is requires
-
Returns:
onRendered
-
callback -
context
Parameters:
-
callbackFunctionCallback -
contextObjectDefines scope of callback
Returns:
onSelectedTabClosed
-
tab
Parameters:
-
tabObjectTab config
Returns:
onTabCreated
-
callback -
[context]
Parameters:
-
callbackFunctionEvent handler -
[context]Object optionalobject to represent this
Returns:
onTabDestroyed
-
callback -
[context]
Parameters:
-
callbackFunctionEvent handler -
[context]Object optionalobject to represent this
Returns:
onTabDisplayed
-
callback -
[context]
Parameters:
-
callbackFunctionEvent handler -
[context]Object optionalobject to represent this
Returns:
refresh
()
awa.mvc.View
Returns:
render
()
awa.mvc.TabContainerView
chainable
Returns:
requestChange
-
callback
Parameters:
-
callbackFunctionfunction to call when you have determined if the view can close or not. If it can close, return an object with property 'success' set to 1.
Returns:
requestClose
-
callback
Parameters:
-
callbackFunctionfunction to call when you have determined if the view can close or not. If it can close, return an object with property 'success' set to 1.
Returns:
setCurrentTab
-
[args]
use an args object to set the current tab. args are based down to the structured view's setSection method. If args.tabIdentifier is not set and args.id is, the routeRoot is used in conjuction with the id to generate a tabIdentifier
Parameters:
-
[args]Object optionalTab configuration to match
-
[id]Object optionalprimary model id.
-
[tabIdentifier]Object optionaltab identifier
-
Returns:
tab object
setCurrentTabAsContentList
()
Undefined
quick function to set the model list view tab as the current tab
Returns:
setElement
-
element -
[delegate]
Parameters:
-
elementJquery.SelectorJquery selector -
[delegate]? optional?
Returns:
triggerDestroyed
()
Undefined
More Magic
Returns:
triggerRendered
-
args
Parameters:
-
argsObjectparameter to emit
Returns:
viewOptions
()
Array
Returns:
Properties
__parent__
View
Default: undefined
className
Boolean | Function
Default: "awa-mvc-View"
closeOnReplace
Boolean
Default: false
globalKeys
Object
Default: undefined
keys
Object
Default: undefined
ModelClass
Class
Model class for primary model
Default: undefined
modelListID
String
Default: undefined
ModelListStructuredViewClass
Class
View class for model structured view that handles list responsibilites
Default: undefined
modelListViewArgs
Function | Object
args object that is passed to list structured view class
Default: undefined
ModelListViewClass
Class
View class for model contents list view
Default: undefined
ModelStructuredViewClass
Class
View class for model structured view
Default: undefined
modelViewArgs
Obejct
Default properties based to the constructor of each Structured View
Default: {}
refreshOnReplace
Boolean
Default: true
rendered
Boolean
Default: false
routeRoot
String
override this in a subclass to specify the route root used by awa.hist.setLocation. This is also used in tab identifiers
Default: undefined
title
Strin
Default: "View"
tpl
Function
Default: undefined
tplArgs
Object
Default: undefined