version 1.88, 2022/07/06 22:00:43
|
version 1.91, 2023/12/22 13:38:03
|
Line 422 function validateDeepLink() {
|
Line 422 function validateDeepLink() {
|
svalue += sform.deeplinkacc.options[sform.deeplinkacc.selectedIndex].value+','; |
svalue += sform.deeplinkacc.options[sform.deeplinkacc.selectedIndex].value+','; |
var keyRegExp = /^[a-zA-Z\d_.!@#$%^&*()+=-]+$/; |
var keyRegExp = /^[a-zA-Z\d_.!@#$%^&*()+=-]+$/; |
var numRegExp = /^\d+$/; |
var numRegExp = /^\d+$/; |
|
var exitTextRegExp = /^[^'":;,]+$/; |
if (sform.deeplinkprotect.length) { |
if (sform.deeplinkprotect.length) { |
for (var i=0; i<sform.deeplinkprotect.length; i++) { |
for (var i=0; i<sform.deeplinkprotect.length; i++) { |
if (sform.deeplinkprotect[i].checked) { |
if (sform.deeplinkprotect[i].checked) { |
Line 478 function validateDeepLink() {
|
Line 479 function validateDeepLink() {
|
} |
} |
svalue += ','; |
svalue += ','; |
svalue += sform.deeplinktarget.options[sform.deeplinktarget.selectedIndex].value; |
svalue += sform.deeplinktarget.options[sform.deeplinktarget.selectedIndex].value; |
|
svalue += ','; |
|
if (sform.deeplinkexit.length) { |
|
for (var i=0; i<sform.deeplinkexit.length; i++) { |
|
if (sform.deeplinkexit[i].checked) { |
|
if (sform.deeplinkexit[i].value == 'no') { |
|
svalue += sform.deeplinkexit[i].value; |
|
} else { |
|
var exittext = sform.deeplinkexittext.value; |
|
exittext = exittext.replace(/^\s+|\s+$/g,''); |
|
if ((exittext.length) && (exitTextRegExp.test(exittext))) { |
|
svalue += sform.deeplinkexit[i].value; |
|
if (exittext !== 'Exit Tool') { |
|
svalue += ':'+exittext; |
|
} |
|
} else { |
|
alert('Please enter the button text. Disallowed characters are ;,":\'\n'+ |
|
'or check "not in use" option for "Exit Tool Link"'); |
|
return; |
|
} |
|
} |
|
break; |
|
} |
|
} |
|
} |
assemble(); |
assemble(); |
} |
} |
|
|
Line 527 function toggleDeepLink(caller) {
|
Line 552 function toggleDeepLink(caller) {
|
} |
} |
} |
} |
} |
} |
|
if ((caller == 'exit') && (sform.deeplinkexit.length)) { |
|
var frame = window.frames["choices"]; |
|
for (var i=0; i<sform.deeplinkexit.length; i++) { |
|
if (sform.deeplinkexit[i].checked) { |
|
if (frame.document.getElementById('deeplinkexitdiv')) { |
|
if (sform.deeplinkexit[i].value == 'no') { |
|
frame.document.getElementById('deeplinkexitdiv').style.display='none'; |
|
sform.deeplinkexittext.value = ''; |
|
} else { |
|
frame.document.getElementById('deeplinkexitdiv').style.display='inline-block'; |
|
if (sform.deeplinkexittext.value == '') { |
|
sform.deeplinkexittext.value = 'Exit Tool'; |
|
} |
|
frame.document.getElementById('deeplinkexitdiv').scrollIntoView(); |
|
} |
|
} |
|
break; |
|
} |
|
} |
|
} |
} |
} |
|
|
function calldeeplink(caller) { |
function calldeeplink(caller) { |
Line 1093 function draw() {
|
Line 1138 function draw() {
|
if (svalue=='no') { choicewrite(' checked="checked"'); } |
if (svalue=='no') { choicewrite(' checked="checked"'); } |
choicewrite(' /> No</label><br />'); |
choicewrite(' /> No</label><br />'); |
} |
} |
|
if (pscat=='tex') { |
|
tablestart('TeX file display'); |
|
choicewrite('<tr><td>Value:</td><td colspan="2">'); |
|
choicewrite('<label><input name="stringval" value="tth"'+ |
|
' type="radio" '+callradiostringeval('tth')); |
|
if (svalue=='tth') { choicewrite(' checked="checked"'); } |
|
choicewrite(' /> tth (TeX to HTML)</label><br />'); |
|
choicewrite('<label><input name="stringval" value="mathjax"'+ |
|
' type="radio" '+callradiostringeval('mathjax')); |
|
if (svalue=='mathjax') { choicewrite(' checked="checked"'); } |
|
choicewrite(' /> MathJax</label><br />'); |
|
} |
if (pscat=='ip') { |
if (pscat=='ip') { |
var currallow = new Array; |
var currallow = new Array; |
var currdeny = new Array; |
var currdeny = new Array; |
Line 1183 function draw() {
|
Line 1240 function draw() {
|
if (pscat=='deeplink') { |
if (pscat=='deeplink') { |
var deeplinkvals = new Array(); |
var deeplinkvals = new Array(); |
var linkprotectparts = new Array(); |
var linkprotectparts = new Array(); |
var ltikeyRegExp = /^(ltic|ltid|key):(\w+)$/; |
var ltikeyRegExp = /^(ltic:\d+|ltid:\d+|key:[a-zA-Z\d_.!@#$%^&*()+=-]+)$/; |
|
var linkexitparts = new Array(); |
|
var dlinkexitRegExp = /^(yes|url|no)(|:[^:,;'"]+)$/; |
var dlinkkeysty = 'hidden'; |
var dlinkkeysty = 'hidden'; |
var dlinkkeyval = ''; |
var dlinkkeyval = ''; |
var dlinklticdivsty = 'none'; |
var dlinklticdivsty = 'none'; |
var dlinkltiddivsty = 'none'; |
var dlinkltiddivsty = 'none'; |
var dlinkmenusdivsty = 'none'; |
var dlinkmenusdivsty = 'none'; |
|
var dlinkexitdivsty = 'none'; |
|
var dlinkexittextval = ''; |
if ((svalue != '') && (typeof(svalue) != 'undefined')) { |
if ((svalue != '') && (typeof(svalue) != 'undefined')) { |
deeplinkvals = svalue.split(','); |
deeplinkvals = svalue.split(','); |
if (ltikeyRegExp.test(deeplinkvals[4])) { |
if (ltikeyRegExp.test(deeplinkvals[4])) { |
Line 1206 function draw() {
|
Line 1267 function draw() {
|
if (deeplinkvals[5] >= 1) { |
if (deeplinkvals[5] >= 1) { |
dlinkmenusdivsty = 'inline-block'; |
dlinkmenusdivsty = 'inline-block'; |
} |
} |
|
if (dlinkexitRegExp.test(deeplinkvals[7])) { |
|
linkexitparts = deeplinkvals[7].split(':'); |
|
deeplinkvals[7] = linkexitparts[0]; |
|
if (deeplinkvals[7] != 'no') { |
|
dlinkexitdivsty = 'inline-block'; |
|
if (!linkexitparts[1]) { |
|
dlinkexittextval = 'Exit Tool'; |
|
} else { |
|
dlinkexittextval = linkexitparts[1]; |
|
} |
|
} |
|
} |
} else { |
} else { |
deeplinkvals = ['off','unhide','full','res','','0']; |
deeplinkvals = ['off','unhide','full','res','','0','_self','no']; |
} |
} |
var deeplinkstate = new Array(); |
var deeplinkstate = new Array(); |
deeplinkstate = ['only','off','both']; |
deeplinkstate = ['only','off','both']; |
Line 1231 function draw() {
|
Line 1304 function draw() {
|
deeplinktarget = ['_self','_top']; |
deeplinktarget = ['_self','_top']; |
var deeplinktargettxt = new Array(); |
var deeplinktargettxt = new Array(); |
deeplinktargettxt = ['Embedded','Not embedded']; |
deeplinktargettxt = ['Embedded','Not embedded']; |
|
var deeplinkexit = ['yes','url','no']; |
tablestart('Deep-linked items'); |
tablestart('Deep-linked items'); |
choicewrite('<tr><td>Access status?</td><td>'); |
choicewrite('<tr><td>Access status?</td><td>'); |
choicewrite('<select name="deeplinkstate">'); |
choicewrite('<select name="deeplinkstate">'); |
Line 1422 function draw() {
|
Line 1496 function draw() {
|
choicewrite('>'+deeplinktargettxt[i]+'</option>'); |
choicewrite('>'+deeplinktargettxt[i]+'</option>'); |
} |
} |
choicewrite('</select>'); |
choicewrite('</select>'); |
|
choicewrite('</td></tr>'); |
|
choicewrite('<tr><td>Exit Button?</td><td>'); |
|
choicewrite('<span style="white-space: nowrap;"><label>'); |
|
choicewrite('<input name="deeplinkexit" value="no"'+ |
|
' type="radio" '+calldeeplink('exit')); |
|
if (deeplinkvals[7]=='no') { choicewrite(' checked="checked"'); } |
|
choicewrite(' />not in use</label></span><br />'); |
|
choicewrite('<span style="white-space: nowrap;"><label>'); |
|
choicewrite('<input name="deeplinkexit" value="yes"'+ |
|
' type="radio" '+calldeeplink('exit')); |
|
if (deeplinkvals[7]=='yes') { choicewrite(' checked="checked"'); } |
|
choicewrite(' />in use, no redirect</label></span> '); |
|
choicewrite('<span style="white-space: nowrap;"><label>'); |
|
choicewrite('<input name="deeplinkexit" value="url"'+ |
|
' type="radio" '+calldeeplink('exit')); |
|
if (deeplinkvals[7]=='url') { choicewrite(' checked="checked"'); } |
|
choicewrite(' />in use, redirect to URL</label></span><br />'); |
|
choicewrite('<div id="deeplinkexitdiv" style="display:'+dlinkexitdivsty+'">'); |
|
choicewrite('<br /><span style="white-space: nowrap;">Button text: '); |
|
choicewrite('<input type="text" name="deeplinkexittext" id="deeplinkexittext" value="'+dlinkexittextval+'" size="10" />'); |
|
choicewrite('</span></div>'); |
choicewrite('</td></tr></table>'); |
choicewrite('</td></tr></table>'); |
} |
} |
} |
} |
Line 1752 function init() {
|
Line 1847 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 { pscat = 'any'; } |
else { pscat = 'any'; } |
if (pscat != 'deeplink') { sopt('any','String Value'); } |
if (pscat != 'deeplink') { sopt('any','String Value'); } |
} |
} |