Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#481 accesskey and title in menus

Slash 2.5/3.0
open
Chris Nandor
Other (116)
5
2006-06-20
2005-11-25
shane
No

I had the need to be able to put accesskeys in menu item links, as well
as titles for all the links. (think w3c...)

here's a small patch to Slash::Utility::Display to make it do it.

that will let it pass any accesskey/title information, for each menu
item:

Index: Display.pm

========================
RCS file: /cvsroot/slashcode/slash/Slash/Utility/Display/Display.pm,v
retrieving revision 1.102
diff -r1.102 Display.pm
1169a1170,1171
> $data->{accesskey} = $item->{accesskey} if $item->
{accesskey};
> $data->{title} = $item->{accesskey} if $item->{title};

and a patch to the users;menu;default template to accept either
addition:

Index: users;menu;default

========================
RCS file: /cvsroot/slashcode/slash/themes/slashcode/templates/
users;menu;default,v
retrieving revision 1.8
diff -r1.8 users;menu;default
22c22
< [% IF i.value; needbar = 1 %]<li><a href="[% i.value %]">[%
END %][% i.label %][% IF i.value %]</a></li>[% END %]
---
> [% IF i.value; needbar = 1 %]<li><a href="[% i.value %]"[% IF
i.accesskey %] accesskey="[% i.accesskey %]"[% END %][% IF i.title %]
title="[% i.title %]"[% END %]>[% END %][% i.label %][% IF i.value %]</
a></li>[% END %]

Discussion

  • Rob Malda
    Rob Malda
    2006-06-20

    • assigned_to: nobody --> pudge