--- loncom/interface/lonmenu.pm 2007/04/11 02:42:00 1.209 +++ loncom/interface/lonmenu.pm 2007/04/24 23:26:02 1.217 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.209 2007/04/11 02:42:00 www Exp $ +# $Id: lonmenu.pm,v 1.217 2007/04/24 23:26:02 albertel 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); @@ -486,9 +486,14 @@ s&8&3&prt.gif&prepare[_1]&printout[_1]&g s&9&1&sbkm.gif&set[_1]&bookmark[_2]&set_bookmark()&Set a bookmark for this resource&&1 s&9&3&anot.gif&anno-[_1]&tations[_1]&annotate()&Make notes and annotations about this resource&&1 ENDMENUITEMS + unless ($env{'request.noversionuri'}=~/\/(bulletinboard|smppg|navmaps|syllabus|aboutme)(\?|$)/) { - $menuitems.=(<'. ''.$pic.' - '.$text.''; + '.$text.''; } else { $inlineremote[$idx]="\n". ''. ''.$pic. ''. - $desc.''; + ''.$desc.''; } } else { # Inline Menu $inlineremote[$idx]= - ''.$pic. - ''.$desc.''; + ''.$pic. + ''.$desc.''; } } return ''; @@ -904,18 +912,16 @@ sub openmenu { } sub inlinemenu { - @inlineremote=(); - undef @inlineremote; - %category_members=(); - undef %category_members; + 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]) { @@ -967,6 +973,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); @@ -1231,7 +1238,7 @@ function annotate() { '$start_page_annotate' +"" - +"" + +"" +"<\\/form>" +'$end_page_annotate'); annotator.document.close();
'.&mt($category_names{$cat}).'