--- loncom/interface/lonmenu.pm 2007/04/11 19:38:59 1.211 +++ loncom/interface/lonmenu.pm 2007/04/28 23:13:56 1.218 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.211 2007/04/11 19:38:59 www Exp $ +# $Id: lonmenu.pm,v 1.218 2007/04/28 23:13:56 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); @@ -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.=(< +$inlineremote[21] $inlineremote[23] +$inlineremote[61] $inlineremote[63] +$inlineremote[71] $inlineremote[72] $inlineremote[73] +$inlineremote[81] $inlineremote[82] $inlineremote[83] +$inlineremote[91] $inlineremote[92] $inlineremote[93] +ENDINLINEICONS + } else { + $inlinebuttons=(<$inlineremote[21] $inlineremote[23] $inlineremote[61]$inlineremote[62]$inlineremote[63] $inlineremote[71]$inlineremote[72]$inlineremote[73] $inlineremote[81]$inlineremote[82]$inlineremote[83] $inlineremote[91]$inlineremote[92]$inlineremote[93] ENDINLINE + } } } $result =(<'. ''.$pic.' - '.$text.''; + '.$text.''; } else { $inlineremote[$idx]="\n". ''. ''.$pic. ''. - $desc.''; + ''.$desc.''; } } else { # Inline Menu - $inlineremote[$idx]= - ''.$pic. - ''.$desc.''; + if ($env{'environment.icons'} eq 'iconsonly') { + $inlineremote[$idx]=''.$pic.''; + } else { + $inlineremote[$idx]= + ''.$pic. + ''.$desc.''; + } } } return ''; @@ -907,13 +930,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]) { @@ -1230,7 +1253,7 @@ function annotate() { '$start_page_annotate' +"" - +"" + +"" +"<\\/form>" +'$end_page_annotate'); annotator.document.close();
'.&mt($category_names{$cat}).'