[Phpmyadmin-devel] Fixing Documentation Numbering
cyberdog3k at gmail.com
Thu Jun 22 20:28:41 CEST 2006
In regard to bug #1446538: I did some work with the Documentation
file from svn. Here's what I've found: First of all, as I imagine
you have realized by now, the current CSS method of numbering is not
well supported at all. Only the most recent versions of Opera and
FireFox support the necessary CSS. Since this leaves out the vast
majority who use IE, it isn't an ideal solution.
Obviously we have multiple options for fixing this. In the spirit
number things the same (and be browser independent!).
This took me awhile, so I apologize if the logic is crude; I'm sure
it can be refined. Basically we make arrays of the DOM elements for
all the H2/H3/H4 in the file. I did simple nested looping, and used
the Y index of each element to determine the order they land in. The
page is then re-written with the index numbers from the loops.
So long story short, the looping technique is ugly and inefficient,
but it's late and it works. If somebody wants to rewrite that part of
the logic, I think it would be a decent replacement.
One big question I have, however: Why are we bothering dynamically
generating the numbering if the achor tags are all hand coded? Adding
an entry would seem to break the anchors anyway.
The Documentation.html is in the attached archive. Comments welcome.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 61491 bytes
Desc: not available
More information about the Developers