|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--DHTMLSuite.menuModel
Purpose of class: Organize menu items for different menu widgets. demos of menus: (Demo)
Defined in dhtml-suite-for-applications.js
Author: Alf Magne Kalleland(www.dhtmlgoodies.com)
Version: 1.0
Field Summary | |
Object |
menuItems
|
Object |
menuItemsOrder
|
Object |
submenuType
|
Constructor Summary | |
DHTMLSuite.menuModel
()
|
Method Summary | |
Object
|
addItem(id,itemText,itemIcon,url,parentId,helpText,jsFunction,type,submenuWidth)
Add separator (special type of menu item) |
void
|
addItemsFromMarkup(ulId)
This method creates all the menuModelItem objects by reading it from existing markup on your page. |
Object
|
addSeparator(parentId)
Add separator (special type of menu item) |
Object
|
getItems(parentId,returnArray)
return an array of all menu items or a branch of menu items. |
void
|
init()
Initilizes the menu model. |
void
|
setMainMenuGroupWidth(newWidth)
Add separator (special type of menu item) |
void
|
setMenuItemVisibility(id,visible)
Save visibility of a menu item. |
void
|
setSubMenuType(depth,newType)
Set menu type for a specific menu depth. |
void
|
setSubMenuWidth(id,newWidth)
This method specifies the width of a sub menu group. |
Field Detail |
Object menuItems
Object menuItemsOrder
Object submenuType
Constructor Detail |
DHTMLSuite.menuModel()
Method Detail |
Object addItem(id,itemText,itemIcon,url,parentId,helpText,jsFunction,type,submenuWidth)
int
- id of menu item
string
- itemText = text of menu item
string
- itemIcon = file name of menu icon(in front of menu text. Path will be imagePath for the DHTMLSuite + file name)
string
- url = Url of menu item
int
- parent id of menu item
String
- jsFunction Name of javascript function to execute. It will replace the url param. The function with this name will be called and the element triggering the action will be sent as argument. Name of the element which triggered the menu action may also be sent as a second argument. That depends on the widget. The context menu is an example where the element triggering the context menu is sent as second argument to this function.
void addItemsFromMarkup(ulId)
String
- ulId = ID of Object addSeparator(parentId)
int
- parent id of menu item
Object getItems(parentId,returnArray)
String
- parentId - id of parent node
void init()
void setMainMenuGroupWidth(newWidth)
String
- newWidth = Size of a menu group
int
- parent id of menu item
void setMenuItemVisibility(id,visible)
int
- id = Id of menu item..
Boolean
- visible = Visibility of menu item.
void setSubMenuType(depth,newType)
int
- depth = 1 = Top menu, 2 = Sub level 1...
String
- newType = New menu type(possible DHTMLSuite.menuModel.prototype.values = "top";or "sub")
void setSubMenuWidth(id,newWidth)
int
- id = ID of parent menu item
String
- newWidth = Width of sub menu items.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |