[LON-CAPA-cvs] cvs: rat /client code.html

matthew lon-capa-cvs@mail.lon-capa.org
Tue, 12 Mar 2002 21:37:18 -0000


matthew		Tue Mar 12 16:37:18 2002 EDT

  Modified files:              
    /rat/client	code.html 
  Log:
  Attempt at fixing NS6.2 group import bug.  Now give full path to rat icons.
  
  
Index: rat/client/code.html
diff -u rat/client/code.html:1.50 rat/client/code.html:1.51
--- rat/client/code.html:1.50	Wed Mar  6 15:30:07 2002
+++ rat/client/code.html	Tue Mar 12 16:37:18 2002
@@ -4,7 +4,7 @@
 The LearningOnline Network
 Resource Assembly Tool
 //
-// $Id: code.html,v 1.50 2002/03/06 20:30:07 matthew Exp $
+// $Id: code.html,v 1.51 2002/03/12 21:37:18 matthew Exp $
 //
 // Copyright Michigan State University Board of Trustees
 //
@@ -124,6 +124,7 @@
                  // -1 means never yet opened/defined
                  
 var iconpath='/adm/lonIcons/';
+var raticons='/adm/rat/';
 
 function testfunction() {
    inf.document.forms.resinfo.elements.t.value="ABC";
@@ -970,25 +971,25 @@
         }
         parent.mapout.document.write
          ('<img border=0 width='+cw[ctype]+' height='+rh[1]
-          +' src="resource.gif">');
+          +' src="'+raticons+'resource.gif">');
         if ((mime!='') && (ext!='true')) {
            parent.mapout.document.write
-           ('<br><img border=0 src="left.gif"></a><a target="preview" href="'+
+           ('<br><img border=0 src="'+raticons+'left.gif"></a><a target="preview" href="'+
            url+'.meta"><img border=0 src="'+iconpath+
            'meta.gif"><a target="preview" href="'+url+
            '"><img border=0 src="'+iconpath+mime+'.gif">'+
-           '<img border=0 src="right.gif">');
+           '<img border=0 src="'+raticons+'right.gif">');
         } else {
            parent.mapout.document.write
-           ('<br><img border=0 src="middle.gif">');
+           ('<br><img border=0 src="'+raticons+'middle.gif">');
         }
         parent.mapout.document.write
-           ('<br><img border=0 src="bottom.gif">');
+           ('<br><img border=0 src="'+raticons+'bottom.gif">');
      } else {
         if (what=='c:') {
            parent.mapout.document.write
             ('<img border=0 width='+cw[ctype]+' height='+rh[rtype]
-             +' src="condition.gif">');          
+             +' src="'+raticons+'condition.gif">');          
         } else {
            if (what=='rs:') {
         mime='';
@@ -1003,20 +1004,20 @@
         }
               parent.mapout.document.write
                ('<img border=0 width='+cw[ctype]+' height='+rh[1]
-               +' src="start.gif">');
+               +' src="'+raticons+'start.gif">');
         if ((mime!='') && (ext!='true')) {
            parent.mapout.document.write
-           ('<br><img border=0 src="left.gif"></a><a target="preview" href="'+
+           ('<br><img border=0 src="'+raticons+'left.gif"></a><a target="preview" href="'+
            url+'.meta"><img border=0 src="'+iconpath+
            'meta.gif"><a target="preview" href="'+url+
            '"><img border=0 src="'+iconpath+mime+'.gif">'+
-           '<img border=0 src="right.gif">');
+           '<img border=0 src="'+raticons+'right.gif">');
         } else {
            parent.mapout.document.write
-           ('<br><img border=0 src="middle.gif">');
+           ('<br><img border=0 src="'+raticons+'middle.gif">');
         }
         parent.mapout.document.write
-           ('<br><img border=0 src="bottom.gif">');
+           ('<br><img border=0 src="'+raticons+'bottom.gif">');
 
            } else {
              if (what=='rf:') {
@@ -1032,24 +1033,24 @@
         }
                 parent.mapout.document.write
                 ('<img border=0 width='+cw[ctype]+' height='+rh[1]
-                +' src="finish.gif">');
+                +' src="'+raticons+'finish.gif">');
         if ((mime!='') && (ext!='true')) {
            parent.mapout.document.write
-           ('<br><img border=0 src="left.gif"></a><a target="preview" href="'+
+           ('<br><img border=0 src="'+raticons+'left.gif"></a><a target="preview" href="'+
            url+'.meta"><img border=0 src="'+iconpath+
            'meta.gif"><a target="preview" href="'+url+
            '"><img border=0 src="'+iconpath+mime+'.gif">'+
-           '<img border=0 src="right.gif">');
+           '<img border=0 src="'+raticons+'right.gif">');
         } else {
            parent.mapout.document.write
-           ('<br><img border=0 src="middle.gif">');
+           ('<br><img border=0 src="'+raticons+'middle.gif">');
         }
         parent.mapout.document.write
-           ('<br><img border=0 src="bottom.gif">');
+           ('<br><img border=0 src="'+raticons+'bottom.gif">');
              } else {
                 parent.mapout.document.write
                 ('<img border=0 width='+cw[ctype]+' height='+rh[rtype]
-                +' src="'+rtype+'.'+ctype+'.'+what+'.gif">');
+                +' src="'+raticons+rtype+'.'+ctype+'.'+what+'.gif">');
              }
            }
         }
@@ -1070,7 +1071,7 @@
       parent.mapout.document.write
          (
          '<img border=0 width='+cw[ctype]+' height='+rh[rtype]
-        +' src="'+rtype+'.'+ctype+'.empty.gif"></a>');
+        +' src="'+raticons+rtype+'.'+ctype+'.empty.gif"></a>');
    }
    parent.mapout.document.write('</td>');
  }
@@ -1421,7 +1422,7 @@
   inf.document.clear();
   inf.document.writeln(
    '<html><body bgcolor="#FFFFFF">'+
-   '<table><tr><td width=32><img src="info.gif"></td><td bgcolor="#AAFFAA">');
+   '<table><tr><td width=32><img src="'+raticons+'info.gif"></td><td bgcolor="#AAFFAA">');
   data1=infostr.split('&');
   if (data1[0]=='c') {
      inf.document.write('<b>Condition (');
@@ -1509,14 +1510,13 @@
    for (k=0;k<instring.length;k++) {
       thischar=instring.charAt(k);
       if (thischar==':') { thischar='&#58;'; }
-      if (thischar=='"') { thischar='&#34;'; }
+      if (thischar=='"') { thischar='&#34;'; }// "
       if (thischar=="'") { thischar='&#39;'; }
       if (thischar==',') { thischar='&#44;'; }
       outstring+=thischar;
    }
    return outstring;
 }
-// There must be a way to get rid of the odd number of "s
 
 // -------------------------------------------------- Insert resource into link
 function insertreslink(infostr) {
@@ -1658,7 +1658,7 @@
   inf.document.clear();
   inf.document.writeln(
    '<html><body bgcolor="#FFFFFF">'+
-   '<table><tr><td width=32><img src="edit.gif"></td><td bgcolor="#AAFFAA">');
+   '<table><tr><td width=32><img src="'+raticons+'edit.gif"></td><td bgcolor="#AAFFAA">');
   data1=infostr.split('&');
   if (data1[0]=='c') {
      inf.document.writeln('<b>Condition</b><hr>');
@@ -1830,7 +1830,7 @@
   inf.document.clear();
   inf.document.writeln(
    '<html><body bgcolor="#FFFFFF">'+
-   '<table><tr><td width=32><img src="edit.gif"></td><td bgcolor="#AAFFAA">'+
+   '<table><tr><td width=32><img src="'+raticons+'edit.gif"></td><td bgcolor="#AAFFAA">'+
    '<b>Empty Field</b><hr>');
 
         inf.document.writeln('<br><a href="javascript:opener.newresource('+