[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm
www
lon-capa-cvs@mail.lon-capa.org
Fri, 21 Nov 2003 21:38:50 -0000
www Fri Nov 21 16:38:50 2003 EDT
Modified files:
/loncom/interface lonmenu.pm
Log:
Try to have Inline Remote take up less space on top.
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.102 loncom/interface/lonmenu.pm:1.103
--- loncom/interface/lonmenu.pm:1.102 Tue Nov 11 15:27:15 2003
+++ loncom/interface/lonmenu.pm Fri Nov 21 16:38:50 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.102 2003/11/11 20:27:15 albertel Exp $
+# $Id: lonmenu.pm,v 1.103 2003/11/21 21:38:50 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -378,8 +378,20 @@
# 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=(<<ENDINLINE);
+<tr><td>$inlineremote[21]</td><td> </td><td>$inlineremote[23]</td></tr>
+<tr><td>$inlineremote[61]</td><td>$inlineremote[62]</td><td>$inlineremote[63]</td></tr>
+<tr><td>$inlineremote[71]</td><td>$inlineremote[72]</td><td>$inlineremote[73]</td></tr>
+<tr><td>$inlineremote[81]</td><td>$inlineremote[82]</td><td>$inlineremote[83]</td></tr>
+<tr><td>$inlineremote[91]</td><td>$inlineremote[92]</td><td>$inlineremote[93]</td></tr>
+ENDINLINE
+ }
$result =(<<ENDREGTEXT);
<script>
// BEGIN LON-CAPA Internal
@@ -657,23 +669,33 @@
my $text=$top.' '.$bot;
$text=~s/\s*\-\s*//gs;
my $pic=
- '<img border="0" alt="'.$text.'" src="/res/adm/pages/'.$img.'" />';
- if ($nobreak==3) {
- $inlineremote[10*$row+$col]="\n".
- '<td width="40%" align="right"><font color="'.$font.'" size="+1">'.$text.
- '</font></td><td width="10%" align="right" bgcolor="'.$tabbg.'">'.
- '<a href="javascript:'.$act.';">'.$pic.'</a></td></tr>';
- } elsif ($nobreak) {
- $inlineremote[10*$row+$col]="\n<tr>".
- '<td width="10%" align="left" bgcolor="'.$tabbg.'">'.
- '<a href="javascript:'.$act.';">'.$pic.
- '</a></td><td width="40%" align="left"><font color="'.$font.'" size="+1">'.$text.'</font></td>';
+ '<img border="0" alt="'.$text.'" src="/res/adm/pages/'.$img.'" align="'.
+ ($nobreak==3?'right':'left').'" />';
+ if (($ENV{'browser.interface'} eq 'textual') || ($ENV{'browser.interface'} eq 'faketextual')) {
+# Accessibility
+ if ($nobreak==3) {
+ $inlineremote[10*$row+$col]="\n".
+ '<td width="40%" align="right"><font color="'.$font.'" size="+1">'.$text.
+ '</font></td><td width="10%" align="right" bgcolor="'.$tabbg.'">'.
+ '<a href="javascript:'.$act.';">'.$pic.'</a></td></tr>';
+ } elsif ($nobreak) {
+ $inlineremote[10*$row+$col]="\n<tr>".
+ '<td width="10%" align="left" bgcolor="'.$tabbg.'">'.
+ '<a href="javascript:'.$act.';">'.$pic.
+ '</a></td><td width="40%" align="left"><font color="'.$font.'" size="+1">'.$text.'</font></td>';
+ } else {
+ $inlineremote[10*$row+$col]="\n<tr>".
+ '<td width="10%" align="left" bgcolor="'.$tabbg.'">'.
+ '<a href="javascript:'.$act.';">'.$pic.
+ '</a></td><td colspan="3"><font color="'.$font.'">'.$desc.
+ '</font></td></tr>';
+ }
} else {
- $inlineremote[10*$row+$col]="\n<tr>".
- '<td width="10%" align="left" bgcolor="'.$tabbg.'">'.
- '<a href="javascript:'.$act.';">'.$pic.
- '</a></td><td colspan="3"><font color="'.$font.'">'.$desc.
- '</font></td></tr>';
+# Inline Menu
+ $inlineremote[10*$row+$col]=
+ '<a href="javascript:'.$act.';">'.$pic.
+ '</a><font color="'.$font.'" size="2">'.$desc.
+ '</font>';
}
}
return '';
@@ -916,7 +938,8 @@
$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();