| Page 1 of 1 | [ 4 posts ] |
|
I'm unable to get a folder icon to be displayed on a folder that has no children. The example given by Yahoo has children for every node but my code has folders that don't all have children. Thanks for any help.
http://imgur.com/n1CZm http://developer.yahoo.com/yui/examples ... style.html |
|
The example you point out behaves exactly like yours, it doesn't have any folder icon on those nodes that have no children.
If you look at: http://developer.yahoo.com/yui/treeview/#style you can see the classnames assigned to the different types of nodes. For those nodes that have no children, which end with an 'n', the css file stored in assets/css/folders/tree.css has the width set to 17px instead of the 34px that takes the connecting lines plus the icon, thus allowing no space for the later. Set the width for those classnames to 34px and an there will be space for an icon. Then you have to change the background image to one that actually has a folder, but you will have to draw that one. You could merge the tn and ln gifs with one of the others that do have a folder. |
|
Is this a bug? MenuNode indicates that a node is a folder. If type MenuNode has no children it should have a folder icon displayed. For type Text, they should not have a folder icon.
Thanks for the help Satyam. [{"type":"MenuNode","label":"glossary","children":[{"type":"Text","label":"ccop_glossary.xml"},{"type":"MenuNode","label":"ccop_glossary_converted","children":[{"type":"Text","label":"ccop_glossary.rtf"}]}]},{"type":"MenuNode","label":"software","children":[{"type":"MenuNode","label":"01","children":[{"type":"Text","label":"D01_text_entities.xml"}]}]},{"type":"MenuNode","label":"system","children":[{"type":"MenuNode","label":"03","children":[{"type":"Text","label":"F03_001_jwics_text_entities.xml"},{"type":"Text","label":"F03_ssaa_jwics_text_entities.xml"}]} |
|
A MenuNode is a TextNode the doesn't allow multiple nodes expanded, whether it is a MenuNode or a TextNode it makes no difference regarding what type of icon is shown. It all depends on the CSS styles assigned to the classnames that code the node status. The node definition you show above says nothing about that.
|
| Page 1 of 1 | [ 4 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group