How do you remove/disable the fold/unfold('+') decoration and lines on the left side of the tree?

946 views
Skip to first unread message

Jeppe Skovgaard Sørensen

unread,
Apr 9, 2014, 4:48:08 AM4/9/14
to jst...@googlegroups.com
How do you remove/disable the fold/unfold('+') decoration and lines on the left side of the tree?

Ivan Bozhanov

unread,
Apr 9, 2014, 8:17:52 AM4/9/14
to jst...@googlegroups.com
As for the lines - use the core.themes.dots config option - set it to false:
core : { themes : { dots : false, ...

As for the icons - well, I will need some clarification - if you want to convert a node with children to a leaf node - simply delete all its children:
instance.delete_node(instance.get_node("ID").children);
If you want to simply hide the icon for some reason - use some CSS:
.jstree-node > .jstree-icon { display:none !important; }

Best regards,
Ivan

Jeppe Skovgaard Sørensen

unread,
Apr 9, 2014, 10:12:07 AM4/9/14
to jst...@googlegroups.com
Thanks for the swift reply.

I wanted to hide the icon and dots but found no way to hide the icon.

I will try the css approach later, and might go all in and make my own theme (bootstrap style) as I will also need odd/even coloured rows.

I am working on using jsTree in a Yii based project but could only find an old JsTree1.0 based extension,
so I am rolling my own and might release it when it is fully functional.

Regards 
     Jeppe

Ivan Bozhanov

unread,
Apr 9, 2014, 1:42:20 PM4/9/14
to jst...@googlegroups.com
Btw - there is a core.themes.stripes option built-in. Creating a theme shouldn't be very hard - just base it on the default theme and you will be good to go.

Best regards,
Ivan
Reply all
Reply to author
Forward
0 new messages