-
14 Mar 2008 2:22 AM #1
Adding a separator between treenodes
Adding a separator between treenodes
Hello,
I'm loading data into a treepanel from an external php file which produces the following output.
What I want to do now is to add a separator between the second and the third node. I tried doing this:Code:[{"text":"file1.txt","id":file1","leaf":true,"cls":"file"}, {"text":"file2.txt","id":file2","leaf":true,"cls":"file"}, {"text":"file3.txt","id":file3","leaf":true,"cls":"file"}]
but (obviously) it's not working. How do I add an horizontal line (ie: a separtor) between those elements?Code:[{"text":"file1.txt","id":file1","leaf":true,"cls":"file"}, {"text":"file2.txt","id":file2","leaf":true,"cls":"file"}, "-", {"text":"file3.txt","id":file3","leaf":true,"cls":"file"}]
Thanks for your support.
Bye.
-
14 Mar 2008 2:25 AM #2
I don't think this is possible without a reasonable amount of hacking the tree.
-
14 Mar 2008 2:32 AM #3
can I at least customize the style of the second node so it has a "border-bottom:1px solid"? That would look like a separator.
Edit: Ok, I managed to do it. I just changed the cls for the second node, like this:
and added this to my css code:Code:[{"text":"file1.txt","id":file1","leaf":true,"cls":"file"}, {"text":"file2.txt","id":file2","leaf":true,"cls":"fileseparator"}, {"text":"file3.txt","id":file3","leaf":true,"cls":"file"}]
Sorry for the silly question, that was easy enough to solve by myselfCode:.fileseparator {border-bottom:1px solid black}


Reply With Quote