--- loncom/interface/lonmenu.pm 2007/04/11 15:37:04 1.210 +++ loncom/interface/lonmenu.pm 2007/04/17 15:45:03 1.215 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.210 2007/04/11 15:37:04 albertel Exp $ +# $Id: lonmenu.pm,v 1.215 2007/04/17 15:45:03 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -445,7 +445,7 @@ sub innerregister { # Finally, turn the button on or off if ($cfile && !$const_space) { $editbutton=&switch - ('','',6,1,'cstr.gif','edit[_1]','resource[_2]', + ('','',6,1,'pcstr.gif','edit[_1]','resource[_2]', "go('".$cfile."');","Edit this resource"); } elsif ($editbutton eq '') { $editbutton=&clear(6,1); @@ -842,6 +842,9 @@ sub switch { } } else { # Inline Remote + if ($env{'environment.icons'} ne 'classic') { + $img=~s/\.gif$/\.png/; + } if ($nobreak==2) { return ''; } my $text=$top.' '.$bot; $text=~s/\s*\-\s*//gs; @@ -863,19 +866,19 @@ sub switch { $inlineremote[$idx]="\n". ''. ''.$pic.' - '.$text.''; + '.$text.''; } else { $inlineremote[$idx]="\n". ''. ''.$pic. ''. - $desc.''; + ''.$desc.''; } } else { # Inline Menu $inlineremote[$idx]= - ''.$pic. - ''.$desc.''; + ''.$pic. + ''.$desc.''; } } return ''; @@ -907,13 +910,13 @@ sub inlinemenu { undef(@inlineremote); undef(%category_members); &rawconfig(1); - my $output=''; + my $output='
'; for (my $col=1; $col<=2; $col++) { - $output.='
'; + $output.=''; for (my $row=1; $row<=8; $row++) { foreach my $cat (keys(%category_members)) { if ($category_positions{$cat} ne "$col,$row") { next; } - $output.=''; + $output.='
'.&mt($category_names{$cat}).'
'; my %active=(); foreach my $menu_item (split(/\:/,$category_members{$cat})) { if ($inlineremote[$menu_item]) { @@ -965,6 +968,7 @@ sub rawconfig { $prt=~s/\$udom/$udom/g; $prt=~s/\$crs/$crs/g; $prt=~s/\$requested_domain/$requested_domain/g; + if ($category_names{$cat}!~/\w/) { $cat='oth'; } my $type = &Apache::loncommon::course_type(); if ($type eq 'Group') { $desc = &convert_menu_function($desc,$type);
'.&mt($category_names{$cat}).'