Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse_json data fix #16

Closed
mnermut opened this issue May 25, 2011 · 1 comment
Closed

parse_json data fix #16

mnermut opened this issue May 25, 2011 · 1 comment

Comments

@mnermut
Copy link

mnermut commented May 25, 2011

Hi Ivan,

This is a great project and you are to be congratulated! There is so much hard work you have put into what is a world class product.

Had some issue with the latest pre v1 release with the create_node function not accepting a JSON string that includes a data node which has an icon: ie

{ title : "Where is the icon?", data : { icon : "http://static.jstree.com/v.1.0rc/_docs/_drive.png" } }

After some debugging I modified the following line in parse_json within jstree.core.js from

if(node.data) { li.data(node.data); }

to

if(node.data) { li.data("jstree", node.data); }

This appears to have fixed the issue (unless I'm missing something). Thought this might help.

Cheers

Mike

@vakata
Copy link
Owner

vakata commented Jul 11, 2011

On the json_data demo page I tried this (after a few fixes): $.jstree._focused().create_node("#li\\.node\\.id1", 0, { data : { title : "Where is the icon?", icon : "http://static.jstree.com/v.1.0rc/_docs/_drive.png" } });
All was fine :)

@vakata vakata closed this as completed Jul 11, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants