new view()
- Copyright:
- (c) Copyright 2013 - 2016 AV Digital Media Ltd. All Rights Reserved. No unauthorized copying, distribution or modification to this code in whole or in part is permitted without the express permission of AV Digital Media Ltd (UK).
This is the main view object which all views should extend
Methods
(static) addEvents()
Placeholder addEvents method
(static) clearObjects()
Clear object and set the values to null to ensure references can be garbage collected
(static) construct()
Override the intialize function and set the notifier reference object
(static) content(item, type, value)
Set the internal content for an element
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | The item element |
type |
Number | The type of command to add i.e. html, text, val |
value |
String | Value of the content to set |
Returns:
The action value
(static) destroy()
Destroy the view
(static) fadeIn(speed, display, complete, item)
TODO Fade in the main view
Parameters:
Name | Type | Description |
---|---|---|
speed |
Number | The item to adjust |
display |
String | When using aim lib can be used to set the object display type |
complete |
function | The on complete function handler |
item |
Object | The item to adjust, if no item then defaults to the main view |
(static) fadeOut(speed, display, complete)
TODO Fade out the main view
Parameters:
Name | Type | Description |
---|---|---|
speed |
Number | The item to adjust |
display |
String | When using aim lib can be used to set the object display type |
complete |
function | The on complete function handler |
(static) find(nameStr, parent)
Find an internal elements, this method is dependant on the aim Object and will not return any results if the object has been loaded and ready for use
Parameters:
Name | Type | Description |
---|---|---|
nameStr |
String | The string selector reference for the item |
parent |
Object | The parent HTML element to confine the search to |
(static) hide(item)
Hide the view element or selected element
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | The item to adjust |
(static) initialize()
Default View initialization will automatically call the render function
(static) model(model)
Get model method
Parameters:
Name | Type | Description |
---|---|---|
model |
Object | The Model object class type or name |
Returns:
The matched object
(static) removeEvents()
Placeholder removeEvents method, this method is executed with the destroy method and thus the overriding version would have any dom event removal requests
(static) render()
Override the render function, this is a reference method only that should be overidden on a per VIEW basis to render the requred view elements
(static) setObjects()
Set objects
(static) setView(name, asaim)
Set the main view element for this view component
Parameters:
Name | Type | Description |
---|---|---|
name |
String | Selector name reference |
asaim |
boolean | Determines whether the view object should be returned as an aim.$ |
(static) show(item, type)
Show the view element or selected element
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | The item to adjust |
type |
String | The display type aim lib only |
(static) template(data, parent, doRender)
Inserts the view component markup into the VIEW.view element, this method should be called prior to rendering the view
Parameters:
Name | Type | Description |
---|---|---|
data |
String | The HTML data for the view element |
parent |
String | The parent element to append the data |
doRender |
boolean | Determines whether the render method should automatically be called |