[LON-CAPA-cvs] cvs: loncom /html/res/adm/pages menu.html /interface lonfeedback.pm /xml lonxml.pm

www lon-capa-cvs@mail.lon-capa.org
Fri, 11 Oct 2002 20:52:13 -0000


www		Fri Oct 11 16:52:13 2002 EDT

  Modified files:              
    /loncom/html/res/adm/pages	menu.html 
    /loncom/interface	lonfeedback.pm 
    /loncom/xml	lonxml.pm 
  Log:
  The wonderful "You got messages" display.
  
  
Index: loncom/html/res/adm/pages/menu.html
diff -u loncom/html/res/adm/pages/menu.html:1.70 loncom/html/res/adm/pages/menu.html:1.71
--- loncom/html/res/adm/pages/menu.html:1.70	Fri Oct 11 15:27:00 2002
+++ loncom/html/res/adm/pages/menu.html	Fri Oct 11 16:52:13 2002
@@ -4,7 +4,7 @@
 Remote Control
 
 //
-// $Id: menu.html,v 1.70 2002/10/11 19:27:00 www Exp $
+// $Id: menu.html,v 1.71 2002/10/11 20:52:13 www Exp $
 //
 // Copyright Michigan State University Board of Trustees
 //
@@ -45,6 +45,7 @@
 var statusbot = '';
 var active = 0;
 var dislocked = 1;
+var statuslocked = 0;
 
 var imgpath='/res/adm/pages/';
 var fontpath='/adm/lonLCDfont/';
@@ -97,30 +98,30 @@
 function advanceclock() {
     var clock=new Date();
     clock.setTime(clock.getTime()+clockdelta);
+    if (!statuslocked) {
+       var days=""+clock.getDate();
+       if (days.length<2) { days="0"+days; }
+       var mons=""+(clock.getMonth()+1);
+       if (mons.length<2) { mons="0"+mons; }
+       var years=""+clock.getYear();
+
+       if (years>1000) {
+          years=years.substring(2,4);
+       } else {
+          years=years.substring(1,3);
+       }
+       statustop=mons+'/'+days+'/'+years;
+
+       var secs=""+clock.getSeconds();
+       if (secs.length<2) { secs="0"+secs; }
+       var mins=""+clock.getMinutes();
+       if (mins.length<2) { mins="0"+mins; }
+       var hours=""+clock.getHours();
+       if (hours.length<2) { hours=" "+hours; }
+       statusbot=hours+':'+mins+':'+secs;
 
-    var days=""+clock.getDate();
-    if (days.length<2) { days="0"+days; }
-    var mons=""+(clock.getMonth()+1);
-    if (mons.length<2) { mons="0"+mons; }
-    var years=""+clock.getYear();
-
-    if (years>1000) {
-       years=years.substring(2,4);
-    } else {
-       years=years.substring(1,3);
+       if (!dislocked) { showdisplay(); }
     }
-    statustop=mons+'/'+days+'/'+years;
-
-    var secs=""+clock.getSeconds();
-    if (secs.length<2) { secs="0"+secs; }
-    var mins=""+clock.getMinutes();
-    if (mins.length<2) { mins="0"+mins; }
-    var hours=""+clock.getHours();
-    if (hours.length<2) { hours=" "+hours; }
-    statusbot=hours+':'+mins+':'+secs;
-
-    if (!dislocked) { showdisplay(); }
-
     setTimeout('advanceclock();',1000);
 }
 
@@ -230,6 +231,7 @@
    this.document['led'].src="http://"+clienthost+imgpath+"ledblink.gif";
    statustop=tp;
    statusbot=bt;
+   statuslocked=1;
    defdis();
    endsend();
 }
@@ -272,6 +274,7 @@
 
 function go(url) {
    windowcheck();
+   statuslocked=0;
    this.document['led'].src="ledsend.gif";
    if (url!='' && url!= null) {
        currentURL = null;
@@ -282,7 +285,8 @@
 
 function gopost(url,postdata) {
    windowcheck();
-   this.document['led'].src="ledsend.gif";
+   statuslocked=0;
+   this.document['led'].src="http://"+clienthost+imgpath+"ledsend.gif";
    if (url!='') {
       this.document.server.action="http://"+clienthost+url;
       this.document.server.postdata.value=postdata;
@@ -295,7 +299,8 @@
 
 function gocmd(url,cmd) {
    windowcheck();
-   this.document['led'].src="ledsend.gif";
+   statuslocked=0;
+   this.document['led'].src="http://"+clienthost+imgpath+"ledsend.gif";
    if (url!='') {
       this.document.server.action="http://"+clienthost+url;
       this.document.server.postdata.value='';
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.33 loncom/interface/lonfeedback.pm:1.34
--- loncom/interface/lonfeedback.pm:1.33	Thu Oct  3 11:04:29 2002
+++ loncom/interface/lonfeedback.pm	Fri Oct 11 16:52:13 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.33 2002/10/03 15:04:29 www Exp $
+# $Id: lonfeedback.pm,v 1.34 2002/10/11 20:52:13 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -294,7 +294,7 @@
     if ($_) {
       my $declutter=&Apache::lonnet::declutter($feedurl);
       unless (&Apache::lonmsg::user_normal_msg(split(/\:/,$_),
-               'Feedback ['.$declutter.']',$email,$citations) eq 'ok') {
+               'Feedback ['.$declutter.']',$email,$citations)=~/ok/) {
 	$status.='<br>Error sending message to '.$_.'<br>';
       } else {
 	$sendsomething++;
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.200 loncom/xml/lonxml.pm:1.201
--- loncom/xml/lonxml.pm:1.200	Fri Oct 11 16:09:36 2002
+++ loncom/xml/lonxml.pm	Fri Oct 11 16:52:13 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.200 2002/10/11 20:09:36 www Exp $
+# $Id: lonxml.pm,v 1.201 2002/10/11 20:52:13 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -385,7 +385,7 @@
     if ($ENV{'browser.type'} eq 'explorer') { $nothing='javascript:void(0);'; }
     my $newmail='';
     if (&Apache::lonmsg::newmail()) { 
-       $newmail='menu.setstatus("you have","got mail");';
+       $newmail='menu.setstatus("you have","messages");';
     }
     my $timesync='menu.syncclock(1000*'.time.');';
     if (($ENV{'REQUEST_URI'}!~/^\/(res\/)*adm\//) || ($forcereg)) {