version 1.91, 2023/12/22 13:38: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>'); |
Line 1847 function init() {
|
Line 1842 function init() {
|
else if (pscat == 'fileext') { sopt('fileext','File Extension'); } |
else if (pscat == 'fileext') { sopt('fileext','File Extension'); } |
else if (pscat == 'useslots') { sopt('useslots','Slots control access'); } |
else if (pscat == 'useslots') { sopt('useslots','Slots control access'); } |
else if (pscat == 'deeplink') { sopt('deeplink','Deep-linked items'); } |
else if (pscat == 'deeplink') { sopt('deeplink','Deep-linked items'); } |
else if (pscat == 'tex') { sopt('texdisplay','TeX File Display'); } |
else if (pscat == 'tex') { sopt('texdisplay','TeX File Display'); } |
else { pscat = 'any'; } |
else { pscat = 'any'; } |
if (pscat != 'deeplink') { sopt('any','String Value'); } |
if (pscat != 'deeplink') { sopt('any','String Value'); } |
} |
} |