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

raeburn raeburn at source.lon-capa.org
Sat May 21 16:08:35 EDT 2016


raeburn		Sat May 21 20:08:35 2016 EDT

  Modified files:              
    /rat/client	parameter.html 
  Log:
  - Modal parameter setting window for Client IP/Name Access Control,
    "Remove" link included for all textboxes. 
  
  
Index: rat/client/parameter.html
diff -u rat/client/parameter.html:1.73 rat/client/parameter.html:1.74
--- rat/client/parameter.html:1.73	Sat May 21 16:58:07 2016
+++ rat/client/parameter.html	Sat May 21 20:08:35 2016
@@ -5,7 +5,7 @@
 The LearningOnline Network with CAPA
 Parameter Input Window
 //
-// $Id: parameter.html,v 1.73 2016/05/21 16:58:07 raeburn Exp $
+// $Id: parameter.html,v 1.74 2016/05/21 20:08:35 raeburn Exp $
 //
 // Copyright Michigan State University Board of Trustees
 //
@@ -447,7 +447,7 @@
     svalue = '';
     for (var i=0; i<acctypes.length; i++) {
         var items = choices.document.getElementsByName('setip'+acctypes[i]);
-        if (items.length) {
+        if (items.length > 0) { 
             for (var j=0; j<items.length; j++) {
                 if (items[j].type == "text") {
                     var possip = items[j].value
@@ -466,7 +466,6 @@
             }
         }
     }
-    draw();
 }
 
 function addIpRule(iptype) {
@@ -1010,13 +1009,11 @@
                 var num=0;
                 for (var j=0; j<curripaccess[i].length; j++) {
                     choicewrite('<div><input type="text" size="10" name="setip'+acctypes[i]+'" value="'+curripaccess[i][j]+'" onblur="parent.ipstringeval();" />');
-                    if (num > 0) {
-                        choicewrite('<a href="#" onclick="parent.removeIpRule(\''+acctypes[i]+'\',\''+j+'\')">Remove</a>');
-                    }
+                    choicewrite('<a href="#" onclick="parent.removeIpRule(\''+acctypes[i]+'\',\''+j+'\')">Remove</a>');
                     choicewrite('</div>');
                     num ++;
                 }
-                choicewrite('</div><button onclick="parent.addIpRule(\''+acctypes[i]+'\');">Add more</button>');
+                choicewrite('</div><button onclick="parent.addIpRule(\''+acctypes[i]+'\');">Add item</button>');
             }
             choicewrite('</div></td></tr></table>');
         }




More information about the LON-CAPA-cvs mailing list