Posted by kkaefer on August 15, 2006 at 8:58pm
Updated the docs and the patches and modules to reflect the recent changes in HEAD.
- Get a recent HEAD version of Drupal. Install it.
- Get a recent version of jQuery. (Don't be afraid of its size. Compressed, it's only 15KB) Put it into the misc/ folder.
- Download the files from CVS.
- Move the generic.patch to your Drupal root folder and apply it. This patch contains all the split up patches I and others submitted the last couple of weeks. Links to single patches are provided below.
- Move the modules to your
modulesdirectory. On the modules page, enabletree,tree_demo,liveeditandfasttoggle. - Create a vocabulary with ID 1. Populate it with some terms.
- Go to
admin/treeto check out the feature. The live editing feature should be present on each page for menu items. The fast toggle feature can be found onadmin/content/postsoradmin/user/users. - Review it and post all issues you have here. Don't forget to praise me.
FAQ
- Q: Why a module?
A: It is the easiest way to add functionality to Drupal without hacking it. Although is functionality could be in core, it can also be in a module. It is very easy to merge a module into core as opposed to the other way around. - Q: Why two modules?
A: tree.module contains all the abstract code for rendering and theming a tree, wheras tree_demo.module implements a fully functional example tree to demonstrate the functionality. - Q: Will there be a patch that applies to core?
A: There will be a patch, but not now. I have to wait until jQuery really gets into core in order to make a proper patch for it. Once, #type => 'tree' is in core, I will also write patches to convert existing trees to the new tree and make it reorderable (if it applies). I don't think it makes any sense at the moment, to provide a patch as I will have to reroll it a bazillion times due to constant changes in what this patch alters.
See also: http://drupal.org/node/69786, http://drupal.org/node/78766, http://drupal.org/node/76637

Comments
AWESOME
This is great work timcn. I have not found any bugs wit Firefox 1.5.0.6 yet.
Tree.js Line 292, Absolute URL, MISC JS Errors
In tree.js theres an absolute URL online 292 (/?q=js/taxonomy/save/term) that prevents you from saving node structure changes if drupal is not in your root. If you change this URL to relative (js/taxonomy/save/term) it works for installations in your root or subdirectories.
Also I am getting miscellaneous JS errors depending where my mouse goes in FireBug. This maybe normal but if I drag a element node off the tree I get "children[0].childNodes has no properties" errors. Also when trying to insert a node into another node I get "uncaught exception: [Exception... "Node cannot be inserted at the specified point in the hierarchy" code: "3" nsresult: "0x80530003 (NS_ERROR_DOM_HIERARCHY_REQUEST_ERR)" location: "http://localhost:8000/misc/jquery.js Line: 477"]"
All else seems to work great.
Thank you very much for
Thank you very much for testing.
I just forgot to change the absolute URL I put in there for testing. The actual URL will be passed in the 'settings' for the tree. I am currently tracking down the Exceptions that occur (randomly) when you drag an item off the tree.
I fixed the errors and
I fixed the errors and updated the CVS version.
Hi konstantin, Have you
Hi konstantin,
Have you fixed the IE bugs? Thanks!
benc
Yes, they should be fixed. I
Yes, they should be fixed. I already said that in my comment two days ago.