[LON-CAPA-cvs] cvs: loncom /html/res/adm/pages menu.html spacer.gif

www lon-capa-cvs@mail.lon-capa.org
Tue, 12 Nov 2002 16:31:40 -0000


www		Tue Nov 12 11:31:40 2002 EDT

  Modified files:              
    /loncom/html/res/adm/pages	menu.html spacer.gif 
  Log:
  Extended display in the making. Already works once.
  
  
Index: loncom/html/res/adm/pages/menu.html
diff -u loncom/html/res/adm/pages/menu.html:1.73 loncom/html/res/adm/pages/menu.html:1.74
--- loncom/html/res/adm/pages/menu.html:1.73	Tue Oct 29 15:57:31 2002
+++ loncom/html/res/adm/pages/menu.html	Tue Nov 12 11:31:40 2002
@@ -4,7 +4,7 @@
 Remote Control
 
 //
-// $Id: menu.html,v 1.73 2002/10/29 20:57:31 www Exp $
+// $Id: menu.html,v 1.74 2002/11/12 16:31:40 www Exp $
 //
 // Copyright Michigan State University Board of Trustees
 //
@@ -77,6 +77,7 @@
 var hr = new Array;
 var db = new Array;
 var dt = new Array;
+var ds = new Array;
 
 for (var i=1;i<=3;i++) {
    for (var j=1;j<=10;j++) {
@@ -84,6 +85,7 @@
       hr[index]='';
       db[index]='';
       dt[index]='';
+      ds[index]='';
    }
 }
 
@@ -211,12 +213,13 @@
    display();
 }
 
-function switchbutton(row,col,imgsrc,texttop,textbot,action) {
+function switchbutton(row,col,imgsrc,texttop,textbot,action,desc) {
    var idx=10*row+col;
    this.document['b'+idx].src="http://"+clienthost+imgpath+imgsrc;
    hr[idx]=action;
    dt[idx]=texttop;
    db[idx]=textbot;
+   ds[idx]=desc;
 } 
 
 function clearbut(row,col) {
@@ -225,6 +228,7 @@
    hr[idx]='javascript:defdis();';
    dt[idx]='';
    db[idx]='';
+   ds[idx]='';
 }
 
 function setstatus(tp,bt) {
@@ -347,6 +351,55 @@
    bmquery.document.close();
 }
 
+function extdisp() {
+   go('');
+   extdisp=window.open("http://"+clienthost+"/adm/rat/empty.html",
+               "ExtDisp", "width=400,height=450");
+   extdisp.document.clear();
+   extdisp.document.writeln(
+  '<html><body bgcolor="#666666" text="#DDDDDD" link="#666666">'+
+  '<h2>LON-CAPA Extended Display Remote Control</h2>'+
+  '<script>var currentURL="'+currentURL+'";self.focus();</script>'+
+  '<table border="2">');
+   for (var i=0; i<=ds.length; i++) {
+       if (typeof(ds[i])!='undefined') {
+          if (ds[i]!='') {
+             extdisp.document.writeln(
+                '<tr><td><a href="javascript:opener.'+
+                  hr[i]+';self.close();"><img border="0" src="'+
+                  this.document['b'+i].src+'" /><br />'+
+  '<table hspace="0" border="0" cellspacing="1" cellpadding="0"><tr>');
+             for (var j=0;j<=7;j++) {
+                if (j<dt[i].length) {
+                   ch=dt[i].charAt(j);
+                   if (ch==' ') { ch='space'; }
+                   if (ch=='-') { ch='hyphen'; }
+                   if (ch==':') { ch='colon'; }
+                   if (ch=='/') { ch='slash'; }
+                } else { ch='space'; }
+                extdisp.document.writeln('<td><img border="0" src="http://'
+                                    +clienthost+fontpath+ch+'.gif" /></td>');
+             }
+             extdisp.document.writeln('</tr><tr>');
+             for (var j=0;j<=7;j++) {
+                if (j<db[i].length) {
+                   ch=db[i].charAt(j);
+                   if (ch==' ') { ch='space'; }
+                   if (ch=='-') { ch='hyphen'; }
+                   if (ch==':') { ch='colon'; }
+                   if (ch=='/') { ch='slash'; }
+                } else { ch='space'; }
+                extdisp.document.writeln('<td><img border="0" src="http://'
+                                    +clienthost+fontpath+ch+'.gif" /></td>');
+            }
+            extdisp.document.writeln(
+  '</tr></table></td><td>'+ds[i]+'</td></tr>');
+          }
+       }
+   }
+   extdisp.document.writeln('</table></body></html>');
+   extdisp.document.close();
+}
 function edit_bookmarks() {
    go('');
    w_BookmarkPal_flag=1;
@@ -374,9 +427,9 @@
 </center>
 
 <center>
-<a href="javascript:defdis();"
+<a href="javascript:extdisp();"
    onMouseOver="defdis();"
-><img width="103" height="3" border="0" src="spacer.gif" /></a>
+><img width="104" height="10" border="0" src="spacer.gif" /></a>
 </center>
 
 <center>
@@ -475,12 +528,6 @@
 </tr>
 
 </table>
-</center>
-
-<center>
-<a href="javascript:defdis();"
-   onMouseOver="defdis();"
-><img width="103" height="3" border="0" src="spacer.gif" /></a>
 </center>
 
 <form name="server" action="/adm/logout" method="post" target="loncapaclient">
Index: loncom/html/res/adm/pages/spacer.gif