Carlton Dickson wrote:
I was wondering if anyone has implemented the inplace editor without the need for the URL. I have tried this but run into a problem in that the 'saving...' text in shown for ever and the label is no longer editable.

Yes, I have a project I worked on to try to create a editable tree (for a manual) at:

http://docdemo.cordata.com/

The goal was to provide a editable tree by using drag-n-drop and the in-place editor. Feel free to play around with this demo. It refreshes itself every day. To edit do the following:

1) Expand the TOC by clicking on the TOC pop out.
2) Hit the edit button to put the tree in edit mode.
3) Start editing.

You can click the "pencil/paper" icon to edit the text of a node. Drag an node to the trash can to remove it (just hit enter on the popup to avoid the annoying drag mess). Drag the folder on the tree to add a folder. Drag the header of any page onto the tree to add a new link.

But the important part you are looking for can be found in this file:

http://docdemo.cordata.com/javascript/jstree.js

At the very end you will see I extend the in-place editor to allow callbacks to be defined instead of a URL. The old Ajax interface still works as well.

Eric

_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to