[LON-CAPA-cvs] cvs: loncom /interface lonannounce.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Sat, 22 Apr 2006 16:35:32 -0000
albertel Sat Apr 22 12:35:32 2006 EDT
Modified files:
/loncom/interface lonannounce.pm
Log:
- the ... looked odd on short messages
Index: loncom/interface/lonannounce.pm
diff -u loncom/interface/lonannounce.pm:1.49 loncom/interface/lonannounce.pm:1.50
--- loncom/interface/lonannounce.pm:1.49 Sat Apr 22 12:32:55 2006
+++ loncom/interface/lonannounce.pm Sat Apr 22 12:35:31 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Announce
#
-# $Id: lonannounce.pm,v 1.49 2006/04/22 16:32:55 albertel Exp $
+# $Id: lonannounce.pm,v 1.50 2006/04/22 16:35:31 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -189,8 +189,9 @@
$fullmsg=~s/[\n\r]/\\n/gs;
$fullmsg=&HTML::Entities::encode($fullmsg,'<>&"\'');
$fullmsg=~s/&/\\&/g;
+ my $short_msg = substr($msg,0,20).((length($msg) > 20)?'...':'');
$output.='<a href="javascript:alert('."'$fullmsg'".')">'.
- substr($msg,0,20).'...</a><br />';
+ $short_msg.'</a><br />';
}
}
return '<td class="LC_calendar_day'.