How to test the reorderable tree

kkaefer's picture

Updated the docs and the patches and modules to reflect the recent changes in HEAD.

  1. Get a recent HEAD version of Drupal. Install it.
  2. Get a recent version of jQuery. (Don't be afraid of its size. Compressed, it's only 15KB) Put it into the misc/ folder.
  3. Download the files from CVS.
  4. 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.
  5. Move the modules to your modules directory. On the modules page, enable tree, tree_demo, liveedit and fasttoggle.
  6. Create a vocabulary with ID 1. Populate it with some terms.
  7. Go to admin/tree to check out the feature. The live editing feature should be present on each page for menu items. The fast toggle feature can be found on admin/content/posts or admin/user/users.
  8. Review it and post all issues you have here. Don't forget to praise me.

FAQ

  1. 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.
  2. 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.
  3. 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

Login to post comments

AWESOME

Anonymous - Wed, 2006-08-16 04:46

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

Anonymous - Wed, 2006-08-16 15:05

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

kkaefer's picture
kkaefer - Wed, 2006-08-16 17:56

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

kkaefer's picture
kkaefer - Wed, 2006-08-16 20:58

I fixed the errors and updated the CVS version.


Hi konstantin, Have you

Anonymous - Fri, 2006-08-18 07:03

Hi konstantin,

Have you fixed the IE bugs? Thanks!

benc


Yes, they should be fixed. I

kkaefer's picture
kkaefer - Fri, 2006-08-18 08:02

Yes, they should be fixed. I already said that in my comment two days ago.