Hi,
I'm trying to use jstree in a rails project. I have it all working, but it is causing a performance issue due to the fact that my page is being double-rendered if I have the bindings for jstree active.
My haml code for setting up jstree look like this:
- :javascript
- jQuery("#assigned_items").ready(function() {
- jQuery("#assigned_tasks").bind("move_node.jstree", function (e, data) {didDrop(e, data);})
- jQuery("#assigned_tasks").jstree( { "plugins" : [ "themes", "ui", "html_data", "dnd", "crrm", "cookies" ], "themes" : { "theme" : "apple", "dots" : false, "icons" : true, "url" : "/" } } );
- jQuery("#subtasks").jstree( { "plugins" : [ "themes", "ui", "html_data", "dnd", "crrm", "cookies" ], "themes" : { "theme" : "apple", "dots" : false, "icons" : true, "url" : "/" } } );
- })
In my development logs I see my "index" controller action being called and completing normally...and then it gets called a second time for no apparent reason. If I comment out the above jstree stuff, the problem goes away.
Help?
thanks!