Taxonomy Manager - Weekly Report

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
mh86's picture

Again a short summary, what has been done the last week and what I've planed to do this week.

Progress last week:

Rework of weight management for terms

As announced in my last report, I did a total rework for the weight management for reordering terms. Initially, I planned to have weight select forms included in the tree structure. Soon, we saw, that this is not very nice.
So I decided to remove them totally and to place two buttons for a up and a down arrow instead. Every term, that gets selected through the checkbox in the tree structure, can be moved by clicking on one of these two buttons. All changes are done in JavaScript and AJAX, so that a reload of the page can be avoided.
Additional all terms got an mouse-over effect, so that small up and down arrows appear next to the terms.

Dynamic load of nested children terms

When having bigger vocabularies, it gets nearly impossible of doing all the form generation in one step, both the server side form generation and rendering and the client side javascript (adding of all the click / mouseover /.. events) get very slow or even a timeout can occur.
For hierarchical vocabularies I planed to do a AJAX reload of nested child form elements. This part has been implemented this week.
In detail, all root level terms get built, when the page is generated. When a term, that has child terms, gets expanded, all child form elements are loaded dynamically through AHAH, this means that a callback handler in php does all the form generation and rendering and sends back the HTML, which then gets added in javascript to the tree list.
This method works fine but still has one disadvantage, that it in one point doesn't work properly with Drupals Form API. The Form API only returns values of form elements, that are initially created on page generation. All values of form elements, which are generated afterwards and added to HTML, aren't available in the submit function in the $form_values variable, which is recommend to use for reading the submitted data. Instead I'm using $_POST for getting all checked terms. This is quite not very nice, but at the moment, I don't know a better solution.
With this mechanism, performance problems for hierarchical vocabularies disappear, this still leaves the question for non-hierarchical vocabularies, on which I'm working the upcoming week.

Upcoming work:

Pager for long non-hierarchical vocabularies

As mentioned above, a splitting of loading all form elements for longer non-hierarchical vocabularies needs to be done. I like to implement a simple pager for non-hierarchical vocabularies with a page size around 200 terms.

Form for editing term properties

At the moment only the editing of a whole vocabulary tree, such reordering, deleting, moving, adding... is possible. The possibility of editing term properties, like descriptions, synonyms,.. is still missing.
This form with term specific data will be placed on the right side of the tree structure and appears whenever a term in the tree is clicked.

Demo Site

SoC 2007

Group notifications

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