Opened 11 years ago
Closed 11 years ago
#9937 closed enhancement (fixed)
Tree: Extend dijit.Tree to allow styling of complete row
Reported by: | Shane O'Sullivan | Owned by: | Shane O'Sullivan |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | Dijit | Version: | 1.3.2 |
Keywords: | Cc: | nonken | |
Blocked By: | Blocking: |
Description
The dijit.Tree widget currenltly allows the user to apply styles to labels and icons, but there is no facility for adding a CSS class to the rowNode.
The prevents customizations such as varying backgrounds on a per-node basis.
The solution would be similar to that used for icons:
- Add a function 'addRowClass' to the tree, which users can override.
- Change the '_updateItemClasses' on dijit._TreeNode to use this function to get the CSS class to apply to the rowNode
Attachments (1)
Change History (5)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Sounds reasonable, go ahead if you want to patch that. I sort-of regret adding getIconClass() and getLabelClass() since all could be achieved from this one new method, but too late now.
Changed 11 years ago by
Attachment: | dijit.Tree.rowClass.patch added |
---|
Patch to resolve this issue. I refactored the dijit._TreeNode a little, as it was duplicating the same process 3 times.
comment:3 Changed 11 years ago by
Milestone: | tbd → 1.4 |
---|---|
Owner: | set to Shane O'Sullivan |
Summary: | Extend dijit.Tree to allow styling of complete row → Tree: Extend dijit.Tree to allow styling of complete row |
Great, looks good to me.
comment:4 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Changes made in [20363]. Not sure why the reference is not showing up in this ticket.
Correction: the function should be called 'getRowClass', not 'addRowClass'