Hi,
I'm trying to play with sortable tree and have two issues:
I have an AJAX Tree looking like:
<ul class='TreeCat' id='work'>
<li class='open'>
<img src='s.gif' class='node' onclick="Ajax.Tree.toggle(event,this);"/>
<a href='anUrl'><span class='title'>Sitemap</span></a>
</li>
<ul>
In fact it is more complicated ...
I create a sortable doing:
Sortable.create('work',{tag:'li', handle:'title',
hoverclass:'dragover', dropOnEmpty:true, constraint:false, tree: true
});
My 1st issue:
****************
The Drag n Drop works very well but when I drop the LI, the link is
followed. Is there a cross browser way to stop the link event ?
-> onChange is called too soon and onUpdate is never called.
May be I will have to set a specific handle without links ?
My 2nd issue:
****************
When user click on image node, an Ajax request is sent using JSON-RPC.
I get the response and directly set the innerHtml under my node.
But all sortable stuff is not working, off course ! Is there a way to
expand the sortable mechanism to new tree children ? or may be I will
have to destroy and re-create the sortable (time consuming ?)
Best Regards
Jean-Philippe Encausse
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs