|
CAF Shared JavaScript | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--CAF.Popup
Defined in popup.js
Nested Class Summary | |
<static class> |
CAF.Popup.Model |
Field Summary | |
<static> Object |
mouseoutDelay
Time in ms to delay closing the currently open popup when the mouse exits the popup or hotspot (and is not over another popup or hotspot). |
<static> Object |
mouseoverHotspotDelay
Time in ms to delay showing popup when mouse hovers over hotspot (and no other popup is current open). |
<static> Object |
mouseoverOtherHotspotDelay
Time in ms to delay closing the currently open popup when the mouse hovers over an unrelated popup's hotspot. |
<static> Object |
mouseoverPopupDelay
Time in ms to delay closing the currently open popup when the mouse hovers over an unrelated popup. |
Constructor Summary | |
CAF.Popup
()
|
Method Summary | |
<static> void
|
addClick(hotspot, popup, rightclick)
Adds hotspot to trigger popup on click. |
<static> void
|
addHover(hotspot, popup)
Adds hotspot to trigger popup on hover. |
<static> Object
|
addItem(id, item, before)
Adds a new item to the specified menu. |
<static> void
|
addRightClick(hotspot, popup)
Adds hotspot to trigger popup on rightclick. |
<static> void
|
attachContextMenu( element, popup )
|
<static> void
|
attachPopup(element, popup, hover, click, rightclick)
Attaches the specified popup to the specified element. |
<static> Object
|
create(id, items, css)
Creates a new menu with the specified id and items. |
<static> void
|
detachPopup(element)
Removes a tooltip created by CAF.Popup#attachHover for the specified element. |
<static> Object
|
get(id)
Returns the specified menu or null. |
<static> Object
|
getItem(id, itemClass)
Returns the specified item for the specified menu. |
<static> void
|
hideAll()
Hides all open menus and tooltips. |
<static> Object
|
listItems(id)
Returns the list of items for the specified menu. |
<static> void
|
removeClick(hotspot, rightclick)
Remove hotspot from triggering popup on click. |
<static> void
|
removeHover(hotspot)
Adds hotspot from triggering popup on hover. |
<static> Object
|
removeItem(id, itemClass)
Removes the specified menu item. |
<static> void
|
removeRightClick(hotspot)
Remove hotspot from triggering popup on rightclick. |
<static> void
|
setDisabled(id, itemClass, disable)
Enables/disables the specified menu item. |
<static> Object
|
setItem(id, item)
Replaces the specified menu item. |
<static> void
|
setLabel(id, itemClass, label, rawhtml)
Updates the label of the specified menu item. |
<static> void
|
setSelected(id, itemClass, select)
Selects/deselects the specified menu item (a selected item might be displayed as 'checked'). |
<static> void
|
setValue(id, itemClass, value)
Updates the value (link href) of the specified menu item. |
Field Detail |
<static> Object mouseoutDelay
<static> Object mouseoverHotspotDelay
<static> Object mouseoverOtherHotspotDelay
<static> Object mouseoverPopupDelay
Constructor Detail |
CAF.Popup()
Method Detail |
<static> void addClick(hotspot, popup, rightclick)
hotspot
- Hotspot element or id.
popup
- Popup element or id.
<static> void addHover(hotspot, popup)
hotspot
- Hotspot element or id.
popup
- Popup element or id.
<static> Object addItem(id, item, before)
id
- Element id of menu.
item
- Object with menu item properties. Properties may include: before
- (optional) Element or class-name of item before which to insert the new item.
<static> void addRightClick(hotspot, popup)
hotspot
- Hotspot element or id.
popup
- Popup element or id.
<static> void attachContextMenu( element, popup )
<static> void attachPopup(element, popup, hover, click, rightclick)
element
- Element or id of element for which to show the popup.
popup
- Element or id of popup.
hover
- (optional) True to popup when mouse hovers over element (defaults to false).
click
- (optional) True to popup when mouse clicks element (defaults to true).
rightclick
- (optional) True to popup when mouse right-clicks element (defaults to false).
<static> Object create(id, items, css)
id
- Element id of menu to create.
items
- (optional) List of items to add to new menu.
css
- (optional) CSS classe name for new menu.
<static> void detachPopup(element)
element
- Element or id of element for which to detach tooltip.name
<static> Object get(id)
id
- Element id of menu.
<static> Object getItem(id, itemClass)
id
- Element id of menu.
Class
- name of menu item.
<static> void hideAll()
<static> Object listItems(id)
id
- Element id of menu.
<static> void removeClick(hotspot, rightclick)
hotspot
- Hotspot element or id.
<static> void removeHover(hotspot)
hotspot
- Hotspot element or id.
<static> Object removeItem(id, itemClass)
id
- Element id of menu.
itemClass
- Class name of menu item.
<static> void removeRightClick(hotspot)
hotspot
- Hotspot element or id.
<static> void setDisabled(id, itemClass, disable)
id
- Element id of menu.
itemClass
- Class name of menu item.
disable
- True to disable, false to enable.
<static> Object setItem(id, item)
id
- Element id of menu.
Object
- with menu item properties (see addItem() for details).
<static> void setLabel(id, itemClass, label, rawhtml)
id
- Element id of menu.
itemClass
- Class name of menu item.
label
- New label.
rawhtml
- (optional) True if label is raw html (and should not be escaped), false otherwise (the default).
<static> void setSelected(id, itemClass, select)
id
- Element id of menu.
itemClass
- Class name of menu item.
select
- True to select, false to deselect.
<static> void setValue(id, itemClass, value)
id
- Element id of menu.
itemClass
- Class name of menu item.
value
- New value.
|
CAF Shared JavaScript | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |