Diff for /rat/client/parameter.html between versions 1.92 and 1.94

version 1.92, 2023/12/29 21:06:03 version 1.94, 2025/06/26 01:28:48
Line 642  function addIpRule(iptype) { Line 642  function addIpRule(iptype) {
     var frame = window.frames["choices"];      var frame = window.frames["choices"];
     if (frame.document.getElementById('LC_string_ipacc_inner_'+iptype)) {      if (frame.document.getElementById('LC_string_ipacc_inner_'+iptype)) {
         var innerDiv = frame.document.getElementById('LC_string_ipacc_inner_'+iptype);          var innerDiv = frame.document.getElementById('LC_string_ipacc_inner_'+iptype);
         var count = innerDiv.childNodes.length   
         var ipDiv = frame.document.createElement('div');          var ipDiv = frame.document.createElement('div');
         ipDiv.innerHTML = '<input type="text" size="10" name="setip'+iptype+'" onblur="parent.ipstringeval();" />'+          ipDiv.innerHTML = '<input type="text" size="10" name="setip'+iptype+'" onblur="parent.ipstringeval();" />'+
                           '<a href="#" onclick="parent.removeIpRule(\''+iptype+'\',\''+count+'\')">Remove</a>';                            '<a href="#" onclick="parent.removeIpRule(this,\''+iptype+'\')">Remove</a>';
         frame.document.getElementById('LC_string_ipacc_inner_'+iptype).appendChild(ipDiv);          frame.document.getElementById('LC_string_ipacc_inner_'+iptype).appendChild(ipDiv);
     }      }
     return false;      return false;
 }  }
   
 function removeIpRule(iptype,num) {  function removeIpRule(caller,iptype) {
     var frame = window.frames["choices"];      var frame = window.frames["choices"];
     if (frame.document.getElementById('LC_string_ipacc_inner_'+iptype)) {      if (frame.document.getElementById('LC_string_ipacc_inner_'+iptype)) {
         var innerDiv = frame.document.getElementById('LC_string_ipacc_inner_'+iptype);          var innerDiv = frame.document.getElementById('LC_string_ipacc_inner_'+iptype);
         for (var i=0; i<innerDiv.childNodes.length; i++) {          var divToRemove = caller.closest('div');
             if (i==num) {          innerDiv.removeChild(divToRemove);
                 innerDiv.removeChild(innerDiv.childNodes[i]);          ipstringeval();
                 ipstringeval();  
                 break;  
             }  
         }  
     }      }
 }  }
   
Line 1190  function draw() { Line 1185  function draw() {
                             '<div class="LC_string_ipacc_inner" id="LC_string_ipacc_inner_'+acctypes[i]+'">');                              '<div class="LC_string_ipacc_inner" id="LC_string_ipacc_inner_'+acctypes[i]+'">');
                 for (var j=0; j<curripaccess[i].length; j++) {                  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();" />');                      choicewrite('<div><input type="text" size="10" name="setip'+acctypes[i]+'" value="'+curripaccess[i][j]+'" onblur="parent.ipstringeval();" />');
                     choicewrite('<a href="#" onclick="parent.removeIpRule(\''+acctypes[i]+'\',\''+j+'\')">Remove</a>');                      choicewrite('<a href="#" onclick="parent.removeIpRule(this,\''+acctypes[i]+'\')">Remove</a>');
                     choicewrite('</div>');                      choicewrite('</div>');
                 }                  }
                 choicewrite('</div><button onclick="parent.addIpRule(\''+acctypes[i]+'\');">Add item</button>');                  choicewrite('</div><button onclick="parent.addIpRule(\''+acctypes[i]+'\');">Add item</button>');

Removed from v.1.92  
changed lines
  Added in v.1.94


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>