--- loncom/interface/lonhtmlcommon.pm 2008/11/26 17:11:55 1.185 +++ loncom/interface/lonhtmlcommon.pm 2008/11/26 23:20:56 1.186 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.185 2008/11/26 17:11:55 schafran Exp $ +# $Id: lonhtmlcommon.pm,v 1.186 2008/11/26 23:20:56 droeschl Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2021,6 +2021,7 @@ END # permission => 'Contains permissions as returned from lonnet::allowed(), # must evaluate to true in order to activate the link', # icon => 'icon filename', +# alttext => 'alt text for the icon', # help => 'Name of the corresponding helpfile', # linktitle => 'Description of the link (used for title tag)' # }, @@ -2038,8 +2039,6 @@ END # Don't rely on its current functionality as it might be # changed or removed. # TODO: -# add icon field -# add alt tag for icon # check for empty values # -------------------------- @@ -2054,12 +2053,17 @@ sub generate_menu { $menu_html .= '
  • '. qq{}; if($item->{'icon'}){ - $menu_html .= qq{} + $menu_html .= qq{};
+		if($item->{'alttext'}){
+		    $menu_html .= qq{$item->{'alttext'}}; + } else { #use linktext as alt text for the icon + $menu_html .= qq{$item->{'linktext'}"/>}; + } } $menu_html .= &mt($item->{'linktext'}).''; -# if (exists($item->{'help'})) { -# $menu_html .= &Apache::loncommon::help_open_topic($item->{'help'}); -# } + if (exists($item->{'help'})) { + $menu_html .= &Apache::loncommon::help_open_topic($item->{'help'}); + } $menu_html .= '
  • '; } $menu_html .= '';