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

version 1.94, 2025/06/26 01:28:48 version 1.95, 2025/06/28 13:55:43
Line 643  function addIpRule(iptype) { Line 643  function addIpRule(iptype) {
     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 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="12" name="setip'+iptype+'" onblur="parent.ipstringeval();" />'+"\n"+
                           '<a href="#" onclick="parent.removeIpRule(this,\''+iptype+'\')">Remove</a>';                            '<a href="#" onclick="parent.removeIpRule(this,\''+iptype+'\');return false;">Remove</a>';
         frame.document.getElementById('LC_string_ipacc_inner_'+iptype).appendChild(ipDiv);          innerDiv.appendChild(ipDiv);
     }      }
     return false;      return;
 }  }
   
 function removeIpRule(caller,iptype) {  function removeIpRule(caller,iptype) {
Line 655  function removeIpRule(caller,iptype) { Line 655  function removeIpRule(caller,iptype) {
     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 divToRemove = caller.closest('div');          var divToRemove = caller.closest('div');
         innerDiv.removeChild(divToRemove);          if (divToRemove) {
         ipstringeval();              innerDiv.removeChild(divToRemove);
               ipstringeval();
           }
     }      }
       return;
 }  }
   
 function radiostringeval(newval) {  function radiostringeval(newval) {
Line 1177  function draw() { Line 1180  function draw() {
             }              }
             var curripaccess = [currallow,currdeny];              var curripaccess = [currallow,currdeny];
             tablestart('IP Number/Name');              tablestart('IP Number/Name');
             choicewrite('<tr><th>Allow from</th><th>Deny from</th></tr><tr>');              choicewrite('<tr><th>Allow from</th><th>Deny from</th></tr><tr>'+"\n");
             var acctypes = ['allow','deny'];              var acctypes = ['allow','deny'];
             for (var i=0; i<acctypes.length; i++) {              for (var i=0; i<acctypes.length; i++) {
                 choicewrite('<td valign="top">'+                  choicewrite(['<td valign="top">',
                             '<div class="LC_string_ipacc_wrap" id="LC_string_ipacc_'+acctypes[i]+'">'+                               '<div>',
                             '<div class="LC_string_ipacc_inner" id="LC_string_ipacc_inner_'+acctypes[i]+'">');                               '<div id="LC_string_ipacc_inner_'+acctypes[i]+'">'].join("\n"));
                 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="12" name="setip'+acctypes[i]+'" value="'+curripaccess[i][j]+'" onblur="parent.ipstringeval();" />',
                     choicewrite('<a href="#" onclick="parent.removeIpRule(this,\''+acctypes[i]+'\')">Remove</a>');                                   '<a href="#" onclick="parent.removeIpRule(this,\''+acctypes[i]+'\');return false;">Remove</a>',
                     choicewrite('</div>');                                   '</div>'].join("\n"));
                 }                  }
                 choicewrite('</div><button onclick="parent.addIpRule(\''+acctypes[i]+'\');">Add item</button>');                  choicewrite('</div><button onclick="parent.addIpRule(\''+acctypes[i]+'\');return false;">Add item</button>'+"\n");
             }              }
             choicewrite('</div></td></tr></table>');              choicewrite('</div></td></tr></table>'+"\n");
         }          }
         if (pscat=='fileext') {          if (pscat=='fileext') {
             tablestart('Allowed File Extensions');              tablestart('Allowed File Extensions');

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


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