--- loncom/interface/lonmenu.pm 2007/07/10 23:38:09 1.219 +++ loncom/interface/lonmenu.pm 2007/08/17 22:12:30 1.223 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.219 2007/07/10 23:38:09 albertel Exp $ +# $Id: lonmenu.pm,v 1.223 2007/08/17 22:12:30 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -507,10 +507,19 @@ ENDMENUITEMS my $buttons=''; foreach (split(/\n/,$menuitems)) { my ($command,@rest)=split(/\&/,$_); - if ($command eq 's') { - $buttons.=&switch('','',@rest); - } else { - $buttons.=&clear(@rest); + my $idx=10*$rest[0]+$rest[1]; + if (&hidden_button_check() eq 'yes') { + if ($idx == 21 ||$idx == 23) { + $buttons.=&switch('','',@rest); + } else { + $buttons.=&clear(@rest); + } + } else { + if ($command eq 's') { + $buttons.=&switch('','',@rest); + } else { + $buttons.=&clear(@rest); + } } } @@ -520,30 +529,42 @@ ENDMENUITEMS my $inlinebuttons=''; if ($addremote) { # Registered, textual output - if ($env{'browser.interface'} eq 'textual') { $inlinebuttons= join('',map { (defined($_)?$_:'') } @inlineremote); } else { if ($env{'environment.icons'} eq 'iconsonly') { - $inlinebuttons=(< $inlineremote[21] $inlineremote[23] +ENDARROWSINLINE + if (&hidden_button_check() ne 'yes') { + $inlinebuttons .= (< 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 - } - } +ENDFIRSTLINE + } + if (&hidden_button_check() ne 'yes') { + foreach my $row (6..9) { + if ($inlineremote[${row}.'1'] ne '' + || $inlineremote[$row.'2'] ne '' + || $inlineremote[$row.'3'] ne '') { + $inlinebuttons .= <<"ENDLINE"; +$inlineremote["${row}1"]$inlineremote["${row}2"]$inlineremote["${row}3"] +ENDLINE + } + } + } + } + } } $result =(< @@ -791,15 +812,16 @@ sub open { return ''; } my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'}; - unless (shift eq 'unix') { + +# unless (shift eq 'unix') { # resizing does not work on linux because of virtual desktop sizes - $returnval.=(<