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

www lon-capa-cvs@mail.lon-capa.org
Thu, 01 May 2003 23:59:37 -0000


www		Thu May  1 19:59:37 2003 EDT

  Modified files:              
    /rat/client	parameter.html 
  Log:
  A little less color choices render a whole lot faster - but I am sure I am
  missing somebody's favorite color now, which justifies another war.
  
  
Index: rat/client/parameter.html
diff -u rat/client/parameter.html:1.22 rat/client/parameter.html:1.23
--- rat/client/parameter.html:1.22	Sat Apr 19 11:34:06 2003
+++ rat/client/parameter.html	Thu May  1 19:59:37 2003
@@ -3,7 +3,7 @@
 The LearningOnline Network with CAPA
 Parameter Input Window
 //
-// $Id: parameter.html,v 1.22 2003/04/19 15:34:06 www Exp $
+// $Id: parameter.html,v 1.23 2003/05/01 23:59:37 www Exp $
 //
 // Copyright Michigan State University Board of Trustees
 //
@@ -323,10 +323,10 @@
 
 function colorfield(ir,ig,ib) {
    var col=new Array;
-   col=["00","11","22","33","44","55","66","77","88","99","AA","BB","CC","DD","EE","FF"];
+   col=["00","11","22","44","66","88","AA","CC","DD","EE","FF"];
    var color='#'+col[ir]+col[ig]+col[ib];
-   var selection="   ";
-   if (color==svalue) { selection="X"; }
+   var selection="<font color='"+color+"'>X</font>";
+   if (color==svalue) { selection="<font color='#"+col[10-ir]+col[10-ig]+col[10-ib]+"'>X</font>"; }
    choicewrite('<td bgcolor="'+color+'"><a href="javascript:parent.pickcolor('+"'"+
                color+"'"+')">'+selection+'</a></td>');
                
@@ -534,13 +534,13 @@
       tablestart('Choose a Color');
       choicewrite('<table>');
       if (svalue) {
-         choicewrite('<tr><td colspan="10">Current choice:</td><td bgcolor="'+
-                     svalue+'" colspan="6">&nbsp;</td></tr>');
+         choicewrite('<tr><td colspan="9">Current choice:</td><td bgcolor="'+
+                     svalue+'" colspan="2">&nbsp;</td></tr>');
       }
-      for (var ir=1; ir<=15; ir++) {
-          for (var ig=1; ig<=15; ig++) {
+      for (var ir=0; ir<=10; ir++) {
+          for (var ig=0; ig<=10; ig++) {
               choicewrite('<tr>');
-              for (var ib=1; ib<=15; ib++) {
+              for (var ib=0; ib<=10; ib++) {
                   colorfield(ir,ig,ib);
 	      }
               choicewrite('</tr>');