On-topic: HTML/JS help please
David Cantrell
david at cantrell.org.uk
Fri Feb 5 22:31:58 GMT 2010
On Fri, Feb 05, 2010 at 05:13:25PM +0000, Jacqui Caren-home wrote:
> David Cantrell wrote:
> >I want to add a Thingy to CPANdeps to let users collapse/expand portions
> >of the dependency tree. How would one go about this?
> >Naively wrapping <tr>s in <div>s and toggling their style.display
> >doesn't work, presumably because <div> isn't kosher in a <table>.
> Jquery tree thingy is data driven and works well.
Unfortunately every pre-existing Javascript thingy I've looked at
assumes that I have a simple tree. I don't, I have a *table*, which has
a hierarchy.
Also, none of them make it obvious that they degrade gracefully for
browsers which support neither CSS nor Javascript.
Anyway, I have something that partially works now:
http://cpandeps-dev.cantrell.org.uk/?module=Test::Class::Most
with just the *teensy* little bug that if you first collapse a sub-tree
(like, say, that for Test::Exception on that page) and then collapse a
tree that contains it, it Does The Wrong Thing. Meh, nothing that a
small amount of programming can't fix.
--
David Cantrell | Reality Engineer, Ministry of Information
You are so cynical. And by "cynical", of course, I mean "correct".
-- Kurt Starsinic
More information about the london.pm
mailing list