YAHOO.util.CustomEvent |
appendEvent
CustomEvent fired when the Module is appended to the DOM
YAHOO.widget.Module.prototype.args = none;*
|
YAHOO.util.CustomEvent |
beforeHideEvent
CustomEvent fired before the Module is hidden
YAHOO.widget.Module.prototype.args = none;*
|
YAHOO.util.CustomEvent |
beforeInitEvent
CustomEvent fired prior to class initalization.
|
YAHOO.util.CustomEvent |
beforeRenderEvent
CustomEvent fired before the Module is rendered
YAHOO.widget.Module.prototype.args = none;*
|
YAHOO.util.CustomEvent |
beforeShowEvent
CustomEvent fired before the Module is shown
YAHOO.widget.Module.prototype.args = none;*
|
Element |
body
The body element, denoted with CSS class "bd"
|
YAHOO.util.CustomEvent |
changeBodyEvent
CustomEvent fired when the body content of the Module is modified
YAHOO.widget.Module.prototype.args = string;/element representing the new body content
|
YAHOO.util.CustomEvent |
changeContentEvent
CustomEvent fired when the content of the Module is modified
YAHOO.widget.Module.prototype.args = none;*
|
YAHOO.util.CustomEvent |
changeFooterEvent
CustomEvent fired when the footer content of the Module is modified
YAHOO.widget.Module.prototype.args = string;/element representing the new footer content
|
YAHOO.util.CustomEvent |
changeHeaderEvent
CustomEvent fired when the header content of the Module is modified
YAHOO.widget.Module.prototype.args = string;/element representing the new header content
|
Element[] |
childNodesInDOM
Array of elements
|
YAHOO.util.CustomEvent |
destroyEvent
CustomEvent fired when the Module is destroyed
YAHOO.widget.Module.prototype.args = none;*
|
Element |
element
The main module element that contains the header, body, and footer
|
Element |
footer
The footer element, denoted with CSS class "ft"
|
Element |
header
The header element, denoted with CSS class "hd"
|
YAHOO.util.CustomEvent |
hideEvent
CustomEvent fired after the Module is hidden
YAHOO.widget.Module.prototype.args = none;*
|
string |
id
The id of the element
|
string |
imageRoot
The string representing the image root
|
YAHOO.util.CustomEvent |
initEvent
CustomEvent fired after class initalization.
|
YAHOO.util.CustomEvent |
renderEvent
CustomEvent fired after the Module is rendered
YAHOO.widget.Module.prototype.args = none;*
|
YAHOO.util.CustomEvent |
showEvent
CustomEvent fired after the Module is shown
YAHOO.widget.Module.prototype.args = none;*
|
string |
CSS_BODY
Constant representing the module body
|
string |
CSS_FOOTER
Constant representing the module footer
|
string |
CSS_HEADER
Constant representing the module header
|
string |
CSS_MODULE
Constant for the default CSS class name that represents a Module
|
string |
IMG_ROOT
Constant representing the prefix path to use for non-secure images
|
string |
IMG_ROOT_SSL
Constant representing the prefix path to use for securely served images
|
string |
RESIZE_MONITOR_SECURE_URL
Constant representing the url for the "src" attribute of the iframe used to monitor changes to the browser's base font size
|
Class YAHOO.widget.Module
Object | +--YAHOO.widget.Module
class
YAHOO.widget.Module
Field Summary [top]
Constructor Summary [top]
YAHOO.widget.Module
Copyright (c) 2006, Yahoo!
Method Summary [top]
void |
appendToBody
(<Element> element)
Appends the passed element to the body.
|
void |
appendToFooter
(<Element> element)
Appends the passed element to the footer.
|
void |
appendToHeader
(<Element> element)
Appends the passed element to the header.
|
string |
browser
()
String representing the current user-agent browser
|
void |
configMonitorResize
(type, args, obj)
Default event handler for the "monitorresize" configuration property
|
void |
configVisible
(type, args, obj)
Default event handler for changing the visibility property of a Module.
|
void |
destroy
()
Removes the Module element from the DOM and sets all child elements to null.
|
void |
hide
()
Hides the Module element by setting the visible configuration property to false.
|
void |
init
(<string> <Element> el, <object> userConfig)
The Module class's initialization method, which is executed for Module and all of its subclasses.
|
void |
initDefaultConfig
()
Initializes the custom events for Module which are fired automatically at appropriate times by the Module class.
|
void |
initEvents
()
Initializes the custom events for Module which are fired automatically at appropriate times by the Module class.
|
void |
initResizeMonitor
()
Initialized an empty DOM element that is placed out of the visible area that can be used to detect text resize.
|
boolean |
isSecure
()
Boolean representing whether or not the current browsing context is secure (https)
|
void |
onDomResize
(e, obj)
Event handler fired when the resize monitor element is resized.
|
string |
platform
()
String representing the current user-agent platform
|
boolean |
render
(<string> <Element> appendToNode, <Element> moduleElement)
Renders the Module by inserting the elements that are not already in the main Module into their correct places.
|
void |
setBody
(<string> <Element> bodyContent)
Sets the Module's body content to the HTML specified, or appends the passed element to the body.
|
void |
setFooter
(<string> <Element> footerContent)
Sets the Module's footer content to the HTML specified, or appends the passed element to the footer.
|
void |
setHeader
(<string> <Element> headerContent)
Sets the Module's header content to the HTML specified, or appends the passed element to the header.
|
void |
show
()
Shows the Module element by setting the visible configuration property to true.
|
string |
toString
()
Returns a string representation of the object.
|
Field Detail [top]
appendEvent
YAHOO.util.CustomEvent
appendEvent
CustomEvent fired when the Module is appended to the DOM
YAHOO.widget.Module.prototype.args = none;*
beforeHideEvent
YAHOO.util.CustomEvent
beforeHideEvent
CustomEvent fired before the Module is hidden
YAHOO.widget.Module.prototype.args = none;*
beforeInitEvent
YAHOO.util.CustomEvent
beforeInitEvent
CustomEvent fired prior to class initalization.
YAHOO.widget.Module.prototype.args = class;reference of the initializing class, such as this.beforeInitEvent.fire(YAHOO.widget.Module)
beforeRenderEvent
YAHOO.util.CustomEvent
beforeRenderEvent
CustomEvent fired before the Module is rendered
YAHOO.widget.Module.prototype.args = none;*
beforeShowEvent
YAHOO.util.CustomEvent
beforeShowEvent
CustomEvent fired before the Module is shown
YAHOO.widget.Module.prototype.args = none;*
body
Element
body
The body element, denoted with CSS class "bd"
changeBodyEvent
YAHOO.util.CustomEvent
changeBodyEvent
CustomEvent fired when the body content of the Module is modified
YAHOO.widget.Module.prototype.args = string;/element representing the new body content
changeContentEvent
YAHOO.util.CustomEvent
changeContentEvent
CustomEvent fired when the content of the Module is modified
YAHOO.widget.Module.prototype.args = none;*
changeFooterEvent
YAHOO.util.CustomEvent
changeFooterEvent
CustomEvent fired when the footer content of the Module is modified
YAHOO.widget.Module.prototype.args = string;/element representing the new footer content
changeHeaderEvent
YAHOO.util.CustomEvent
changeHeaderEvent
CustomEvent fired when the header content of the Module is modified
YAHOO.widget.Module.prototype.args = string;/element representing the new header content
childNodesInDOM
Element[]
childNodesInDOM
Array of elements
destroyEvent
YAHOO.util.CustomEvent
destroyEvent
CustomEvent fired when the Module is destroyed
YAHOO.widget.Module.prototype.args = none;*
element
Element
element
The main module element that contains the header, body, and footer
footer
Element
footer
The footer element, denoted with CSS class "ft"
header
Element
header
The header element, denoted with CSS class "hd"
hideEvent
YAHOO.util.CustomEvent
hideEvent
CustomEvent fired after the Module is hidden
YAHOO.widget.Module.prototype.args = none;*
id
string
id
The id of the element
imageRoot
string
imageRoot
The string representing the image root
initEvent
YAHOO.util.CustomEvent
initEvent
CustomEvent fired after class initalization.
YAHOO.widget.Module.prototype.args = class;reference of the initializing class, such as this.initEvent.fire(YAHOO.widget.Module)
renderEvent
YAHOO.util.CustomEvent
renderEvent
CustomEvent fired after the Module is rendered
YAHOO.widget.Module.prototype.args = none;*
showEvent
YAHOO.util.CustomEvent
showEvent
CustomEvent fired after the Module is shown
YAHOO.widget.Module.prototype.args = none;*
CSS_BODY
string
CSS_BODY
Constant representing the module body
CSS_FOOTER
string
CSS_FOOTER
Constant representing the module footer
CSS_HEADER
string
CSS_HEADER
Constant representing the module header
CSS_MODULE
string
CSS_MODULE
Constant for the default CSS class name that represents a Module
IMG_ROOT
string
IMG_ROOT
Constant representing the prefix path to use for non-secure images
IMG_ROOT_SSL
string
IMG_ROOT_SSL
Constant representing the prefix path to use for securely served images
RESIZE_MONITOR_SECURE_URL
string
RESIZE_MONITOR_SECURE_URL
Constant representing the url for the "src" attribute of the iframe used to monitor changes to the browser's base font size
Constructor Detail [top]
YAHOO.widget.Module
YAHOO.widget.Module
()
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
- Parameters:
-
el
- The element ID representing the Module OR -
el
- The element representing the Module -
userConfig
- The configuration object literal containing the configuration that should be set for this module. See configuration documentation for more details.
Method Detail [top]
appendToBody
void
appendToBody
(<Element> element)
Appends the passed element to the body. If no body is present, one will be automatically created.
- Parameters:
-
element
- The element to append to the body
appendToFooter
void
appendToFooter
(<Element> element)
Appends the passed element to the footer. If no footer is present, one will be automatically created.
- Parameters:
-
element
- The element to append to the footer
appendToHeader
void
appendToHeader
(<Element> element)
Appends the passed element to the header. If no header is present, one will be automatically created.
- Parameters:
-
element
- The element to append to the header
browser
string
browser
()
String representing the current user-agent browser
HASH(0x1daddd4)
configMonitorResize
void
configMonitorResize
(type, args, obj)
Default event handler for the "monitorresize" configuration property
HASH(0x1dadef4)
configVisible
void
configVisible
(type, args, obj)
Default event handler for changing the visibility property of a Module. By default, this is achieved by switching the "display" style between "block" and "none".
This method is responsible for firing showEvent and hideEvent.
HASH(0x1d4a038)
destroy
void
destroy
()
Removes the Module element from the DOM and sets all child elements to null.
HASH(0x1d4a158)
hide
void
hide
()
Hides the Module element by setting the visible configuration property to false. Also fires two YAHOO.widget.Module.prototype.events = beforeHideEvent;prior to the visibility change, and hideEvent after.
HASH(0x1d4a278)
init
void
init
(<string> <Element> el, <object> userConfig)
The Module class's initialization method, which is executed for Module and all of its subclasses. This method is automatically called by the constructor, and sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
- Parameters:
-
el
- The element ID representing the Module OR -
el
- The element representing the Module -
userConfig
- The configuration object literal containing the configuration that should be set for this module. See configuration documentation for more details.
initDefaultConfig
void
initDefaultConfig
()
Initializes the custom events for Module which are fired automatically at appropriate times by the Module class.
HASH(0x1d4a530)
initEvents
void
initEvents
()
Initializes the custom events for Module which are fired automatically at appropriate times by the Module class.
HASH(0x1d4a650)
initResizeMonitor
void
initResizeMonitor
()
Initialized an empty DOM element that is placed out of the visible area that can be used to detect text resize.
HASH(0x1d4a770)
isSecure
boolean
isSecure
()
Boolean representing whether or not the current browsing context is secure (https)
HASH(0x1d4a890)
onDomResize
void
onDomResize
(e, obj)
Event handler fired when the resize monitor element is resized.
HASH(0x1d4a9b0)
platform
string
platform
()
String representing the current user-agent platform
HASH(0x1d4aad0)
render
boolean
render
(<string> <Element> appendToNode, <Element> moduleElement)
Renders the Module by inserting the elements that are not already in the main Module into their correct places. Optionally appends the Module to the specified node prior to the render's execution. YAHOO.widget.Module.prototype.NOTE = For;Modules without existing markup, the appendToNode argument is REQUIRED. If this argument is ommitted and the current element is not present in the document, the function will return false, indicating that the render was a failure.
- Parameters:
-
appendToNode
- The element id to which the Module should be appended to prior to rendering OR -
appendToNode
- The element to which the Module should be appended to prior to rendering -
moduleElement
- OPTIONAL. The element that represents the actual Standard Module container.
- Returns:
- Success or failure of the render
setBody
void
setBody
(<string> <Element> bodyContent)
Sets the Module's body content to the HTML specified, or appends the passed element to the body. If no body is present, one will be automatically created.
- Parameters:
-
bodyContent
- The HTML used to set the body OR -
bodyContent
- The Element to append to the body
setFooter
void
setFooter
(<string> <Element> footerContent)
Sets the Module's footer content to the HTML specified, or appends the passed element to the footer. If no footer is present, one will be automatically created.
- Parameters:
-
footerContent
- The HTML used to set the footer OR -
footerContent
- The Element to append to the footer
setHeader
void
setHeader
(<string> <Element> headerContent)
Sets the Module's header content to the HTML specified, or appends the passed element to the header. If no header is present, one will be automatically created.
- Parameters:
-
headerContent
- The HTML used to set the header OR -
headerContent
- The Element to append to the header
show
void
show
()
Shows the Module element by setting the visible configuration property to true. Also fires two YAHOO.widget.Module.prototype.events = beforeShowEvent;prior to the visibility change, and showEvent after.
HASH(0x1da21a0)
toString
string
toString
()
Returns a string representation of the object.
HASH(0x1da22c0)