[LON-CAPA-cvs] cvs: loncom /interface lonmsg.pm

www lon-capa-cvs@mail.lon-capa.org
Sat, 13 Nov 2004 14:45:57 -0000


www		Sat Nov 13 09:45:57 2004 EDT

  Modified files:              
    /loncom/interface	lonmsg.pm 
  Log:
  Wire up scrolling menu.
  
  
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.116 loncom/interface/lonmsg.pm:1.117
--- loncom/interface/lonmsg.pm:1.116	Fri Nov 12 16:53:30 2004
+++ loncom/interface/lonmsg.pm	Sat Nov 13 09:45:57 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging
 #
-# $Id: lonmsg.pm,v 1.116 2004/11/12 21:53:30 albertel Exp $
+# $Id: lonmsg.pm,v 1.117 2004/11/13 14:45:57 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -534,7 +534,7 @@
 			      ($folder!~/^(new|critical)/?
    '<input type="submit" name="firstview" value="'.&mt('First').'" />'.
    '<input type="submit" name="prevview" value="'.&mt('Previous').'" />'.
-   '<input type="text" size="5" name="startdis" value="'.$startdis.'" />'.
+   '<input type="text" size="5" name="startdis" value="'.$startdis.'" onChange="this.form.submit()" />'.
    '<input type="submit" name="nextview" value="'.&mt('Next').'" />'.
    '<input type="submit" name="lastview" value="'.&mt('Last').'" />':'').
 	    '</form>';
@@ -1959,6 +1959,19 @@
     unless ($startdis) { $startdis=0; }
     $interdis=$ENV{'form.interdis'};
     unless ($interdis) { $interdis=20; }
+    if ($ENV{'form.firstview'}) {
+	$startdis=0;
+    }
+    if ($ENV{'form.lastview'}) {
+	$startdis=-1;
+    }
+    if ($ENV{'form.prevview'}) {
+	$startdis--;
+    }
+    if ($ENV{'form.nextview'}) {
+	$startdis++;
+    }
+
 
 # --------------------------------------------------------------- Render Output