[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm
www
lon-capa-cvs@mail.lon-capa.org
Tue, 23 Sep 2003 01:55:41 -0000
www Mon Sep 22 21:55:41 2003 EDT
Modified files:
/loncom/interface lonmenu.pm
Log:
Bug #1932: make cryptic menu short texts vanish in inline Remote
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.93 loncom/interface/lonmenu.pm:1.94
--- loncom/interface/lonmenu.pm:1.93 Sun Sep 21 17:40:06 2003
+++ loncom/interface/lonmenu.pm Mon Sep 22 21:55:41 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.93 2003/09/21 21:40:06 www Exp $
+# $Id: lonmenu.pm,v 1.94 2003/09/23 01:55:41 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -640,21 +640,34 @@
if ($nobreak==2) { return ''; }
my $text=$top.' '.$bot;
$text=~s/\s*\-\s*//gs;
- $inlineremote[10*$row+$col]="\n".($nobreak?' ':'<br />').
- '<a href="javascript:'.$act.';">'.$text.'</a> '.
- ($nobreak?'':$desc);
+ if ($nobreak) {
+ $inlineremote[10*$row+$col]=
+ '<a href="javascript:'.$act.';">'.$text.'</a>';
+ } else {
+ $inlineremote[10*$row+$col]="\n<br />".
+ '<a href="javascript:'.$act.';">'.$desc.'</a>';
+ }
} else {
# Inline Remote
if ($nobreak==2) { return ''; }
my $text=$top.' '.$bot;
$text=~s/\s*\-\s*//gs;
- $inlineremote[10*$row+$col]="\n".
- ($nobreak==3?'<td width="50%" colspan="2" align="right"':'<tr><td').
- ' bgcolor="'.$tabbg.'"'.($nobreak==1?' width="50%" colspan="2"':'').
- '"><a href="javascript:'.$act.';"><font color="'.$font.'"'.
- ($nobreak?' size="+1"':'').
- '>'.$text.'</font></a></td>'.
- ($nobreak?'':'<td colspan="3" width="80%"><font color="'.$font.'" size="-1">'.$desc.'</font>').($nobreak!=1?'</tr>':'');
+ if ($nobreak==3) {
+ $inlineremote[10*$row+$col]="\n".
+ '<td width="50%" colspan="2" align="right" bgcolor="'.$tabbg.'">'.
+ '<a href="javascript:'.$act.';"><font color="'.$font.'" size="+1">'.$text.
+ '</font></a></td></tr>';
+ } elsif ($nobreak) {
+ $inlineremote[10*$row+$col]="\n<tr>".
+ '<td width="50%" colspan="2" align="left" bgcolor="'.$tabbg.'">'.
+ '<a href="javascript:'.$act.';"><font color="'.$font.'" size="+1">'.$text.
+ '</font></a></td>';
+ } else {
+ $inlineremote[10*$row+$col]="\n<tr>".
+ '<td width="50%" colspan="4" align="left" bgcolor="'.$tabbg.'">'.
+ '<a href="javascript:'.$act.';"><font color="'.$font.'">'.$desc.
+ '</font></a></td></tr>';
+ }
}
return '';
}