Ticket #5003 (closed enhancement: fixed)

Opened 13 months ago

Last modified 12 months ago

Tree: support separate (user-defined) icons for open / closed state

Reported by: bill Owned by:
Priority: normal Milestone: 1.1
Component: Dijit Version: 0.9
Severity: normal Keywords:
Cc:

Description (last modified by bill) (diff)

A user might want to have separate tree node icons for opened and closed states (think of Windows Explorer with the opened and closed folders). Want to have a CSS pattern/rule like:

.dijitTreeNodeContents .myIcon {
  background-image: url(...);
}
.dijitTreeNodeExpandedContents .myIcon {
  background-image: url(...);
}

The problem is that that expanded/contracted state can't be written on TreeNode.domNode because it will seep down to the children TreeNodes.

Alternately, make getIconClass() be called every time the node state changes (from expanded to collapsed), and pass in the new state.

Change History

Changed 13 months ago by bill

  • description modified (diff)
  • summary changed from Tree: separate icons for open / closed state to Tree: support separate (user-defined) icons for open / closed state

Changed 12 months ago by bill

  • status changed from new to closed
  • resolution set to fixed

(In [11699]) Add "opened" parameter" to getIconClass() callback, to support separate (user-defined) icons for opened/closed tree nodes, typically opened and closed folders. Fixes #5003.

Changed 12 months ago by bill

(In [11700]) Changes spaces to tabs; had a weird editor setting in previous checkin. Refs #5003.

Changed 12 months ago by bill

(In [11719]) Default opened and closed folder icons for tundra, designed by nikolaionken (CLA on file). Refs #5003. There's a little horizontal vertical line at the bottom right of the opened folder; not sure where it's coming from (it's not part of the new image files)

Changed 12 months ago by bill

(In [11720]) Default leaf icon for tundra, designed by nikolaionken (CLA on file). Refs #5003. Also fixed rendering glitch (just had forgotten no-repeat on the image)

Changed 12 months ago by bill

(In [11730]) Use gif not png, to be nice to IE6. Refs #5003.

Changed 12 months ago by bill

(In [11797]) New folders icons from Nikolai (CLA on file). Refs #5003.

Note: See TracTickets for help on using tickets.