Class Rico.Popup
Class to manage pop-up div windows.
Defined in: <ricoCommon.js>.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Rico.Popup(options, DivRef, closeFunc)
|
| Method Attributes | Method Name and Description |
|---|---|
|
Hide popup
|
|
|
createPopup(parentElem, content, ht, wi, className, closeFunc)
create popup div and insert content
|
|
|
createWindow(title, content, ht, wi, className)
Create popup div with a title bar.
|
|
|
move(left, top)
Move popup to specified position
|
|
|
openPopup(left, top)
Display popup at specified position
|
|
|
setDiv(DivRef, closeFunc)
Apply popup behavior to a div that already exists in the DOM
|
Class Detail
Rico.Popup(options, DivRef, closeFunc)
- Parameters:
- options
- object may contain any of the following:
- hideOnEscape
- hide popup when escape key is pressed? default=true
- hideOnClick
- hide popup when mouse button is clicked? default=true
- ignoreClicks
- if true, mouse clicks within the popup are not allowed to bubble up to parent elements
- position
- defaults to absolute
- shadow
- display shadow with popup? default=true
- margin
- number of pixels to allow for shadow, default=6
- zIndex
- which layer? default=1
- overflow
- how to handle content that overflows div? default=auto
- canDragFunc
- boolean value (or function that returns a boolean) indicating if it is ok to drag/reposition popup, default=false
- DivRef
- if supplied, then setDiv() is called at the end of initialization
- closeFunc
Method Detail
closePopup()
Hide popup
createPopup(parentElem, content, ht, wi, className, closeFunc)
create popup div and insert content
- Parameters:
- parentElem
- content
- ht
- wi
- className
- closeFunc
createWindow(title, content, ht, wi, className)
Create popup div with a title bar.
height (ht) and width (wi) parameters are required and apply to the content (title adds extra height)
- Parameters:
- title
- content
- ht
- wi
- className
move(left, top)
Move popup to specified position
- Parameters:
- left
- top
openPopup(left, top)
Display popup at specified position
- Parameters:
- left
- top
setDiv(DivRef, closeFunc)
Apply popup behavior to a div that already exists in the DOM
- Parameters:
- DivRef
- div element in the DOM
- closeFunc
- optional callback function when popup is closed