Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#14812 closed feature (fixed)

Menu: support menu on multiple nodes through delegation

Reported by: bill Owned by: bill
Priority: undecided Milestone: 1.8
Component: Dijit Version: 1.7.2rc1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Add new attributes to Menu allowing a single Menu instance to be applied to a set of nodes. This would make dijit.Menu practical for displaying Menus for cells of a a Grid or rows of a Tree because it would eliminate the overhead of setting up event handlers per-node.

Probably an API like this:

new Menu({ 
   targetNodeId: myTable,
   selector: "td"

Will of course leverage dojo/on's delegation feature.

See #14654 for related Tooltip ticket.

Change History (7)

comment:1 Changed 10 years ago by bill

Description: modified (diff)
Milestone: tbd1.8
Owner: set to bill
Status: newassigned

comment:2 Changed 10 years ago by bill

Resolution: fixed
Status: assignedclosed

In [27895]:

Add "selector" and "currentTarget" attributes to Menu, to allow setting up menus through event delegation. Convert TabContainer to use new selector attribute for tab close menu. Fixes #14812 !strict.

comment:3 Changed 10 years ago by bill

In [27942]:

forget to remove some cod in [27895], refs #14812 !strict.

comment:4 Changed 10 years ago by bill

In [28007]:

update context menu example, refs ##14812, fixes #14890.

comment:5 Changed 10 years ago by bill

In [28026]:

remove context menu example, refs #14812.

comment:6 Changed 10 years ago by bill

In [28293]:

Add comments that dojo/query needed for on.selector(), Menu.selector, and Toolitp.selector. Refs #14812, #14654 !strict.

comment:5 Changed 9 years ago by bill

In [31166]:

remove TODO that's no longer relevant, as I plan to get rid of targetNodeIds[] altogether, refs #14812 !strict

Note: See TracTickets for help on using tickets.