File descriptions
Jerry Nairn
jpnairn at gmail.com
Thu Feb 16 08:50:54 PST 2006
Not sure if anyone got this when I sent it earlier. Sorry if this is a
repeat.
> Jonathan Noack said the following:
> > Another complementary idea is to set the file link <a> tag title
> > attribute to the file description. That would make the description
> > appear in many browsers as tool tip when the mouse passes over the link.
[snip]
> These are all great ideas. Thanks!
In my copy of cvsweb, I have modified the "link" subroutine to accept a
description with each link.
sub link($$$)
{
my ($name, $url, $desc) = @_;
if ( $desc ) {
$desc = sprintf('alt="%s" title="%s"', $desc, $desc);
}
return sprintf('<a href="%s" %s>%s</a>', htmlquote($url), $desc, $name);
}
The 'alt' attribute probably isn't necessary. I think it works to create a
tool tip in some ancient version of IE.
This isn't all of the changes. I'm not trying to send a patch, just
suggesting something.
So, for example, the links at the tops of columns in the folder view can
change from:
sprintf('./%s#dirlist', toggleQuery('sortby', 'file')));
to:
sprintf('./%s#dirlist', toggleQuery('sortby', 'file')), 'Sort by file
name');
Jerry Nairn
Microchip Technology
Language Tools
More information about the freebsd-cvsweb
mailing list