PDA

View Full Version : [FIXED-535][3.1.1-rc] TreeGrid leaf icons not being displayed, fix included.



hhangus
5 Feb 2010, 12:40 PM
The icons for leaves in a TreeGrid are not being shown.

The problem can also be seen in the Ext Examples TreeGrid page. Normal trees have an icon on their leaves, the TreeGrid example does not.

The problem is in TreeGridNodeUI. The class 'x-tree-node-leaf' should be included where I've shown it in red below.


buf = [
'<tbody class="x-tree-node">',
'<tr ext:tree-node-id="', n.id ,'" class="x-tree-node-el x-tree-node-leaf ', a.cls, '">',
'<td class="x-treegrid-col ',(hasLbi ? 'x-treegrid-col-lbitop':''),'">',
'<span class="x-tree-node-indent">', this.indentMarkup, "</span>",
'<img src="', this.emptyIcon, '" class="x-tree-ec-icon x-tree-elbow">',
'<img src="', a.icon || this.emptyIcon, '" class="x-tree-node-icon', (a.icon ? "x-tree-node-inline-icon" : ""), (a.iconCls ? " "+a.iconCls : ""), '" unselectable="on">',
'<a hidefocus="on" class="x-tree-node-anchor" href="', a.href ? a.href : '#', '" tabIndex="1" ', a.hrefTarget ? ' target="'+a.hrefTarget+'"' : '', '>',
'<span unselectable="on">', (c.tpl ? c.tpl.apply(a) : a[c.dataIndex] || c.text), '</span></a>',
'</td>'
];

mystix
6 Feb 2010, 9:20 AM
confirmed in 3.1.1-rc:
http://www.extjs.com/deploy/ext-3.1.1-rc/examples/treegrid/treegrid.html

Jamie Avins
8 Feb 2010, 10:11 AM
Changed in svn 6005.