simplified how the expand/collapse link is handled

Resolves: http://bugs.web2project.net/view.php?id=1540