Overlay is a Module that is absolutely positioned above the page flow. It has convenience methods for positioning and sizing, as well as options for controlling zIndex and constraining the Overlay's position to the current visible viewport. Overlay also contains a dynamicly generated IFRAME which is placed beneath it for Internet Explorer 6 and 5.x so that it will be properly rendered above SELECT elements.
|
BOTTOM_LEFT<static> : String |
Overlay |
<static> Constant representing the top bottom left corner of an element, used for configuring the context eleme... |
|
BOTTOM_RIGHT<static> : String |
Overlay |
<static> Constant representing the bottom right corner of an element, used for configuring the context element ... |
|
CSS_BODY<static> : String |
Module |
<static> Constant representing the module body |
|
CSS_FOOTER<static> : String |
Module |
<static> Constant representing the module footer |
|
CSS_HEADER<static> : String |
Module |
<static> Constant representing the module header |
|
CSS_MODULE<static> : String |
Module |
<static> Constant for the default CSS class name that represents a Module |
|
CSS_OVERLAY<static> : String |
Overlay |
<static> Constant representing the default CSS class used for an Overlay |
|
TOP_LEFT<static> : String |
Overlay |
<static> Constant representing the top left corner of an element, used for configuring the context element alig... |
|
TOP_RIGHT<static> : String |
Overlay |
<static> Constant representing the top right corner of an element, used for configuring the context element ali... |
|
body : HTMLElement |
Module |
The body element, denoted with CSS class "bd" |
|
browser : String |
Module |
String representing the current user-agent browser |
|
cfg : YAHOO.util.Config |
Module |
The Module's Config object used for monitoring configuration properties. |
|
contructor : Function |
Module |
The class's constructor function |
|
element : HTMLElement |
Module |
The main module element that contains the header, body, and footer |
|
footer : HTMLElement |
Module |
The footer element, denoted with CSS class "ft" |
|
header : HTMLElement |
Module |
The header element, denoted with CSS class "hd" |
|
http : String |
Module |
<static> Constant representing the prefix path to use for non-secure images |
|
https : String |
Module |
<static> Constant representing the prefix path to use for securely served images |
|
id : String |
Module |
The id of the element |
|
imageRoot : String |
Module |
The String representing the image root |
|
isSecure : Boolean |
Module |
Boolean representing whether or not the current browsing context is secure (https) |
|
javascript : String |
Overlay |
<static> The URL that will be placed in the iframe |
|
platform : String |
Module |
String representing the current user-agent platform |
|
Overlay() |
Overlay |
|
|
align(String elementAlign , String contextAlign ) : void |
Overlay |
Aligns the Overlay to its context element using the specified corner points (represented by the constants TOP_LEFT, T... |
|
appendToBody(HTMLElement element ) : void |
Module |
Appends the passed element to the body. If no body is present, one will be automatically created. |
|
appendToFooter(HTMLElement element ) : void |
Module |
Appends the passed element to the footer. If no footer is present, one will be automatically created. |
|
appendToHeader(HTMLElement element ) : void |
Module |
Appends the passed element to the header. If no header is present, one will be automatically created. |
|
center() : void |
Overlay |
Centers the container in the viewport. |
|
configConstrainToViewport(String type , Object[] args , Object obj ) : void |
Overlay |
The default event handler fired when the "constraintoviewport" property is changed. |
|
configContext(String type , Object[] args , Object obj ) : void |
Overlay |
The default event handler fired when the "context" property is changed. |
|
configFixedCenter(String type , Object[] args , Object obj ) : void |
Overlay |
The default event handler fired when the "fixedcenter" property is changed. |
|
configHeight(String type , Object[] args , Object obj ) : void |
Overlay |
The default event handler fired when the "height" property is changed. |
|
configIframe(String type , Object[] args , Object obj ) : void |
Overlay |
The default event handler fired when the "iframe" property is changed. |
|
configMonitorResize(String type , Object[] args , Object obj ) : void |
Module |
Default event handler for the "monitorresize" configuration property |
|
configVisible(String type , Object[] args , Object obj ) : void |
Overlay |
The default event handler fired when the "visible" property is changed. This method is responsible for firing showEve... |
|
configWidth(String type , Object[] args , Object obj ) : void |
Overlay |
The default event handler fired when the "width" property is changed. |
|
configX(String type , Object[] args , Object obj ) : void |
Overlay |
The default event handler fired when the "x" property is changed. |
|
configXY(String type , Object[] args , Object obj ) : void |
Overlay |
The default event handler fired when the "xy" property is changed. |
|
configY(String type , Object[] args , Object obj ) : void |
Overlay |
The default event handler fired when the "y" property is changed. |
|
configzIndex(String type , Object[] args , Object obj ) : void |
Overlay |
The default event handler fired when the "zIndex" property is changed. |
|
destroy() : void |
Overlay |
Removes the Overlay element from the DOM and sets all child elements to null. |
|
doCenterOnDOMEvent() : void |
Overlay |
Center event handler used for centering on scroll/resize, but only if the Overlay is visible |
|
enforceConstraints(String type , Object[] args , Object obj ) : void |
Overlay |
The default event handler executed when the moveEvent is fired, if the "constraintoviewport" is set to true. |
|
hide() : void |
Module |
Hides the Module element by setting the visible configuration property to false. Also fires two events: beforeHideEve... |
|
hideIframe() : void |
Overlay |
Hides the iframe shim, if it has been enabled |
|
hideMacGeckoScrollbars() : void |
Overlay |
Adds a special CSS class to the Overlay when Mac/Gecko is in use, to work around a Gecko bug where
scrollbars cannot ... |
|
init(String el , HTMLElement el , Object userConfig ) : void |
Overlay |
The Overlay initialization method, which is executed for Overlay and all of its subclasses. This method is automatica... |
|
initDefaultConfig() : void |
Overlay |
Initializes the class's configurable properties which can be changed using the Overlay's Config object (cfg). |
|
initEvents() : void |
Overlay |
Initializes the custom events for Overlay which are fired automatically at appropriate times by the Overlay class. |
|
initResizeMonitor() : void |
Module |
Initialized an empty IFRAME that is placed out of the visible area that can be used to detect text resize. |
|
moveTo(Number x , Number y ) : void |
Overlay |
Moves the Overlay to the specified position. This function is identical to calling this.cfg.setProperty("xy", [x,y]); |
|
onDomResize(DOMEvent e , Object obj ) : void |
Overlay |
Event handler fired when the resize monitor element is resized. |
|
render(String appendToNode , HTMLElement appendToNode , HTMLElement moduleElement ) : Boolean |
Module |
Renders the Module by inserting the elements that are not already in the main Module into their correct places. Optio... |
|
setBody(String bodyContent , HTMLElement bodyContent ) : void |
Module |
Sets the Module's body content to the HTML specified, or appends the passed element to the body. If no body is presen... |
|
setFooter(String footerContent , HTMLElement footerContent ) : void |
Module |
Sets the Module's footer content to the HTML specified, or appends the passed element to the footer. If no footer is ... |
|
setHeader(String headerContent , HTMLElement headerContent ) : void |
Module |
Sets the Module's header content to the HTML specified, or appends the passed element to the header. If no header is ... |
|
show() : void |
Module |
Shows the Module element by setting the visible configuration property to true. Also fires two events: beforeShowEven... |
|
showIframe() : void |
Overlay |
Shows the iframe shim, if it has been enabled |
|
showMacGeckoScrollbars() : void |
Overlay |
Removes a special CSS class from the Overlay when Mac/Gecko is in use, to work around a Gecko bug where
scrollbars ca... |
|
syncPosition() : void |
Overlay |
Synchronizes the Panel's "xy", "x", and "y" properties with the Panel's position in the DOM. This is primarily used t... |
|
toString() : String |
Overlay |
Returns a String representation of the object. |
|
windowResizeHandler<static>(DOMEvent e ) : void |
Overlay |
<static> The DOM event handler used to fire the CustomEvent for window resize |
|
windowScrollHandler<static>(DOMEvent e ) : void |
Overlay |
<static> The DOM event handler used to fire the CustomEvent for window scroll |
BOTTOM_LEFT<static>
public String BOTTOM_LEFT<static>
<static> Constant representing the top bottom left corner of an element, used for configuring the context element alignment
This property is defined by Overlay.
BOTTOM_RIGHT<static>
public String BOTTOM_RIGHT<static>
<static> Constant representing the bottom right corner of an element, used for configuring the context element alignment
This property is defined by Overlay.
CSS_BODY<static>
public String CSS_BODY<static>
<static> Constant representing the module body
This property is defined by
Module.
CSS_FOOTER<static>
public String CSS_FOOTER<static>
<static> Constant representing the module footer
This property is defined by
Module.
CSS_HEADER<static>
public String CSS_HEADER<static>
<static> Constant representing the module header
This property is defined by
Module.
CSS_MODULE<static>
public String CSS_MODULE<static>
<static> Constant for the default CSS class name that represents a Module
This property is defined by
Module.
CSS_OVERLAY<static>
public String CSS_OVERLAY<static>
<static> Constant representing the default CSS class used for an Overlay
This property is defined by Overlay.
TOP_LEFT<static>
public String TOP_LEFT<static>
<static> Constant representing the top left corner of an element, used for configuring the context element alignment
This property is defined by Overlay.
TOP_RIGHT<static>
public String TOP_RIGHT<static>
<static> Constant representing the top right corner of an element, used for configuring the context element alignment
This property is defined by Overlay.
body
public HTMLElement body
The body element, denoted with CSS class "bd"
This property is defined by
Module.
browser
public String browser
String representing the current user-agent browser
This property is defined by
Module.
cfg
public YAHOO.util.Config cfg
The Module's Config object used for monitoring configuration properties.
This property is defined by
Module.
contructor
public Function contructor
The class's constructor function
This property is defined by
Module.
element
public HTMLElement element
The main module element that contains the header, body, and footer
This property is defined by
Module.
footer
public HTMLElement footer
The footer element, denoted with CSS class "ft"
This property is defined by
Module.
header
public HTMLElement header
The header element, denoted with CSS class "hd"
This property is defined by
Module.
http
public String http
<static> Constant representing the prefix path to use for non-secure images
This property is defined by
Module.
https
public String https
<static> Constant representing the prefix path to use for securely served images
This property is defined by
Module.
id
public String id
The id of the element
This property is defined by
Module.
imageRoot
public String imageRoot
The String representing the image root
This property is defined by
Module.
isSecure
public Boolean isSecure
Boolean representing whether or not the current browsing context is secure (https)
This property is defined by
Module.
javascript
public String javascript
<static> The URL that will be placed in the iframe
This property is defined by Overlay.
platform
public String platform
String representing the current user-agent platform
This property is defined by
Module.
align
public function align(String elementAlign
, String contextAlign
)
Aligns the Overlay to its context element using the specified corner points (represented by the constants TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, and BOTTOM_RIGHT.
This method is defined by Overlay.
appendToBody
public function appendToBody(HTMLElement element
)
Appends the passed element to the body. If no body is present, one will be automatically created.
This method is defined by
Module.
appendToFooter
public function appendToFooter(HTMLElement element
)
Appends the passed element to the footer. If no footer is present, one will be automatically created.
This method is defined by
Module.
appendToHeader
public function appendToHeader(HTMLElement element
)
Appends the passed element to the header. If no header is present, one will be automatically created.
This method is defined by
Module.
center
public function center()
Centers the container in the viewport.
This method is defined by Overlay.
configConstrainToViewport
public function configConstrainToViewport(String type
, Object[] args
, Object obj
)
The default event handler fired when the "constraintoviewport" property is changed.
Parameters:
type
: StringThe CustomEvent type (usually the property name)
args
: Object[]The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
obj
: ObjectThe scope object. For configuration handlers, this will usually equal the owner.
Returns:
This method is defined by Overlay.
configContext
public function configContext(String type
, Object[] args
, Object obj
)
The default event handler fired when the "context" property is changed.
Parameters:
type
: StringThe CustomEvent type (usually the property name)
args
: Object[]The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
obj
: ObjectThe scope object. For configuration handlers, this will usually equal the owner.
Returns:
This method is defined by Overlay.
configFixedCenter
public function configFixedCenter(String type
, Object[] args
, Object obj
)
The default event handler fired when the "fixedcenter" property is changed.
Parameters:
type
: StringThe CustomEvent type (usually the property name)
args
: Object[]The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
obj
: ObjectThe scope object. For configuration handlers, this will usually equal the owner.
Returns:
This method is defined by Overlay.
configHeight
public function configHeight(String type
, Object[] args
, Object obj
)
The default event handler fired when the "height" property is changed.
Parameters:
type
: StringThe CustomEvent type (usually the property name)
args
: Object[]The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
obj
: ObjectThe scope object. For configuration handlers, this will usually equal the owner.
Returns:
This method is defined by Overlay.
configIframe
public function configIframe(String type
, Object[] args
, Object obj
)
The default event handler fired when the "iframe" property is changed.
Parameters:
type
: StringThe CustomEvent type (usually the property name)
args
: Object[]The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
obj
: ObjectThe scope object. For configuration handlers, this will usually equal the owner.
Returns:
This method is defined by Overlay.
configMonitorResize
public function configMonitorResize(String type
, Object[] args
, Object obj
)
Default event handler for the "monitorresize" configuration property
Parameters:
type
: StringThe CustomEvent type (usually the property name)
args
: Object[]The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
obj
: ObjectThe scope object. For configuration handlers, this will usually equal the owner.
Returns:
This method is defined by
Module.
configVisible
public function configVisible(String type
, Object[] args
, Object obj
)
The default event handler fired when the "visible" property is changed. This method is responsible for firing showEvent and hideEvent.
Parameters:
type
: StringThe CustomEvent type (usually the property name)
args
: Object[]The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
obj
: ObjectThe scope object. For configuration handlers, this will usually equal the owner.
Returns:
This method is defined by Overlay.
configWidth
public function configWidth(String type
, Object[] args
, Object obj
)
The default event handler fired when the "width" property is changed.
Parameters:
type
: StringThe CustomEvent type (usually the property name)
args
: Object[]The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
obj
: ObjectThe scope object. For configuration handlers, this will usually equal the owner.
Returns:
This method is defined by Overlay.
configX
public function configX(String type
, Object[] args
, Object obj
)
The default event handler fired when the "x" property is changed.
Parameters:
type
: StringThe CustomEvent type (usually the property name)
args
: Object[]The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
obj
: ObjectThe scope object. For configuration handlers, this will usually equal the owner.
Returns:
This method is defined by Overlay.
configXY
public function configXY(String type
, Object[] args
, Object obj
)
The default event handler fired when the "xy" property is changed.
Parameters:
type
: StringThe CustomEvent type (usually the property name)
args
: Object[]The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
obj
: ObjectThe scope object. For configuration handlers, this will usually equal the owner.
Returns:
This method is defined by Overlay.
configY
public function configY(String type
, Object[] args
, Object obj
)
The default event handler fired when the "y" property is changed.
Parameters:
type
: StringThe CustomEvent type (usually the property name)
args
: Object[]The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
obj
: ObjectThe scope object. For configuration handlers, this will usually equal the owner.
Returns:
This method is defined by Overlay.
configzIndex
public function configzIndex(String type
, Object[] args
, Object obj
)
The default event handler fired when the "zIndex" property is changed.
Parameters:
type
: StringThe CustomEvent type (usually the property name)
args
: Object[]The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
obj
: ObjectThe scope object. For configuration handlers, this will usually equal the owner.
Returns:
This method is defined by Overlay.
destroy
public function destroy()
Removes the Overlay element from the DOM and sets all child elements to null.
This method is defined by Overlay.
doCenterOnDOMEvent
public function doCenterOnDOMEvent()
Center event handler used for centering on scroll/resize, but only if the Overlay is visible
This method is defined by Overlay.
enforceConstraints
public function enforceConstraints(String type
, Object[] args
, Object obj
)
The default event handler executed when the moveEvent is fired, if the "constraintoviewport" is set to true.
Parameters:
type
: StringThe CustomEvent type (usually the property name)
args
: Object[]The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
obj
: ObjectThe scope object. For configuration handlers, this will usually equal the owner.
Returns:
This method is defined by Overlay.
hide
public function hide()
Hides the Module element by setting the visible configuration property to false. Also fires two events: beforeHideEvent prior to the visibility change, and hideEvent after.
This method is defined by
Module.
hideIframe
public function hideIframe()
Hides the iframe shim, if it has been enabled
This method is defined by Overlay.
hideMacGeckoScrollbars
public function hideMacGeckoScrollbars()
Adds a special CSS class to the Overlay when Mac/Gecko is in use, to work around a Gecko bug where
scrollbars cannot be hidden. See https://bugzilla.mozilla.org/show_bug.cgi?id=187435
This method is defined by Overlay.
init
public function init(String el
, HTMLElement el
, Object userConfig
)
The Overlay initialization method, which is executed for Overlay 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
: StringThe element ID representing the Overlay OR
el
: HTMLElementThe element representing the Overlay
userConfig
: ObjectThe configuration object literal containing the configuration that should be set for this Overlay. See configuration documentation for more details.
Returns:
This method is defined by Overlay.
initDefaultConfig
public function initDefaultConfig()
Initializes the class's configurable properties which can be changed using the Overlay's Config object (cfg).
This method is defined by Overlay.
initEvents
public function initEvents()
Initializes the custom events for Overlay which are fired automatically at appropriate times by the Overlay class.
This method is defined by Overlay.
initResizeMonitor
public function initResizeMonitor()
Initialized an empty IFRAME that is placed out of the visible area that can be used to detect text resize.
This method is defined by
Module.
moveTo
public function moveTo(Number x
, Number y
)
Moves the Overlay to the specified position. This function is identical to calling this.cfg.setProperty("xy", [x,y]);
This method is defined by Overlay.
onDomResize
public function onDomResize(DOMEvent e
, Object obj
)
Event handler fired when the resize monitor element is resized.
Parameters:
e
: DOMEventThe resize DOM event
obj
: ObjectThe scope object
Returns:
This method is defined by Overlay.
render
public function render(String appendToNode
, HTMLElement appendToNode
, HTMLElement 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. 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
: StringThe element id to which the Module should be appended to prior to rendering OR
appendToNode
: HTMLElementThe element to which the Module should be appended to prior to rendering
moduleElement
: HTMLElementOPTIONAL. The element that represents the actual Standard Module container.
Returns:
This method is defined by
Module.
setBody
public function setBody(String bodyContent
, HTMLElement 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.
This method is defined by
Module.
setFooter
public function setFooter(String footerContent
, HTMLElement 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.
This method is defined by
Module.
setHeader
public function setHeader(String headerContent
, HTMLElement 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.
This method is defined by
Module.
show
public function show()
Shows the Module element by setting the visible configuration property to true. Also fires two events: beforeShowEvent prior to the visibility change, and showEvent after.
This method is defined by
Module.
showIframe
public function showIframe()
Shows the iframe shim, if it has been enabled
This method is defined by Overlay.
showMacGeckoScrollbars
public function showMacGeckoScrollbars()
Removes a special CSS class from the Overlay when Mac/Gecko is in use, to work around a Gecko bug where
scrollbars cannot be hidden. See https://bugzilla.mozilla.org/show_bug.cgi?id=187435
This method is defined by Overlay.
syncPosition
public function syncPosition()
Synchronizes the Panel's "xy", "x", and "y" properties with the Panel's position in the DOM. This is primarily used to update position information during drag & drop.
This method is defined by Overlay.
toString
public function toString()
Returns a String representation of the object.
This method is defined by Overlay.
windowResizeHandler<static>
public function windowResizeHandler<static>(DOMEvent e
)
<static> The DOM event handler used to fire the CustomEvent for window resize
Parameters:
e
: DOMEventThe DOM resize event
Returns:
This method is defined by Overlay.
windowScrollHandler<static>
public function windowScrollHandler<static>(DOMEvent e
)
<static> The DOM event handler used to fire the CustomEvent for window scroll
Parameters:
e
: DOMEventThe DOM scroll event
Returns:
This method is defined by Overlay.