Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#951 closed enhancement (fixed)

MenuBarItem2 clickable if no submenu

Reported by: office@… Owned by: anonymous
Priority: high Milestone:
Component: Widgets Version: 0.2
Keywords: MenuBarItem2 onClcik Cc:
Blocked By: Blocking:

Description

i have extended the menubaritem2. it wasn't clickable when no submenu was attached. i think everbody wants to have a "home" button or something in the menu with no submenu.. here is my code. very simple. i would like it if you extend the class with this code!

// extend MenubarItem2 to use onclick event if no submenuid is set
dojo.lang.extend(dojo.widget.MenuBarItem2, {
	// Internal function for clicks
	_onClick: function(){
		
		this.parent.itemClick(this);
		
		if (!this.submenuId){
			this.onClick();
		}
	},

	// User defined function to handle clicks
	onClick: function() { }
});

Change History (3)

comment:1 Changed 13 years ago by alex

Milestone: 0.3.10.4

0.3.1 is closed. Moving off to 0.4

comment:2 Changed 13 years ago by bill

Resolution: fixed
Status: newclosed

Fixed after the rewrite of Menu2 to use tables.

comment:3 Changed 12 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.