Nice Tree Effect

  • user warning: Table 'drupal_herzi_eu.semaphore' doesn't exist query: SELECT expire, value FROM semaphore WHERE name = 'menu_rebuild' in /var/lib/www/shared/drupal-6.16/includes/lock.inc on line 154.
  • user warning: Table 'drupal_herzi_eu.semaphore' doesn't exist query: SELECT expire, value FROM semaphore WHERE name = 'menu_rebuild' in /var/lib/www/shared/drupal-6.16/includes/lock.inc on line 154.
  • user warning: Table 'drupal_herzi_eu.semaphore' doesn't exist query: SELECT expire, value FROM semaphore WHERE name = 'menu_rebuild' in /var/lib/www/shared/drupal-6.16/includes/lock.inc on line 154.
  • user warning: Table 'drupal_herzi_eu.semaphore' doesn't exist query: SELECT expire, value FROM semaphore WHERE name = 'menu_rebuild' in /var/lib/www/shared/drupal-6.16/includes/lock.inc on line 154.

Did you ever wonder why applications like nautilus display a node called »(empty)« in the tree? I didn't. There are several reasons that could be brought up here, but in my opinion the Windows Explorer just got it right:

  1. if you don't know, display an expander
  2. if you look at it and it's empty, just remove the expander

So I tried to implement this behaviour in GQ. It wasn't very easy, but it works. As I wrote last week, I suspected a bug in that code, so I developed a small test case to play with that feature. If you're interested in it for your application, take my example and build your own tree model.

Trackback URL for this post:

http://web.herzi.eu/en/trackback/104