Opened 12 years ago

Closed 12 years ago

#4566 closed enhancement (fixed)

Add dojoAttachPoint="iconNode" to dijit.MenuItem.templateString

Reported by: guest Owned by:
Priority: high Milestone:
Component: Dijit Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

If line 408 of the 0.9.0 version of dijit/Menu.js was changed to

+'<td class="dijitReset"><div dojoAttachPoint="iconNode" class="dijitMenuItemIcon ${iconClass}"></div></td>'

it would be possible to set the iconClass of a menu item programmatically. E.g. a menu item that activates or deactivates an object could be displayes as "Active" with a checkmark next to it if the object is active, or nothing next to it if not.

Since dijit.Tree already works this way, I believe it would be nice and consistent too.

Change History (3)

comment:1 Changed 12 years ago by bill

Resolution: fixed
Status: newclosed

(In [10632]) Add dojoAttachPoint for iconNode so that icon can be changed programmatically (with a little effort). Fixes #4566.

comment:2 Changed 12 years ago by guest

Resolution: fixed
Status: closedreopened

you made a mistake with this fix:

class="dijitMenuItemIcon dojoAttachPoint="iconNode" ${iconClass}"

you need :

class="dijitMenuItemIcon ${iconClass}" dojoAttachPoint="iconNode"

comment:3 Changed 12 years ago by bill

Resolution: fixed
Status: reopenedclosed

(In [10637]) Fix typo in previous checkin. Fixes #4566.

Note: See TracTickets for help on using tickets.