--- loncom/interface/lonmenu.pm 2003/11/01 16:37:21 1.97 +++ loncom/interface/lonmenu.pm 2003/11/21 21:38:50 1.103 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.97 2003/11/01 16:37:21 www Exp $ +# $Id: lonmenu.pm,v 1.103 2003/11/21 21:38:50 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -66,7 +66,6 @@ sub initlittle { # ============================= This gets called at the top of the body section sub menubuttons { - &Apache::lonlocal::reroutetrans(); my $forcereg=shift; my $target =shift; my $registration=shift; @@ -77,6 +76,9 @@ sub menubuttons { if ($ENV{'browser.interface'} eq 'textual') { # Textual display only my %lt=&initlittle(); + $pgbg='#FFFFFF'; + $tabbg='#FFFFFF'; + $font='#000000'; if ($ENV{'request.course.id'}) { $navmaps=(<$lt{'nav'} @@ -149,7 +151,7 @@ ENDRELOAD - +
$lt{'main'} @@ -164,6 +166,7 @@ $navmaps LON-CAPA
+ @@ -177,7 +180,6 @@ ENDINLINEMENU # ====================================== This gets called in the header section sub registerurl { - &Apache::lonlocal::reroutetrans(); my $forcereg=shift; my $target = shift; my $result = ''; @@ -213,7 +215,6 @@ sub registerurl { # =========== and in the body of the document sub innerregister { - &Apache::lonlocal::reroutetrans(); my $forcereg=shift; my $target = shift; my $result = ''; @@ -233,7 +234,7 @@ sub innerregister { my $newmail=''; if ($noremote) { - $newmail='
'; + $newmail='
'; } if (($textual) && ($ENV{'request.symb'}) && ($ENV{'request.course.id'})) { my ($mapurl,$rid,$resurl)=&Apache::lonnet::decode_symb($ENV{'request.symb'}); @@ -254,11 +255,11 @@ sub innerregister { 'swmenu.setstatus("you have","messages");'); } if ($noremote) { - $newmail.='
'; + $newmail.='
'; } my $timesync=($textual?'':'swmenu.syncclock(1000*'.time.');'); - my $tablestart=($noremote?'':''); - my $tableend=($noremote?'
':''); + my $tablestart=($noremote?'':'').($textinter?'
'.&mt('Skip to Content').'
':''); + my $tableend=($noremote?'
':'').($textinter?'':''); # ============================================================================= # ============================ This is for URLs that actually can be registered if (($ENV{'request.noversionuri'}!~/^\/(res\/)*adm\//) || ($forcereg)) { @@ -377,8 +378,20 @@ ENDREALRES # Registered, textual output my $utility=&utilityfunctions(); my $form=&serverform(); - my $inlinebuttons= + my $inlinebuttons=''; + + if ($ENV{'browser.interface'} eq 'textual') { + $inlinebuttons= join('',map { (defined($_)?$_:'') } @inlineremote); + } 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 =(< // BEGIN LON-CAPA Internal @@ -648,28 +661,41 @@ sub switch { ''.$text.''; } else { $inlineremote[10*$row+$col]="\n
". - ''.$desc.''; + $desc.' '.$text.''; } } else { # Inline Remote if ($nobreak==2) { return ''; } my $text=$top.' '.$bot; $text=~s/\s*\-\s*//gs; - if ($nobreak==3) { - $inlineremote[10*$row+$col]="\n". - ''. - ''.$text. - ''; - } elsif ($nobreak) { - $inlineremote[10*$row+$col]="\n". - ''. - ''.$text. - ''; + my $pic= + ''.$text.''; + if (($ENV{'browser.interface'} eq 'textual') || ($ENV{'browser.interface'} eq 'faketextual')) { +# Accessibility + if ($nobreak==3) { + $inlineremote[10*$row+$col]="\n". + ''.$text. + ''. + ''.$pic.''; + } elsif ($nobreak) { + $inlineremote[10*$row+$col]="\n". + ''. + ''.$pic. + ''.$text.''; + } else { + $inlineremote[10*$row+$col]="\n". + ''. + ''.$pic. + ''.$desc. + ''; + } } else { - $inlineremote[10*$row+$col]="\n". - ''. - ''.$desc. - ''; +# Inline Menu + $inlineremote[10*$row+$col]= + ''.$pic. + ''.$desc. + ''; } } return ''; @@ -865,11 +891,11 @@ function gocmd(url,cmd) { } function catalog_info() { - loncatinfo=window.open(window.location.pathname+'.meta',"LONcatInfo",'height=320,width=280,resizeable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no'); + loncatinfo=window.open(window.location.pathname+'.meta',"LONcatInfo",'height=320,width=280,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no'); } function chat_win() { - lonchat=window.open('/res/adm/pages/chatroom.html',"LONchat",'height=320,width=280,resizeable=yes,location=no,menubar=no,toolbar=no'); + lonchat=window.open('/res/adm/pages/chatroom.html',"LONchat",'height=320,width=280,resizable=yes,location=no,menubar=no,toolbar=no'); } ENDUTILITY } @@ -894,8 +920,6 @@ sub handler { $r->send_http_header; return OK if $r->header_only; - &Apache::lonlocal::clearreroutetrans(); - my $form=&serverform(); my $bodytag=&Apache::loncommon::bodytag('Main Menu'); my $function='student'; @@ -914,7 +938,8 @@ sub handler { $tabbg=&Apache::loncommon::designparm($function.'.tabbg',$domain); $font=&Apache::loncommon::designparm($function.'.font',$domain); # ---- Print the screen, pretent to be in text mode to generate text-based menu - unless ($ENV{'brower.interface'} eq 'textual') { + unless ($ENV{'browser.interface'} eq 'textual') { + $ENV{'browser.interface'}='faketextual'; $ENV{'environment.remote'}='off'; } my $utility=&utilityfunctions(); @@ -928,7 +953,6 @@ $utility $bodytag ENDHEADER $r->print(''.&inlinemenu().'
'.$form); - $r->print(&Apache::lonlocal::endreroutetrans()); $r->print(''); return OK; }