PDA

View Full Version : Playing with treenodes (newbie)



BlancoX
6 Sep 2007, 1:26 PM
Hi all,

Im new in ExtJS, and spanish: forgive my english ^^

After managing to work with layouts, y started playing with Trees. Found something "rare" when a node with class folder was empty: tried to expand/collapse it, and its .x-tree-node-icon (the folder icon) suddenly changed to a file_icon (default leaf icon...). Though was a bug, but seems not (still can't understand why a node with a folder class and icon had to change its icon to a file-type when expanded, instead of a folder-open icon).

Anyway, using php server-side i returned 3 clases for the nodes: file, folder, and empty-folder. Then added this line to css to overwirte the empty-folders icon on expand/collapse (both cases i wanted the close-folder icon, nothing inside!).

[code]#tree-div .folder_empty .x-tree-node-icon {
background: url(