Class Index | File Index

Classes


Namespace RicoUtil


Defined in: <ricoCommon.js>.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
<static>  
RicoUtil.addSelectOption(elem, value, text)
Adds a new option to the end of a select list
<static>  
RicoUtil.createFormField(parent, elemTag, elemType, id, name)
Creates a form element
<static>  
RicoUtil.createXmlDocument()
Returns a new XML document object
<static> deprecated  
RicoUtil.docElement()
<static> deprecated  
RicoUtil.docScrollLeft()
<static> deprecated  
RicoUtil.docScrollTop()
<static> deprecated  
RicoUtil.DOMNode_insertAfter(newChild, refChild)
Post condition - if childNodes[n] is refChild, than childNodes[n+1] is newChild.
<static>  
RicoUtil.eventKey(e)
<static>  
RicoUtil.formatPosNumber(posnum, decPlaces, thouSep, decPoint)
Format a positive number (integer or float)
<static>  
RicoUtil.getContentAsString(parentNode, isEncoded)
Return value of a node in an XML response.
<static>  
RicoUtil.getCookie(itemName)
<static>  
RicoUtil.getDirectChildrenByTag(e, tagName)
Finds all immediate children of e with tagName
deprecated  
getElementsComputedStyle(htmlElement, cssProperty, mozillaEquivalentCSS)
<static>  
RicoUtil.getInnerText(el, xImg, xForm, xClass)
Return text within an html element
<static>  
RicoUtil.getParentByTagName(el, tagName, className)
Return the parent of el that has the specified tagName.
<static>  
RicoUtil.getPreviosSiblingByTagName(el, tagName)
Return the previous sibling that has the specified tagName
<static>  
RicoUtil.nan2zero(n)
<static>  
RicoUtil.positionCtlOverIcon(ctl, icon)
Positions ctl over icon
<static>  
RicoUtil.setCookie(itemName, itemValue, daysToKeep, cookiePath, cookieDomain)
Write information to a cookie.
deprecated  
deprecated  
<static> deprecated  
RicoUtil.windowHeight()
<static> deprecated  
RicoUtil.windowWidth()
<static>  
RicoUtil.wrapChildren(el, cls, id, wrapperTag)
Wrap the children of a DOM element in a new element
Namespace Detail
RicoUtil
Method Detail
<static> RicoUtil.addSelectOption(elem, value, text)
Adds a new option to the end of a select list
Parameters:
elem
value
text
Returns:
new option element

<static> RicoUtil.createFormField(parent, elemTag, elemType, id, name)
Creates a form element
Parameters:
parent
new element will be appended to this node
elemTag
element to be created (input, button, select, textarea, ...)
elemType
for input tag this specifies the type (checkbox, radio, text, ...)
id
id for new element
name
name for new element, if not specified then name will be the same as the id
Returns:
new element

<static> RicoUtil.createXmlDocument()
Returns a new XML document object

<static> RicoUtil.docElement()
Deprecated:
Will be removed in Rico 3

<static> RicoUtil.docScrollLeft()
Deprecated:
Use Prototype's document.viewport.getScrollOffsets instead

<static> RicoUtil.docScrollTop()
Deprecated:
Use Prototype's document.viewport.getScrollOffsets instead

<static> RicoUtil.DOMNode_insertAfter(newChild, refChild)
Post condition - if childNodes[n] is refChild, than childNodes[n+1] is newChild.
Parameters:
newChild
refChild
Deprecated:
Use Prototype's Element#insert instead

<static> RicoUtil.eventKey(e)
Parameters:
e
event object
Returns:
the key code stored in the event

<static> RicoUtil.formatPosNumber(posnum, decPlaces, thouSep, decPoint)
Format a positive number (integer or float)
Parameters:
posnum
number to format
decPlaces
the number of digits to display after the decimal point
thouSep
the character to use as the thousands separator
decPoint
the character to use as the decimal point
Returns:
formatted string

<static> RicoUtil.getContentAsString(parentNode, isEncoded)
Return value of a node in an XML response. For Konqueror 3.5, isEncoded must be true.
Parameters:
parentNode
isEncoded

<static> RicoUtil.getCookie(itemName)
Parameters:
itemName
Returns:
the value of the specified cookie (or null if it doesn't exist)

<static> RicoUtil.getDirectChildrenByTag(e, tagName)
Finds all immediate children of e with tagName
Parameters:
e
DOM node or node id
tagName
tag name to search for (case-insensative)
Returns:
array of matching elements

getElementsComputedStyle(htmlElement, cssProperty, mozillaEquivalentCSS)

Defined in: <ricoDragDrop.js>.
Parameters:
htmlElement
cssProperty
mozillaEquivalentCSS
Deprecated:
Use Prototype's Element#getStyle instead

<static> RicoUtil.getInnerText(el, xImg, xForm, xClass)
Return text within an html element
Parameters:
el
DOM node
xImg
true to exclude img tag info
xForm
true to exclude input, select, and textarea tags
xClass
exclude elements with a class name of xClass

<static> RicoUtil.getParentByTagName(el, tagName, className)
Return the parent of el that has the specified tagName.
Parameters:
el
DOM node
tagName
tag to search for
className
optional

<static> RicoUtil.getPreviosSiblingByTagName(el, tagName)
Return the previous sibling that has the specified tagName
Parameters:
el
tagName

<static> RicoUtil.nan2zero(n)
Parameters:
n
a number (or a string to be converted using parseInt)
Returns:
the integer value of n, or 0 if n is not a number

<static> RicoUtil.positionCtlOverIcon(ctl, icon)
Positions ctl over icon
Parameters:
ctl
(div with position:absolute)
icon
element (img, button, etc) that ctl should be displayed next to

<static> RicoUtil.setCookie(itemName, itemValue, daysToKeep, cookiePath, cookieDomain)
Write information to a cookie. For cookies to be retained for the current session only, set daysToKeep=null. To erase a cookie, pass a negative daysToKeep value.
Parameters:
itemName
itemValue
daysToKeep
cookiePath
cookieDomain
See:
Quirksmode article for more information about cookies.

toDocumentPosition(element)

Defined in: <ricoDragDrop.js>.
Parameters:
element
Deprecated:
Use Prototype's Element#cumulativeOffset instead

toViewportPosition(element)

Defined in: <ricoDragDrop.js>.
Parameters:
element
Deprecated:
Use Prototype's Element#viewportOffset instead

<static> RicoUtil.windowHeight()
Deprecated:
Use Prototype's document.viewport.getHeight instead
Returns:
available height, excluding scrollbar & margin

<static> RicoUtil.windowWidth()
Deprecated:
Use Prototype's document.viewport.getWidth instead
Returns:
available width, excluding scrollbar & margin

<static> RicoUtil.wrapChildren(el, cls, id, wrapperTag)
Wrap the children of a DOM element in a new element
Parameters:
el
the element whose children are to be wrapped
cls
class name of the wrapper (optional)
id
id of the wrapper (optional)
wrapperTag
type of wrapper element to be created (optional, defaults to DIV)
Returns:
new wrapper element

Documentation generated by JsDoc Toolkit 2.1.0 on Fri Mar 27 2009 23:48:26 GMT-0500 (CDT)