#2009 closed defect (fixed)
Menu2/MenuItem2 disabled context menu items get class 'undefined'
Reported by: | guest | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Widgets | Version: | 0.4 |
Keywords: | Cc: | [email protected]… | |
Blocked By: | Blocking: |
Description (last modified by )
Disabled context menu's (from a tree context menu in my case - but it does not really matter) won't be grayed out because these items get the class 'undefined':
Menu2.js should read in function setDisabled (currently line 526 and line 528):
... dojo.html.addClass(this.domNode, this.parent.disabledClass); ... dojo.html.removeClass(this.domNode, this.parent.disabledClass); ...
instead of
... dojo.html.addClass(this.domNode, this.disabledClass); ... dojo.html.removeClass(this.domNode, this.disabledClass); ...
because the class "disabledClass" is defined in PopupMenu2 and not in MenuItem2.
Thx!
Change History (5)
comment:1 Changed 14 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 14 years ago by
Milestone: | → 0.6 |
---|---|
severity: | major → normal |
comment:3 Changed 14 years ago by
Milestone: | 0.6 → 0.4.1 |
---|---|
Status: | new → assigned |
Actually, the problem is pretty severe (initially disabled items are showing up as enabled). Fixing now...
comment:4 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
I reproduced the bug. The problem w/your fix is that for initially disabled items, when Menu2Item is created, this.parent isn't set. (Especially for programatic creation) Note also that MenuBarItem2 has hardcoded the classnames.