|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--DHTMLSuite.menuBar
Purpose of class: Creates a top bar menu strip. Demos:
Field Summary | |
Object |
activeSubItemsOnMouseOver
|
Object |
createIframesForOldIeBrowsers
|
Object |
cssPrefix
|
Object |
layoutCSS
|
Object |
menuBarBackgroundImage
|
Object |
menuBarHeight
|
Object |
menuBarObj
|
Object |
menuBarState
|
Object |
menuItem_objects
|
Object |
menuItemCssPrefix
|
Object |
menuItemLayoutCss
|
Object |
objectIndex
|
Object |
submenuGroups
|
Object |
submenuIframes
|
Object |
targetId
|
Constructor Summary | |
DHTMLSuite.menuBar
()
|
Method Summary | |
void
|
addMenuItems(menuItemObj)
Add menu items |
void
|
appendMenuItems(idOfParentMenuItem,newMenuModel)
This method appends menu items to the menu dynamically |
void
|
deleteMenuItems(idOfParentMenuItem,deleteParentElement)
This method deletes menu items from the menu dynamically |
void
|
hideMenuItem(menuItemId)
This method doesn't delete menu items. |
void
|
hideSubMenus(e)
Deactivate all sub menus ( collapse and set state back to regular ) In case you have a menu inside a scrollable container, call this method in an onscroll event for that element example document.getElementById('textContent').onscroll = menuBar.__hideSubMenus; |
void
|
init()
Initilizes the script - This method should be called after your set methods. |
void
|
setActiveSubItemsOnMouseOver(activateSubOnMouseOver)
Specify if sub menus should be activated on mouse over(i.e. |
void
|
setCreateIframesForOldIeBrowsers(createIframesForOldIeBrowsers)
This method specifies if you want to the script to create iframes behind sub menu groups in order to cover eventual select boxes. |
void
|
setCssPrefix(newCssPrefix)
Specify prefix of css classes used for the menu bar. |
void
|
setIcon(menuItemId,newPath)
Replace menu icon for a menu item. |
void
|
setLayoutCss(nameOfNewCssFile)
Specify the css file for this menu bar |
void
|
setMenuItemCssPrefix(newCssPrefix)
Specify prefix of css classes used for the menu items. |
void
|
setMenuItemLayoutCss(nameOfNewCssFile)
Specify the css file for the menu items |
void
|
setMenuItemState(menuItemId,state)
This method changes the state of the menu bar(expanded or collapsed). |
void
|
setTarget(idOfHTMLElement)
Specify where this menu bar will be inserted. |
void
|
setText(menuItemId,newText)
Replace the text for a menu item |
void
|
showMenuItem(menuItemId)
This method shows a menu item. |
Field Detail |
Object activeSubItemsOnMouseOver
Object createIframesForOldIeBrowsers
Object cssPrefix
Object layoutCSS
Object menuBarBackgroundImage
Object menuBarHeight
Object menuBarObj
Object menuBarState
Object menuItem_objects
Object menuItemCssPrefix
Object menuItemLayoutCss
Object objectIndex
Object submenuGroups
Object submenuIframes
Object targetId
Constructor Detail |
DHTMLSuite.menuBar()
Method Detail |
void addMenuItems(menuItemObj)
DHTMLSuite
- .menuModel menuModel Object of class DHTMLSuite.menuModel which holds menu data
void appendMenuItems(idOfParentMenuItem,newMenuModel)
Integer
- idOfParentMenuItem - Parent id - where to append the new items.
menuModel
- newMenuModel - Object of type menuModel. This menuModel will be appended as sub elements of defined idOfParentMenuItem
void deleteMenuItems(idOfParentMenuItem,deleteParentElement)
Number
- idOfParentMenuItem - Parent id - parent id of the elements to delete.
Boolean
- deleteParentElement - Should parent element also be deleted, or only sub elements?
void hideMenuItem(menuItemId)
Number
- menuItemId - Id of the item you want to hide.
void hideSubMenus(e)
Event
- e - this variable is present if this method is called from an event. You will never use this parameter
void init()
void setActiveSubItemsOnMouseOver(activateSubOnMouseOver)
Boolean
- activateSubOnMouseOver - Specify if sub menus should be activated on mouse over(i.e. no matter what the menuState property is).
void setCreateIframesForOldIeBrowsers(createIframesForOldIeBrowsers)
Boolean
- createIframesForOldIeBrowsers = true if you want the script to create iframes to cover select boxes in older ie browsers.
void setCssPrefix(newCssPrefix)
String
- newCssPrefix - New css prefix for the menu bar classes.
void setIcon(menuItemId,newPath)
Integer
- menuItemId - Id of menu item.
String
- newPath - Path to new menu icon. Pass blank or false if you want to clear the menu item.
void setLayoutCss(nameOfNewCssFile)
String
- nameOfNewCssFile = Name of new css file.
void setMenuItemCssPrefix(newCssPrefix)
String
- newCssPrefix - New css prefix for menu items.
void setMenuItemLayoutCss(nameOfNewCssFile)
String
- nameOfNewCssFile = Name of new css file.
void setMenuItemState(menuItemId,state)
Number
- menuItemId - ID of the menu item we want to switch state for
String
- state - New state(DHTMLSuite.menuBar.prototype.example = "disabled";)
void setTarget(idOfHTMLElement)
String
- idOfHTMLElement = Id of element where the menu will be inserted.
void setText(menuItemId,newText)
Integer
- menuItemId - Id of menu item.
String
- newText - New text for the menu item.
void showMenuItem(menuItemId)
Number
- menuItemId - Id of the item you want to show
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |