Cheers,

Great module! I am the maintainer for taxonomy menu. I am going to make taxonomy manager a dependency for the next version of taxonomy menu and use the taxonomy_manager_tree to assist in the selection of terms to add to different parts of the menu. While I have successfully added the tree to the admin form, it's missing some of the wonderful features. The most import feature is the "select all children" jquery effect.

I think I found what I need to do I just want to verify.

It looks like the js function Drupal.attachTermDataLinks is what attaches the effects to the term. If I'm reading the js correctly, it looks like it is looking for the terms to be links with the class "term-data-link".

Since Taxonomy Manager renders the form element, I'm not sure how to turn the terms into links.

Or would it be better to select the elements in my own js file replacing my "a.term-data-link" with my class?

Thanks,
Neil

Comments

mh86’s picture

Status: Active » Fixed

Hi!

First of all, sorry for my late response, there were so many issues and I had almost no time to look at it.

Concerning your question, it is much easier to use, but a bit tricky (or at least difficult to find) ;-) The "select all children" functionality is located in the tree.js file.
The tree element allows you to have callback functions which add operations to the term name, the function has to be named "taxonomy_manager_'. form_id .'_operations" (take a look at taxonomy_manager_taxonomy_manager_tree_operations($term) in taxonomy_manager.module). I have to say, having a 'taxonomy_manager_' function prefix in another module is very strange. The reason why I solved it this way were some problems with the ajax callbacks. But I'm sure it would be possible to improve that :)

Rendering the term as links works very similar, look at taxonomy_manager_taxonomy_manager_tree_link($term). But I don't think you are going to need it.

I hope this information helps you.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.