OdinaSpb / jstree

Automatically exported from code.google.com/p/jstree
0 stars 0 forks source link

[1.0-rc3] Firefox + tree with icons + get_json = a partially wrong result #1009

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Create a tree via json_data with nodes / leafs having icons ( with a slash as 
in icon:'./img/1.png' )
2.Get the tree back via: var result = $('#treeStructure').jstree('get_json', 
-1);
3.Dump the result (console.log) or use a debugger to display the result

What is the expected output? What do you see instead?
o Expected
… "icon":"./img/1.png" …
o Displayed
… "icon":"\"./img/1.png\"" …

What version of the product are you using? On what browser?
o Product
  jsTree 1.0-rc3
o Browsers
  chrome 25.0.1364.172 m - works fine
  ff 19.0.2 - icons disappear when restoring the tree

Please provide any additional information below.
. msie not tested because it doesn't fully implement indexedDB (compound 
primary keys are missing)
. dirty fix in jquery.jstree.js
… Commented one line, then added two lines …
//tmp2.icon = 
t.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")",""
);
tmp2.icon = 
t.children("ins").get(0).style.backgroundImage.replace("url(\"","").replace("\")
","");
tmp2.icon = tmp2.icon.replace("url(","").replace(")","");

Thanks for your excellent work,
Best regards.

Pierre.

Original issue reported on code.google.com by pf82...@gmail.com on 19 Mar 2013 at 10:58