Class Index | File Index

Classes


Namespace aV.aParser

Represents the name space for aParser's functions and methods.
Defined in: aV.main.aParser.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Represents the name space for aParser's functions and methods.
Method Summary
Method Attributes Method Name and Description
<static>  
aV.aParser.assignAttributesFromFile(fileAddress, includeStyleTags, beforeSet, afterSet, includeStyleTags)
Assigns the elements' attributes using the rules from the given text file.
<static>  
aV.aParser.assignAttributesFromStyleTag(propertyName, beforeSet, afterSet)
Assigns the element's attributes using the inline style elements defined in the document.
<static>  
aV.aParser.assignAttributesFromText(ruleText, propertyName, beforeSet, afterSet)
Assigns the elements' attributes rules from the ruleText See aV.aParser.retrieveElementsAndSetAttributes for other parameters.
<static>  
aV.aParser.retrieveElementsAndSetAttributes(queryStr, propertyName, attributeStr, beforeSet, afterSet)
Collects the elements which satisfies the CSS query given in queryString and assigns them the attributes given in attributeStr as text.
<static>  
aV.aParser.setElementAttributes(element, propertyName, attributeStr)
Evaluates and assigns the attributes given in attributeStr as string to the given element.
Namespace Detail
aV.aParser
Represents the name space for aParser's functions and methods.
Requires:
(aV.ext.string.js)
(aV.main.ajax.js)
cssQuery (dE.cssQuery.js)
Method Detail
<static> aV.aParser.assignAttributesFromFile(fileAddress, includeStyleTags, beforeSet, afterSet, includeStyleTags)
Assigns the elements' attributes using the rules from the given text file. Loads the file and then calls the assignAttributesFromText to parse its text content. See aV.aParser.retrieveElementsAndSetAttributes for other parameters.
Parameters:
{String} fileAddress
The address of the file which contains the rules with a CSS file like structure.
{Boolean} includeStyleTags Optional, Default: true
Tells the function that whether it should use the inline style tags for additional rules.
beforeSet
afterSet
includeStyleTags

<static> aV.aParser.assignAttributesFromStyleTag(propertyName, beforeSet, afterSet)
Assigns the element's attributes using the inline style elements defined in the document. The style elements' types should be "text/propertyName" for aV.aParser to recognize them. propertyName in "text/propertyName" refers to the given parameter's value. See aV.aParser.retrieveElementsAndSetAttributes for parameters.
Parameters:
propertyName
beforeSet
afterSet

<static> aV.aParser.assignAttributesFromText(ruleText, propertyName, beforeSet, afterSet)
Assigns the elements' attributes rules from the ruleText See aV.aParser.retrieveElementsAndSetAttributes for other parameters.
Parameters:
{String} ruleText
The text which contains the rules in an external CSS file like structure.
propertyName
beforeSet
afterSet

<static> aV.aParser.retrieveElementsAndSetAttributes(queryStr, propertyName, attributeStr, beforeSet, afterSet)
Collects the elements which satisfies the CSS query given in queryString and assigns them the attributes given in attributeStr as text. If attributeStr is *, then it uses the elements' inline attribute whose name is given in propertyName to gather the element spesific attributeStr.
Parameters:
{String} queryStr
The CSS query string for determination of the proper elements.
{String} propertyName
The name of the property which the parsed attributes will be assigned to.
{String} attributeStr
The string which containts the attributes.
{Function(HTMLElement)} beforeSet Optional
The function, which will be called for each found element before setting its attributes. If the function returns false, the element is skipped. You may use this parameter to do additional checks on the found elements.
{Function(HTMLElement)} afterSet Optional
The function, which will be called for each found element after successfully setting the attributes. You may do additional operations on the found elements by giving a proper function to this paramter.
Deprecated:
Used internally, in most cases you shouldn't be in a need for calling this function.

<static> {HTMLElement} aV.aParser.setElementAttributes(element, propertyName, attributeStr)
Evaluates and assigns the attributes given in attributeStr as string to the given element. Works incrementally, which means will override existing properties but leaves the ones which are not mentioned in attributeStr as they are.
Parameters:
{HTMLElementObject} element
The element whose attributes will be set.
{String} propertyName
The name of the property which the parsed attributes will be assigned to.
{String} attributeStr
The string which containts the attributes.
Deprecated:
Used internally, might be used if necessary.
Returns:
{HTMLElement} Returns the given element if succeeds, false if fails.

Documentation generated by JsDoc Toolkit 2.0.1 on Sun Aug 03 2008 14:14:38 GMT+0300 (EEST)