[LON-CAPA-cvs] cvs: loncom /interface lonmsg.pm
www
lon-capa-cvs@mail.lon-capa.org
Mon, 18 Mar 2002 18:38:04 -0000
www Mon Mar 18 13:38:04 2002 EDT
Modified files:
/loncom/interface lonmsg.pm
Log:
Check/Uncheck All messages to be deleted.
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.28 loncom/interface/lonmsg.pm:1.29
--- loncom/interface/lonmsg.pm:1.28 Sat Feb 16 14:59:10 2002
+++ loncom/interface/lonmsg.pm Mon Mar 18 13:38:04 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging
#
-# $Id: lonmsg.pm,v 1.28 2002/02/16 19:59:10 harris41 Exp $
+# $Id: lonmsg.pm,v 1.29 2002/03/18 18:38:04 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -40,7 +40,7 @@
# 07/27,07/28,07/30,08/03,08/06,08/08,08/09,08/10,8/13,8/15,
# 10/1,11/5 Gerd Kortemeyer
# YEAR=2002
-# 1/1 Gerd Kortemeyer
+# 1/1,3/18 Gerd Kortemeyer
#
package Apache::lonmsg;
@@ -355,8 +355,30 @@
sub disall {
my $r=shift;
- $r->print(
- '<h1>Display All Messages</h1><form method=post action="/adm/email">'.
+ $r->print(<<ENDDISHEADER);
+<script>
+ function checkall() {
+ for (i=0; i<document.forms.disall.elements.length; i++) {
+ if
+ (document.forms.disall.elements[i].name.indexOf('delmark_')==0) {
+ document.forms.disall.elements[i].checked=true;
+ }
+ }
+ }
+
+ function uncheckall() {
+ for (i=0; i<document.forms.disall.elements.length; i++) {
+ if
+ (document.forms.disall.elements[i].name.indexOf('delmark_')==0) {
+ document.forms.disall.elements[i].checked=false;
+ }
+ }
+ }
+</script>
+ENDDISHEADER
+ $r->print(
+ '<h1>Display All Messages</h1><form method=post name=disall '.
+ 'action="/adm/email">'.
'<table border=2><tr><th colspan=2> </th><th>Date</th>'.
'<th>Username</th><th>Domain</th><th>Subject</th><th>Status</th></tr>');
foreach (sort split(/\&/,&Apache::lonnet::reply('keys:'.
@@ -385,6 +407,8 @@
}
}
$r->print('</table><p>'.
+ '<a href="javascript:checkall()">Check All</a> '.
+ '<a href="javascript:uncheckall()">Uncheck All</a><p>'.
'<input type=submit name="markeddel" value="Delete Checked">'.
'</form></body></html>');
}