Changes between Initial Version and Version 2 of Ticket #3314


Ignore:
Timestamp:
Aug 11, 2007, 6:42:13 PM (13 years ago)
Author:
bill
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3314

    • Property Milestone changed from 0.9 to 1.0
  • Ticket #3314 – Description

    initial v2  
    1 The tree control should be able to put icons to the left of each label.  Icons should be specified in CSS as background images (they won't show up in high-contrast mode but that's OK because the text is still there), and then each dojo.data.item should contain enough information to be able to construct a CSS class to pull in the image.
     1The tree control should be able to put icons to the left of each label.  Icons should be specified in CSS as background images (they won't show up in high-contrast mode but that's OK because the text is still there).
     2
     3User defines a class for each icon (just like Button and Menu icons) and then defines a function that generates the icon class based on the dojo.data.item and the node expanded/closed state.
    24
    35Maybe a default code like
     
    57iconAttr: "icon",
    68
    7 getIconClass: function(store, item){
     9getIconClass: function(store, item, /*Boolean*/ opened){
    810   return store.getValue(item, this.iconAttr);
    911}
    1012}}}
    1113
     14(For folder nodes there can be two icons, one for when it's expanded and one for when it's contracted, so we call the function every time we change state.)