|
MoreMotion Face API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object | +--MoreMotionObjectManager
Manager Class that provides methods to navigate through the DOM structure and manage MoreMotionObject objects.
A static object of this class is available with name OMgr.
var OMgr = new MoreMotionObjectManager();
| Constructor Summary | |
MoreMotionObjectManager()
|
|
| Method Summary | |
void
|
addToCache(key, object, area)
Adds the given object to the cache with the specified key |
void
|
attachEvent(node,name,func)
Cross browser event attacher |
Object
|
createElement(tagName, elmName)
|
void
|
detachEvent(node,name,func)
Cross browser event detacher |
HTMLElement
|
findChildNode(parentNode, nodeName, attrName, attrValue, depth)
Searches the specified HTML Node under the given node. |
MoreMotionObject
|
findChildObject(parentNode, nodeName, attrName, attrValue, depth)
Searches the specified HTML Node under the given node and returns the MoreMotionObject that wraps it. |
HTMLElement
|
findParentNode(node,attrName,attrValue)
Returns the first parent node that has the specified attribute and attribute value. |
String
|
getAttribute(node,attrName)
Returns the value of the given attribute safely. |
HTMLElement[]
|
getChildInputElements(node)
Returns an array of all form elements ("input", "button", "select" and "editarea") that exits under the given node. |
HTMLElement
|
getChildNode(parentNode, nodeName, elmName)
Returns the first child node with the given node name. |
MoreMotionObject
|
getEnclosingObject(node, includingThis)
Searches the parent nodes of the given DOM element node to find a MoreMotionObject node. |
Object
|
getFromCache(key)
Returns the object associated with the given key from the cache. |
String
|
getIValue(node)
Returns the value of the "mo:value" attribute safely. |
HTMLElement
|
getMoChild(parentNode, type, name)
Returns the first child node that has the specified mo:type and optionally mo:name. |
String
|
getMoName(node)
Returns the value of the "mo:name" attribute safely. |
HTMLNode[]
|
getMoNodes(parentNode, types)
Searches the child nodes of the given node and returns an array nodes that have the specified mo:type |
HTMLElement
|
getMoObject(parentNode, type, name)
Searches the first child node that has the specified mo:type and mo:name and returns the MoreMotionObject that wraps it. |
HTMLElement
|
getMoParent(node, type, name, depth)
Returns the first parent node that has the specified type and optionally name. |
HTMLElement
|
getNodeByClass(parentNode, className)
Returns the first child node that has the specified class name |
ProcessField
|
getObject(node)
Creates the MoreMotionObject defined in the "mo:type" attribute of the given DOM element node and returns it. |
ProcessField
|
getObjectById(id)
Creates the MoreMotionObject defined in the "mo:type" attribute of the DOM element whose id is given and returns it. |
MoreMotionObject[]
|
getObjects(parentNode, types, oldparam)
Searches the child nodes of the given node and returns an array of MoreMotion Objects that have the specified mo:type |
PageInfo
|
getPageInfo(node)
Searches the parents of the given node to find a node that has "mo:pageInfo" attribute to extract extracts and return the page info from there. |
HTMLElement
|
getParentNode(node, nodeName)
Returns the first parent node with the given node name. |
props
|
getProps(node)
Creates a props object from the value of the "mo:props" attribute of the given node and returns it. |
Object
|
getStyle(node, style)
Returns the computed style of the given node and the style name |
String
|
getUniqueId(prefix)
Returns a unique id |
void
|
initialize(node)
Initializes all the MoreMotionObject objects existing in the given DOM element node. |
Object
|
needsInit(node)
|
void
|
refreshAction(frm)
Refreshes the value of the "_rand" hidden input element in the given form |
void
|
refreshHref(node)
Refreshes the value of the "_rand=" parameter existing in the href attribute of the specified DOM Node. |
Object
|
refreshLink(href)
Refreshes the value of the "_rand=" parameter existing in the givn string and returns it. |
void
|
releaseCache(area)
Releases all the object from the cache that reside in the given area |
void
|
removeFromCache(key)
Removes the object assocşated with the given key from the cache |
void
|
resetForm(nodeOrFormName)
Resets the specified form |
Object
|
resource(resId, parm1, parm2, parm3)
Returns the resource text associated with the specified resId. |
void
|
setAttribute(node, attrName, attrValue)
Sets the value of the given attribute safely. |
void
|
setDisabled(node, value)
Disables of enables all the input elements existing in the given DOM node |
void
|
setInitialOption(elm, value)
Sets the initial value of the given SELECT element
|
void
|
setIValue(node, value)
Sets the value of the "mo:value" attribute safely. |
void
|
setOpacity(node,ratio)
Cross browser opacity setter |
void
|
submitForm(nodeOrFormName, action)
Submits the specified form with the given action. |
| Constructor Detail |
MoreMotionObjectManager()
| Method Detail |
void addToCache(key, object, area)
key - The key for the cache
object - The object to store in the cache
area - The area that the given object resides in
void attachEvent(node,name,func)
node - The DOM Node to attach the event
name - The name of the event without "on". e.g. "mousemove" not "onmousemove".
func - function to attach
Object createElement(tagName, elmName)
void detachEvent(node,name,func)
node - The DOM node to detach the event
name - The name of the event without "on". e.g. "mousemove" not "onmousemove".
func - function to detach
HTMLElement findChildNode(parentNode, nodeName, attrName, attrValue, depth)
parentNode - The HTML node whose children will be searched
nodeName - The name of the node to focus the search. If specified the search will be performed only on the nodes that has this name.
attrName - The name of the attribute to find a matching value
attrValue - The value to match in the attribute value. If this parameter is omitted or is null then the analyzed node is selected in case of it has the attribute with the given name regardless of its value.
depth - The depth of the search. If omitted 999 is assumed.
MoreMotionObject findChildObject(parentNode, nodeName, attrName, attrValue, depth)
parentNode - The HTML node whose children will be searched
nodeName - The name of the node to focus the search. If specified the search will be performed only on the nodes that has this name.
attrName - The name of the attribute to find a matching value
attrValue - The value to match in the attribute value. If this parameter is omitted or is null then the analyzed node is selected in case of it has the attribute with the given name regardless of its value.
depth - The depth of the search. If omitted 999 is assumed.
HTMLElement findParentNode(node,attrName,attrValue)
node - The HTML node whose parent will be searched
attrName - The name of the attribute to find a matching value
attrValue - The value to match in the attribute value. If this parameter is omitted or is null then the analyzed node is selected in case of it has the attribute with the given name regardless of its value.
String getAttribute(node,attrName)
node - The node to extract the attribute value from
attrName - The name of the attribute
HTMLElement[] getChildInputElements(node)
HTMLElement getChildNode(parentNode, nodeName, elmName)
parentNode - The HTML node whose children will be searched
nodeName - The name of the node to find.
elmName - The element name. It is optional.
MoreMotionObject getEnclosingObject(node, includingThis)
node - The DOM element node to start searching the parent nodes.
includingThis - Flag denoting that the object seach starts from this node instead of the parentNode
Object getFromCache(key)
key - The key for the cache.
String getIValue(node)
node - The node to extract the "mo:value" attribute from
HTMLElement getMoChild(parentNode, type, name)
parentNode - The HTML node whose children will be searched
type - The mo:type to find.
name - The mo:name or the name of the node.
String getMoName(node)
node - The node to extract the attribute value from
HTMLNode[] getMoNodes(parentNode, types)
parentNode - The HTML node whose children will be searched
types - A single string or a string array that defines the type or types to collect
HTMLElement getMoObject(parentNode, type, name)
parentNode - The HTML node whose children will be searched
type - The mo:type to find.
name - The mo:name or the name of the node.
HTMLElement getMoParent(node, type, name, depth)
node - The HTML node whose parents will be searched
type - The mo:type to find.
name - The mo:name or the name of the node. Optional.
depth - The search depth
HTMLElement getNodeByClass(parentNode, className)
parentNode - The HTML node whose children will be searched
className - The className to find.
ProcessField getObject(node)
node - The DOM element node that contains "mo:type" attribute.
ProcessField getObjectById(id)
id - The id of the element node that contains "mo:type" attribute.
MoreMotionObject[] getObjects(parentNode, types, oldparam)
parentNode - The HTML node whose children will be searched
types - A single string or a string array that defines the type or the types to collect
PageInfo getPageInfo(node)
node - The DOM element node to start the searching off. If it is null then page info is taken from document.body node.
HTMLElement getParentNode(node, nodeName)
node - The HTML node whose parent will be searched
nodeName - The name of the node to find.
props getProps(node)
node - The DOM element node
Object getStyle(node, style)
node - The DOM node to investigate
style - The name of the CSS style in dashed form i.e. "text-align"
String getUniqueId(prefix)
prefix - A prefix for the id. If not specified "x" is assumed.
void initialize(node)
node - The DOM element node to start with initializing. If it is omitted document.body is used.
Object needsInit(node)
void refreshAction(frm)
frm - The Form object
void refreshHref(node)
node - The DOM Node that has a href attribute. The value of the href attribute must have a "_rand=" definition.
Object refreshLink(href)
href - The string that contains a "_rand=" definition
void releaseCache(area)
area - The name of the area to clear
void removeFromCache(key)
key - The key for the cache
void resetForm(nodeOrFormName)
nodeOrFormName - Either a DOM node existing in the form or the name of the form to submit
Object resource(resId, parm1, parm2, parm3)
resId - the Resource id
parm1 - Resource parameter 1. (Optional)
parm2 - Resource parameter 2. (Optional)
parm3 - Resource parameter 3. (Optional)
void setAttribute(node, attrName, attrValue)
node - The node to set the attribute value
attrName - The name of the attribute
attrValue - The value of the attribute
void setDisabled(node, value)
node - The container DOM node whose children to be enabled or disabled
value - boolean param. It should be true to disable false to enable
void setInitialOption(elm, value)
SELECT elementelm - The handle or the id of a HTML SELECT element
value - The initial value
void setIValue(node, value)
node - The node whose "mo:value" attribute to set
value - The value of the attribute
void setOpacity(node,ratio)
node - The DOM node to set the opacity
ratio - the opacity ratio between 0 and 100
void submitForm(nodeOrFormName, action)
nodeOrFormName - Either a DOM node existing in the form or the name of the form to submit
action - The action to set to the from object before submit
|
MoreMotion Face API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||