How to test the reorderable tree

Events happening in the community are now at Drupal community events on www.drupal.org.
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

Comments

AWESOME

Anonymous's picture

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's picture

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

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

I fixed the errors and updated the CVS version.

Hi konstantin, Have you

Anonymous's picture

Hi konstantin,

Have you fixed the IE bugs? Thanks!

benc

Yes, they should be fixed. I

kkaefer's picture

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

SoC 2006: Admin Usability Improvements

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: