--- rat/client/parameter.html 2022/05/27 17:58:03 1.64.2.5.2.2 +++ rat/client/parameter.html 2023/12/29 21:09:58 1.64.2.5.2.4 @@ -5,7 +5,7 @@ The LearningOnline Network with CAPA Parameter Input Window // -// $Id: parameter.html,v 1.64.2.5.2.2 2022/05/27 17:58:03 raeburn Exp $ +// $Id: parameter.html,v 1.64.2.5.2.4 2023/12/29 21:09:58 raeburn Exp $ // // Copyright Michigan State University Board of Trustees // @@ -396,8 +396,8 @@ function validateInterval() { for (var i=0; i No
'); } + if (pscat=='tex') { + tablestart('TeX file display'); + choicewrite('Value:'); + choicewrite('
'); + choicewrite('
'); + } if (pscat=='ip') { var currallow = new Array; var currdeny = new Array; - if ((svalue != '') && (svalue != null)) { + if ((svalue != '') && (typeof(svalue) != 'undefined')) { var patternComma = /,/; var patternAllow = /^([\[\]a-zA-Z\.\d\*\-]+)$/; var patternDeny = /^\!([\[\]a-zA-Z\.\d\*\-]+)$/; @@ -1109,13 +1166,17 @@ function draw() { if (pscat=='deeplink') { var deeplinkvals = 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 dlinkkeyval = ''; var dlinklticdivsty = 'none'; var dlinkltiddivsty = 'none'; var dlinkmenusdivsty = 'none'; - if ((svalue != '') && (svalue != null)) { + var dlinkexitdivsty = 'none'; + var dlinkexittextval = ''; + if ((svalue != '') && (typeof(svalue) != 'undefined')) { deeplinkvals = svalue.split(','); if (ltikeyRegExp.test(deeplinkvals[4])) { linkprotectparts = deeplinkvals[4].split(':'); @@ -1132,8 +1193,20 @@ function draw() { if (deeplinkvals[5] >= 1) { 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 { - deeplinkvals = ['off','unhide','full','res','','0']; + deeplinkvals = ['off','unhide','full','res','','0','_self','no']; } var deeplinkstate = new Array(); deeplinkstate = ['only','off','both']; @@ -1157,6 +1230,7 @@ function draw() { deeplinktarget = ['_self','_top']; var deeplinktargettxt = new Array(); deeplinktargettxt = ['Embedded','Not embedded']; + var deeplinkexit = ['yes','url','no']; tablestart('Deep-linked items'); choicewrite('Access status?'); choicewrite(''); + choicewrite(''); + choicewrite('Exit Button?'); + choicewrite('
'); + choicewrite(' '); + choicewrite('
'); + choicewrite('
'); + choicewrite('
Button text: '); + choicewrite(''); + choicewrite('
'); choicewrite(''); } } @@ -1623,6 +1718,7 @@ function init() { else if (pscat == 'fileext') { sopt('fileext','File Extension'); } else if (pscat == 'useslots') { sopt('useslots','Slots control access'); } else if (pscat == 'deeplink') { sopt('deeplink','Deep-linked items'); } + else if (pscat == 'tex') { sopt('texdisplay','TeX File Display'); } else { pscat = 'any'; } if (pscat != 'deeplink') { sopt('any','String Value'); } }