profoundjs 7.7.0 → 7.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/htdocs/profoundui/proddata/js/designer.js +3720 -3721
- package/htdocs/profoundui/proddata/js/runtime.js +305 -304
- package/package.json +2 -2
- package/profound.jse +1 -1
- package/setup/pjsdist.savf +0 -0
|
@@ -3,7 +3,7 @@ pui.is_ios=Za.indexOf("iphone")!=-1||Za.indexOf("ipad")!=-1||Za.indexOf("ipod")!
|
|
|
3
3
|
pui.is_touch="ontouchstart"in window;pui.touchDevice=pui.is_touch;pui.is_mouse_capable=false;pui.designer={};pui.designer["initial keywords"]=[];pui.designer.currentDisplay={};pui.ide={};pui.cloud={};pui.cloud.views={};pui.social={};pui.cnv={};pui.cnv.Wz={};pui.Ef={};pui.toolbox={};pui.toolbox.add=la();pui["field exit key"]=107;pui["field exit minus key"]=109;pui["no connection status"]=false;pui["client side timeout"]=true;
|
|
4
4
|
pui.zq={"*ISO":1,"*USA":2,"*EUR":3,"*JIS":4,"*MDY":5,"*DMY":6,"*YMD":7,"*JUL":8,"*JOB":10};pui.Aq={"/":1,"-":2,".":3,",":4," ":5,"*BLANK":5,"*JOB":7};pui.Bq={"*ISO":1,"*USA":2,"*EUR":3,"*JIS":4,"*HMS":9};pui.Cq={".":3,",":4," ":5,"*BLANK":5,":":6,"*JOB":7};pui.fa=false;pui.Gz=null;pui["function key pattern"]="^(F|CA|CF|CK|CMD)([0-9]{1,2})([=:-])(.*)$";pui["special key pattern"]="^(Enter|PageUp|PageDown|Rollup|RollDown|RollDn|PgUp|PgDn|Help|Print)([=-])(.*)$";pui.Sp=0;
|
|
5
5
|
pui["session timeout retries"]=0;pui.Az=0;pui.bj=false;pui.uz="profoundjs.com";pui.lz="http://www.w3.org/2000/svg";pui.xp={};pui["text file name pattern"]=/.+\.(css|js|json|html|htm|xml|txt|csv|sh|md|sql|scn|lst|xml|conf|php|log|ts|less|scss|cpp|ejs|vue|ts|jsx)$/i;pui["always allow field exit"]=false;pui.dup={};pui.dup["char"]="\u25cf";pui.dup.keyCode=45;pui.dup.shift=true;pui.dup.ctrl=false;pui.dup.alt=false;
|
|
6
|
-
pui.wf={rA:{},FA:{},plugins:{},addPlugin:function(b){var a=pui.wf.plugins,c=b.category;a[c]||(a[c]={});a[c][b.name]=b}};pui["add combo style properties to choice list"]=true;pui.viewdesigner=false;pui.nodedesigner=false;if(window.pui_cloud_designer)pui.nodedesigner=true;else if(location.pathname.match(/^\/ide/i))pui.nodedesigner=true;else{var pb=location.pathname.match(/\/([^\/]+)\/?$/i);if(pb&&pb[1].toLowerCase()==="viewdesigner")pui.viewdesigner=true;else if(pb&&pb[1].toLowerCase()==="nodedesigner")pui.nodedesigner=true}pui.Mn=false;window.pui||(window.pui={});window.pui.baseVersion="6";window.pui.fixPackVersion="26.0";window.pui.version=window.pui.baseVersion+"."+window.pui.fixPackVersion;function
|
|
6
|
+
pui.wf={rA:{},FA:{},plugins:{},addPlugin:function(b){var a=pui.wf.plugins,c=b.category;a[c]||(a[c]={});a[c][b.name]=b}};pui["add combo style properties to choice list"]=true;pui.viewdesigner=false;pui.nodedesigner=false;if(window.pui_cloud_designer)pui.nodedesigner=true;else if(location.pathname.match(/^\/ide/i))pui.nodedesigner=true;else{var pb=location.pathname.match(/\/([^\/]+)\/?$/i);if(pb&&pb[1].toLowerCase()==="viewdesigner")pui.viewdesigner=true;else if(pb&&pb[1].toLowerCase()==="nodedesigner")pui.nodedesigner=true}pui.Mn=false;window.pui||(window.pui={});window.pui.baseVersion="6";window.pui.fixPackVersion="26.0";window.pui.version=window.pui.baseVersion+"."+window.pui.fixPackVersion;function wb(b){if(b.touches!=null&&b.touches.length==1)return b.touches[0].target;b=b.target;if(b.nodeType==3)b=b.parentNode;return b}function xb(b){b.preventDefault();b.stopPropagation()}pui.Ee=function(b){xb(b);return false};function yb(b){for(var a=Array(256),c=0;c<=255;c++)a[c]=c;zb(a,b)}
|
|
7
7
|
function Cb(b){var a;if(typeof b=="string")b=Db(b);if(b==null)return-1;if(b.tagName!="INPUT"||!pui.Si(b))return-1;if(document.selection!=null){if(b==null)b=document.activeElement;a=document.selection.createRange()}var c=0;if(b!=null&&a!=null&&b.createTextRange!=null)try{var e=b.createTextRange();if(e){for(;a.compareEndPoints("StartToStart",e)>0;){e.moveStart("character",1);c++}return c}}catch(f){return-1}else if(b!=null)try{if(b.selectionStart!=null)return b.selectionStart}catch(h){}return-1}
|
|
8
8
|
function Fb(){if(pui.ide&&pui.ide.designerId)return true;if(Ib==null)return false;if(Ib.designer==null)return false;return true}
|
|
9
9
|
function Kb(b,a){var c,e="",f="",h,g=false;if(b.uf()!=200){c="HTTP "+b.uf();e=b.As()+"."}else{g=b.yc().indexOf("<?xml")!=-1;if(g==false)try{h=eval("("+b.yc()+")");if(h.success!=true){c=h.errorId;e=h.errorText;f=h.errorText2}}catch(l){c="CPF9897";e="The server response is missing or invalid."}}if(c!=null){Ya.push({Dl:a,id:c,text:e,tm:f});return false}else return g==true?b.yc():h.response}
|
|
@@ -18,11 +18,11 @@ if(location.origin===undefined){pui.fq=location.protocol+"//"+location.hostname+
|
|
|
18
18
|
String.prototype.includes||Object.defineProperty(String.prototype,"includes",{value:function(b,a){if(b instanceof RegExp)throw TypeError("first argument must not be a RegExp");if(a===undefined)a=0;return this.indexOf(b,a)!==-1}});String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{value:function(b,a){var c=a>0?a|0:0;return this.substring(c,c+b.length)===b}});
|
|
19
19
|
pui.Li=function(b,a){var c=b[a];if(c==null){var e=a.split(" "),f=Number(e[e.length-1]);if(!isNaN(f)&&f>0){e.pop();e=b[e.join(" ")];if(e!=null){c={};for(var h in e){f=e[h];if(h=="name")c.name=a;else if(typeof f=="object"&&f.length!=null){c[h]=[];for(var g=0;g<f.length;g++)c[h].push(f[g])}else c[h]=e[h]}}}}return c};pui.ie=function(b,a){for(var c=0;c<b.length;c++)if(b[c]==a)return c;return-1};pui.oz=function(b,a){for(var c=0;c<b.length;c++)a(b[c])};
|
|
20
20
|
pui.Vd=function(b,a){if(a==null)a=0;var c=parseInt(b,10);if(isNaN(c))c=a;return c};
|
|
21
|
-
pui.Ce=function(){var b={9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"Caps Lock",27:"Esc",33:"Page Up",34:"Page Down",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",45:"Insert",3:"Enter",63234:"Left",63235:"Right",63232:"Up",63233:"Down",63276:"Page Up",63277:"Page Down",63272:"Delete",63273:"Home",63275:"End"};return function(a,c){var e=a.key||String.fromCharCode(a.charCode||a.keyCode);a.ctrlKey||e&&e.length>1||!e&&!a.key&&b[a.keyCode]||c.test(e)||
|
|
22
|
-
function
|
|
23
|
-
f?goPrev(e,0,true):goNext(e,true)){
|
|
24
|
-
return false}}else{if(e.tagName!="TEXTAREA"){goNext(e);
|
|
25
|
-
return false}if(a.ctrlKey==true&&(c==67||c==86))return true;for(e=0;e<b.length;e++)if(b[e]==c)if(!(a.Ff&&Event.fk))return true;
|
|
21
|
+
pui.Ce=function(){var b={9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"Caps Lock",27:"Esc",33:"Page Up",34:"Page Down",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",45:"Insert",3:"Enter",63234:"Left",63235:"Right",63232:"Up",63233:"Down",63276:"Page Up",63277:"Page Down",63272:"Delete",63273:"Home",63275:"End"};return function(a,c){var e=a.key||String.fromCharCode(a.charCode||a.keyCode);a.ctrlKey||e&&e.length>1||!e&&!a.key&&b[a.keyCode]||c.test(e)||xb(a)}}();
|
|
22
|
+
function zb(b,a){if(R=="genie"&&pui.F.Qz(a)!="")return true;if(R=="dspf"){var c;a:{c=a.keyCode;for(var e=0;e<b.length;e++)if(b[e]==c)if(!(a.Ff&&Event.fk)){c=true;break a}a.preventDefault();a.stopPropagation();c=false}return c}var f,h;c=a.keyCode;e=a.target;var g=pui.Si(e);if(pui.F.Id){if(pui.F.config.Bz){if(a.Ff)f=a.Ff&&Event.fk;if(!a.Ff)f=a.shiftKey;f?keyAhead.record("shift"+c):keyAhead.record(c)}xb(a);return false}lastActiveElement=e;if(c==9){if(a.Ff)f=a.Ff&&Event.fk;if(!a.Ff)f=a.shiftKey;if(f=
|
|
23
|
+
f?goPrev(e,0,true):goNext(e,true)){xb(a);return false}}else if(c==35&&g){if(e.value!=Qb(e.value))e.value=Qb(e.value)}else if(c==37)if(g){h=Cb(e);if(h==0){goPrev(e);xb(a);return false}}else{if(e.tagName!="TEXTAREA"){goPrev(e);xb(a);return false}}else if(c==38&&e.tagName!="SELECT"&&e.tagName!="TEXTAREA"){if(e.kc==null||e.kc.gl()==false)if(!pui.F.config.Yg){goUp(e);xb(a);return false}}else if(c==39)if(g){maxLength=Number(e.getAttribute("maxLength"));h=Cb(e);f=e.value.length;if(h>=f){goNext(e);xb(a);
|
|
24
|
+
return false}}else{if(e.tagName!="TEXTAREA"){goNext(e);xb(a);return false}}else if(c==40&&e.tagName!="SELECT"&&e.tagName!="TEXTAREA"){if(e.kc==null||e.kc.gl()==false)if(!pui.F.config.Yg){goDown(e);xb(a);return false}}else if(c==45&&pui.is_ie&&g&&R=="genie"&&a.shiftKey!=true&&a.ctrlKey!=true){f=e.selectionEnd;h=e.value.substring(0,f);h+=Qb(e.value.substring(f));e.value=h;e.setSelectionRange(f,f)}if(g&&pui.gx(a)){pui.aq(e);if(c==pui["field exit minus key"]&&Rb(e,true)){xb(a);return false}Rb(e);xb(a);
|
|
25
|
+
return false}if(a.ctrlKey==true&&(c==67||c==86))return true;for(e=0;e<b.length;e++)if(b[e]==c)if(!(a.Ff&&Event.fk))return true;xb(a);return false}
|
|
26
26
|
function Rb(b,a){if(b.readOnly==true)return false;var c,e=false,f=b.getAttribute("signedNumeric"),h=b.getAttribute("num");h=h==="011"||h==="101"||h==="111";var g=false;if(a&&(f==null||f!="Y")&&!h)return false;c=b.Tn;if(pui.is_touch&&!pui.is_mouse_capable)c=Cb(b);if(c==null)return false;if(c<0)return false;if(c>=0){g=b.value!==b.value.substr(0,c);b.value=b.value.substr(0,c);c=b.getAttribute("blankFill");if(f!=null&&f=="Y"||h)c="Y";if(c!=null&&c=="Y"){e=true;fill=" "}c=
|
|
27
27
|
b.getAttribute("zeroFill");if(c!=null&&c=="Y"){e=true;fill="00000000000000000000000000000000000000000000000000000000000000000000000000000000"}c=b.getAttribute("maxLength");if(e&&c!=null){e=fill+Vb(b.value);e=e.substr(e.length-c);if(f!=null&&f=="Y"||a&&h)if(e.substr(e.length-1)!="-"){e+=a?"-":" ";e=e.substr(1)}b.value=e}}g&&typeof b.onchange==="function"&&b.onchange();b.getAttribute("autoenter")==="Y"?Wb("enter"):goNext(b);return true}
|
|
28
28
|
pui.wr=function(b){if(!(pui.is_touch&&!pui.is_mouse_capable||pui.pa))if(pui.dj==null)if(pui.confirmOnClose&&!pui.skipConfirm)if(!(R=="genie"&&pui.dA())){for(var a=window;a!=null&&a!=a.parent;){a=a.parent;if(pui.jg(a))return;try{if(typeof a.pui!="undefined")return}catch(c){}}if(pui.F!=null||!pui.designer.Im||R=="dspf"&&pui.designer.Im&&typeof pui.ide.isDirty==="function"&&pui.ide.isDirty()){a=pui.Mn?pui.closeMessage:pui.getLanguageText("runtimeMsg","closeMessage");if(R=="genie"&&pui.F.config.closeMessage!=
|
|
@@ -32,7 +32,7 @@ new Blob([(b?"hardshutdown=1":"shutdown=1")+(pui.isCloud?"&workspace_id="+pui.cl
|
|
|
32
32
|
pui.tr=function(){if(window.addEventListener){window.addEventListener("beforeunload",pui.wr,false);if(!pui.designer.Im||pui.F!=null)window.addEventListener("unload",pui.unload,false)}else if(window.attachEvent){window.attachEvent("onbeforeunload",pui.wr);if(!pui.designer.Im||pui.F!=null)window.attachEvent("onunload",pui.unload)}};
|
|
33
33
|
pui.Nk=function(b,a,c){var e=document.createElement("form");e.action=Xb("PUI0009106.pgm")+"?contentType="+b+"&fileName="+a;if(pui.isCloud)e.action+="&workspace_id="+pui.cloud.ws.id;e.method="post";b=Zb("input","data");b.type="hidden";b.value=c;e.appendChild(b);document.body.appendChild(e);pui.skipConfirm=true;e.submit();setTimeout(function(){e.parentNode.removeChild(e);pui.skipConfirm=false},0)};
|
|
34
34
|
pui.Q=function(b,a){var c=b.className;if(c==null)c="";c=c.split(" ");for(var e=[],f=0;f<c.length;f++){if(c[f]==a)return;c[f]!=""&&e.push(c[f])}e.push(a);b.className=e.join(" ")};pui.da=function(b,a){b.className=pui.Cp(b.className,a)};pui.Cp=function(b,a,c){if(b==null)return"";if(b=="")return"";if(c==null||c=="")c=" ";b=b.split(c);c=[];for(var e=0;e<b.length;e++)b[e]!=""&&b[e]!=a&&c.push(b[e]);return c.join(" ")};
|
|
35
|
-
pui.By=function(b,a){if(!(b.readOnly||b.disabled))if(!(a==null||a==null)){var c=b;if(c.comboBoxWidget!=null)c=c.comboBoxWidget.getBox();if(c.l!=null)c=c.l.getBox();c.emptyText=a;pui.le(c);U(c,"focus",function(e){e=
|
|
35
|
+
pui.By=function(b,a){if(!(b.readOnly||b.disabled))if(!(a==null||a==null)){var c=b;if(c.comboBoxWidget!=null)c=c.comboBoxWidget.getBox();if(c.l!=null)c=c.l.getBox();c.emptyText=a;pui.le(c);U(c,"focus",function(e){e=wb(e);if(e.value==e.emptyText){e.value="";pui.da(e,"empty-text")}});U(c,"blur",function(e){pui.le(wb(e))})}};
|
|
36
36
|
pui.le=function(b){if(!(b.readOnly||b.disabled))if(!(b.emptyText==null||b.emptyText==null)){if(b.value=="")b.value=b.emptyText;b.value==b.emptyText?pui.Q(b,"empty-text"):pui.da(b,"empty-text")}};
|
|
37
37
|
pui.Kv=function(){function b(){if(e)Atrium.resetInactivityTimeout();else pui["client side timeout"]==true&&pui.ib.Hg.reset();pui.onuseractivity!=null&&pui.onuseractivity()}if(!pui.Bx){try{var a=Atrium.getSettings()}catch(c){}var e=a&&a.ACTIMEOUT==="1";if(!(!e&&pui.onuseractivity==null&&pui["client side timeout"]!=true)){U(document.body,"keydown",b);U(document.body,"mousemove",b);U(document.body,"click",b);U(document.body,"touchstart",b);U(document.body,"touchmove",b);pui.Bx=true}}};pui.ua={};
|
|
38
38
|
pui.ua.at=(new Date).getTime();pui.ua.Uj=false;pui.ua.timeout=600;pui.ua.Rs=null;pui.ua.Wp=function(){if(pui.ua.Uj)pui.ua.reset();else{var b=pui["keep alive interval"];try{var a=Atrium.getSettings()}catch(c){}if(a&&a.ACTIMEOUT==="1")b=pui.timeout-10;if(b!=null){pui.ua.timeout=b;pui.ua.start()}}};pui.ua.start=function(){if(!pui.ua.Uj){var b=pui.ua.timeout*1E3;b/=4;if(b>3E3)b=3E3;pui.ua.Rs=setInterval(pui.ua.check,b);pui.ua.reset();pui.ua.Uj=true}};
|
|
@@ -42,7 +42,7 @@ g=Math.round((b.offsetLeft+b.clientLeft-b.scrollLeft)*Ib.Xh);l=Math.round((b.off
|
|
|
42
42
|
h;e+=g}}}}b=b.parentNode&&b.parentNode.tagName!="TD"&&(a||b.parentNode.className=="puiresp"&&(b.parentNode.scrollTop>0||b.parentNode.scrollLeft>0))?b.parentNode:b.offsetParent}return[c,e]};pui.zd=la();function $b(b){if(b!=null&&b!=window&&b!=document)for(var a=Object.getOwnPropertyNames(b),c=0,e=a.length;c<e;c++)try{delete b[a[c]]}catch(f){console.log(f)}}
|
|
43
43
|
pui.yq=function(){this.gr=function(a){if(typeof a.length=="undefined")a=Array(a);for(var c,e=0;e<a.length;e++){c={};for(var f in a[e])c[f.toUpperCase()]=a[e][f];b.push(c)}};this.send=function(a,c){var e="",f,h,g;g=false;for(var l;!g;){f="ProfoundUIMIMEBoundary"+Math.ceil(1E9*Math.random());l=false;for(var o=0;o<b.length;o++){h=b[o].VALUE;if(h.indexOf(f)!=-1){l=true;break}}l||(g=true)}g=f;for(l=0;l<b.length;l++){f=b[l];if(!(typeof f.NAME!="string"||typeof f.VALUE!="string")){e+="--"+g+"\r\n";e+='Content-Disposition: form-data; name="'+
|
|
44
44
|
f.NAME+'"';if(typeof f.FILENAME=="string"){h="application/octet-stream";if(typeof f.CONTENTTYPE=="string")h=f.CONTENTTYPE;e+='; filename="'+f.FILENAME+'"\r\n';e+="Content-Type: "+h}if(f.TRANSFERENCODING!=null)e+="\r\nContent-Transfer-Encoding: "+f.TRANSFERENCODING;e+="\r\n\r\n";e+=f.VALUE;e+="\r\n"}}e+="--"+g+"--";f=new pui.Ajax(a);f.suppressAlert=true;f.async=true;f.method="POST";f.sendAsBinary=false;f.setRequestHeader("Content-Type","multipart/form-data; boundary="+g);f.postData=e;f.onready=c;f.send()};
|
|
45
|
-
var b=[]};pui.bq=function(b){pui.aq(
|
|
45
|
+
var b=[]};pui.bq=function(b){pui.aq(wb(b))};pui.aq=function(b){b.Tn=Cb(b)};pui.oh=function(b,a){for(var c=[],e=0,f="",h="",g=0,l=false,o=0;o<b.length;o++){if(a===true&&e==6){h=h.substr(0,h.length-6);break}f=b.charAt(o);if(l){if(f=="'")l=false}else{if(f=="("){g+=1;e=0}else if(f==")"){g-=1;e=0}else if(f=="'"){l=true;e=0}else if(g==0)if(f.toLowerCase()==" from ".charAt(e))e++;else e=0;if(g<1)g=0}if(f==","&&g==0&&!l){c.push(Lb(h));h="";e=0}else h+=f}c.push(Lb(h));return c};
|
|
46
46
|
pui.Qy={"remote system name":null,"database file":null,"database fields":null,"selection criteria":null,"order by":null,"custom sql":null,"name field":null,"value field":null,"summary option":null,"choices database file":null,"choice options field":null,"choice values field":null,"choices selection criteria":null,"parameter value":null,"choices parameter value":null,"case sensitive":null,"blob table":null,"blob column":null,"blob selection criteria":null};
|
|
47
47
|
pui.kx=function(b){return typeof pui.Qy[b]!="undefined"};pui.Wc=function(b){var a=R+".",c=b.id;if(b.parentNode!=null&&b.parentNode.l!=null)c=b.parentNode.id;if(R=="genie"&&b.parentNode!=pui.runtimeContainer)if(c.lastIndexOf("_W")!=-1)c=c.substr(0,c.lastIndexOf("_W")+2);a+=typeof b.parentNode.parentNode.grid=="undefined"||b.Go?c:c.substr(0,c.lastIndexOf(".")+1)+"*";return a};
|
|
48
48
|
pui.ld=function(b,a,c){function e(){var y=pui.ys(),A=pui.zs(),C=encodeURIComponent(y.Hi);l+=o+"datfmt="+encodeURIComponent(C);c!=null&&c.append("datfmt",C);C=encodeURIComponent(y.Hj);l+="&datsep="+C;c!=null&&c.append("datsep",C);C=encodeURIComponent(A.Hi);l+="&timfmt="+C;c!=null&&c.append("timfmt",C);C=encodeURIComponent(A.Hj);l+="&timsep="+C;c!=null&&c.append("timsep",C);return l}var f=b["field type"]=="textbox",h=1,g="",l="",o="";g=/^(choices |blob )?(parameter value)( \d+)?/;var n="",r=1,p;for(var t in b){var s=
|
|
@@ -76,7 +76,7 @@ pui.Pv=function(){if(!(Fb()||pui["brkmsg enable"]!==true)){typeof pui.Fn==="numb
|
|
|
76
76
|
handler:function(c){if(c==null||typeof c!=="object"||c.error){pui.xk++;pui.xk>=pui["brkmsg max errors"]&&pui.Hn()}else if(c.success&&c.messages!=null&&typeof c.messages.pop==="function"&&c.messages.length>0){var e;try{e=JSON.parse(localStorage.getItem("brkmsgMessages_"+pui.appJob.user))}catch(f){console.log(f)}if(e==null||typeof e.pop!=="function")e=[];e=e.concat(c.messages);if(pui["brkmsg max messages"]>0&&e.length>pui["brkmsg max messages"])e=e.slice(e.length-pui["brkmsg max messages"],e.length);
|
|
77
77
|
if(window!=window.parent&&pui.jg(window.parent))typeof window.parent.Atrium["brkmsg handler"]!=="function"&&window.parent.Atrium.api.breakMessagesShow(e,pui.appJob.user);else pui.si(e);localStorage.setItem("brkmsgMessages_"+pui.appJob.user,JSON.stringify(e))}}});localStorage.setItem("brkmsgLastPoll_"+pui.appJob.user,Date.now())}if(pui.zg()&&typeof window.addEventListener==="undefined"&&typeof JSON==="object")try{var b=JSON.parse(localStorage.getItem("brkmsgMessages_"+pui.appJob.user));window!=window.parent&&
|
|
78
78
|
pui.jg(window.parent)?window.parent.Atrium.api.breakMessagesShow(b,pui.appJob.user):pui.si(b)}catch(a){console.log(a)}}},pui["brkmsg poll interval"]*1E3)}};pui.Hn=function(){clearInterval(pui.Fn);bc(window,"storage",pui.Gn)};
|
|
79
|
-
pui.En=function(b){if(!(typeof pui.appJob!=="object"||pui.appJob.user.length<=0||pui.appJob.user==="QTMHHTP1")){
|
|
79
|
+
pui.En=function(b){if(!(typeof pui.appJob!=="object"||pui.appJob.user.length<=0||pui.appJob.user==="QTMHHTP1")){xb(b);if(!(b.keyCode&&b.keyCode!=13)){b=wb(b).msgIdx;var a;try{a=JSON.parse(localStorage.getItem("brkmsgMessages_"+pui.appJob.user));if(a!==null&&typeof a.splice==="function"){if(!b&&b!=0)b=a.length-1;a.splice(b,1)}else a=[]}catch(c){console.log(c);a=[]}localStorage.setItem("brkmsgMessages_"+pui.appJob.user,JSON.stringify(a));pui.si(a)}}};
|
|
80
80
|
pui.si=function(b){if(typeof pui["brkmsg handler"]=="function")return pui["brkmsg handler"](b);pui.xr=false;if(!(b==null||typeof b.pop!=="function")){var a=document.getElementById("pui-break-messages");if(a){a.innerHTML="";if(b.length==0)pui.unmaskScreen();else{pui.maskScreen();pui.xr=true;pui.cd+=2;a.style.zIndex=pui.cd;for(var c=10,e=10,f=0;f<b.length;f++){var h=b[f];h.to=pui.appJob.user;var g=document.createElement("div");g.style.top=c+"px";g.style.left=e+"px";g.className="msg-wrap";var l=document.createElement("div");
|
|
81
81
|
l.className="msg-titlewrap";g.appendChild(l);var o=document.createElement("div");o.className="title";l.appendChild(o);var n=document.createElement("button");n.className="closeImg";n.msgIdx=f;l.appendChild(n);U(n,"click",pui.En);U(n,"keydown",pui.En);l=document.createElement("div");l.className="msg-body";if(typeof pui.breakMessageFormat==="function"){var r={title:"",body:""};pui.breakMessageFormat(h,r);o.innerHTML=r.title;l.innerHTML=r.body}else try{o.innerHTML=h.date+" "+h.time+"<br>"+h.jobNum+"/"+
|
|
82
82
|
h.jobUserName+"/"+h.jobName;l.innerHTML=h.to+":<br>"+h.msg}catch(p){console.log(p)}g.appendChild(l);a.appendChild(g);c+=1;e+=10}n.focus()}}}};pui.Gn=function(b){if(typeof pui.appJob!=="object"||pui.appJob.user.length<=0||pui.appJob.user==="QTMHHTP1")return false;if(b.key!=="brkmsgMessages_"+pui.appJob.user)return false;try{var a=JSON.parse(b.newValue);pui.si(a)}catch(c){console.log(c)}return false};
|
|
@@ -141,7 +141,7 @@ pui.oA=function(){["pui-material-icons","pui-fa-icons","blueprint-defaults","off
|
|
|
141
141
|
pui.Dz=function(){pui.useAceEditor||pui.is_ie||pui.ie_mode<=11||["profoundjs.d.ts","profoundui.d.ts"].forEach(function(b){var a=new pui.Ajax("/profoundui/proddata/typings/"+b);a.async=true;a.headers={"Content-Type":"text/plain"};a.overrideMimeType="text/plain";a.suppressAlert=true;a.onsuccess=function(c){if(c=c.getResponseText())if(!(!window.monaco||pui.useAceEditor)){window.monaco.languages.typescript.javascriptDefaults.addExtraLib(c,b);window.monaco.languages.typescript.typescriptDefaults.addExtraLib(c,
|
|
142
142
|
b)}};a.onfail=function(c){console.error(c.getStatusMessage())};a.send()})};pui.Kz=function(){return[{type:"material",title:"Material Icons",classList:{"":"pui-material-icons"}},{type:"fontAwesome",title:"Font Awesome Icons",classList:{brands:"pui-fa-brands-icons fa-",solid:"pui-fa-solid-icons fa-",regular:"pui-fa-regular-icons fa-"}},{type:"jQueryIcons",title:"jQuery Mobile Icons",classList:{"":"ui-icon ui-icon-"}}]};pui.Rd=function(){return Math.random().toString(36).replace(/[^a-z]+/g,"")};
|
|
143
143
|
pui.Zd=function(b){this.x=this.y=this.Gk=this.Hk=0;this.ho=b.ho;this.hp=b.hp;this.kq=b.kq;b=b.wk;if(b instanceof Array)for(var a=0;a<b.length;a++){var c=b[a];c.addEventListener("touchstart",this);c.addEventListener("mousedown",this)}else if(typeof b==="object"&&b!==null){b.addEventListener("touchstart",this);b.addEventListener("mousedown",this)}};pui.Zd.prototype=new pui.zd;
|
|
144
|
-
pui.Zd.prototype.handleEvent=function(b){switch(b.type){case "touchstart":case "mousedown":
|
|
144
|
+
pui.Zd.prototype.handleEvent=function(b){switch(b.type){case "touchstart":case "mousedown":xb(b);b=pui.rg(b);this.Gk=b.x;this.Hk=b.y;this.mousedown();document.addEventListener("touchmove",this);document.addEventListener("mousemove",this);document.addEventListener("touchend",this);document.addEventListener("mouseup",this);typeof this.ho==="function"&&this.ho(this);break;case "touchmove":case "mousemove":b=pui.rg(b);this.x=b.x;this.y=b.y;this.mousemove();typeof this.hp==="function"&&this.hp(this);break;
|
|
145
145
|
case "touchend":case "mouseup":document.removeEventListener("touchmove",this);document.removeEventListener("mousemove",this);document.removeEventListener("touchend",this);document.removeEventListener("mouseup",this);typeof this.kq==="function"&&this.kq(this);this.mouseup();break}};pui.Zd.prototype.mousedown=la();pui.Zd.prototype.mousemove=la();pui.Zd.prototype.mouseup=la();
|
|
146
146
|
pui.Ue=function(b,a){pui.Zd.call(this,b);this.Yc=b.move;this.opacity=b.opacity;if(typeof a=="object"&&a!==null){if(typeof a.left!=="number")a.left=0;if(typeof a.top!=="number")a.top=0;if(typeof a.right!=="number")a.right=Infinity;if(typeof a.bottom!=="number")a.bottom=Infinity;this.Fb=a}else this.Fb={left:0,top:0,right:Infinity,bottom:Infinity}};pui.Ue.prototype=Object.create(pui.Zd.prototype);
|
|
147
147
|
pui.Ue.prototype.mousedown=function(){this.startX=this.Yc.offsetLeft;this.startY=this.Yc.offsetTop;if(typeof this.opacity==="number")this.Yc.style.opacity="0."+this.opacity};
|
|
@@ -150,13 +150,13 @@ pui.ek=function(b,a){pui.Ue.call(this,b,a)};pui.ek.prototype=Object.create(pui.U
|
|
|
150
150
|
pui.Nm=function(b){pui.Zd.call(this,b);this.$i=typeof b.$i=="number"&&b.$i>0?b.$i:0;this.Zi=typeof b.Zi=="number"&&b.Zi>0?b.Zi:0;this.rl=b.rl;this.ql=b.ql;if(typeof b.Ip==="object"&&b.Ip!==null)this.cn=this.bn=b.Ip;if(typeof b.Pt==="object"&&b.Pt!==null)this.bn=b.Pt;if(typeof b.St==="object"&&b.St!==null)this.cn=b.St;b=typeof b.resize=="number"&&b.resize>=1&&b.resize<=3?b.resize:1;this.cv=(b&1)==1;this.bv=(b&2)==2};pui.Nm.prototype=Object.create(pui.Zd.prototype);
|
|
151
151
|
pui.Nm.prototype.mousedown=function(){this.startX=this.cn.offsetWidth;this.startY=this.bn.offsetHeight};pui.Nm.prototype.mousemove=function(){if(this.cv){var b=this.startX+this.x-this.Gk;if(b<this.$i)b=this.$i;if(typeof this.rl==="number"&&b>this.rl)b=this.rl;this.cn.style.width=b+"px";this.width=b}if(this.bv){b=this.startY+this.y-this.Hk;if(b<this.Zi)b=this.Zi;if(typeof this.ql==="number"&&b>this.ql)b=this.ql;this.bn.style.height=b+"px";this.height=b}};
|
|
152
152
|
pui.Re=function(b){if((window.React||window.Vue)&&b!=null&&b.pui&&b.pui.data&&b.pui.Ai){var a={};a[b.pui.Ai]=[b];a=pui.Br(a);b.pui.data[b.pui.Ai]=a[b.pui.Ai]}};
|
|
153
|
-
pui.Nj=function(b,a){var c;if(R=="dspf"){if(pui.Mb){c=
|
|
153
|
+
pui.Nj=function(b,a){var c;if(R=="dspf"){if(pui.Mb){c=wb(b);if(!(c.pui&&c.pui.properties["read only"]==="true")){c.modified=true;if(c.parentNode!=null&&(c.parentNode.comboBoxWidget!=null||c.parentNode.l!=null)){c=c.parentNode;c.modified=true}pui.modified=true;if(c.id!=null&&c.id.indexOf(".")==-1&&a)pui.jf[a]=true;if((window.React||window.Vue)&&c.pui.data&&c.pui.Ai)setTimeout(function(){pui.Re(c)},0)}}}else if(pui.F.rendered){c=wb(b);if(c!=null){var e=c.B;if(e!=null){e=e.idx;if(e!=null){e=String(e);
|
|
154
154
|
if(c.Tw!=null)e="s"+e+"."+c.Tw;pui.response[e]=c;if(c.type=="radio"&&pui.genie.allowRadioClear&&c.className.indexOf("selection-field-single")>=0)if(b.type=="click")setTimeout(function(){if(pui.ie_mode==8&&c.checked!=c.qA)c.Wo=true;if(c.checked&&!c.Wo)c.checked=false;c.Wo=false},0);else if(b.type=="change")c.Wo=true}}}}};
|
|
155
|
-
pui.mw=function(b){if(b.keyCode==pui.dup.keyCode)if(!(pui.dup.shift&&!b.shiftKey))if(!(pui.dup.ctrl&&!b.ctrlKey))if(!(pui.dup.alt&&!b.altKey)){var a=
|
|
155
|
+
pui.mw=function(b){if(b.keyCode==pui.dup.keyCode)if(!(pui.dup.shift&&!b.shiftKey))if(!(pui.dup.ctrl&&!b.ctrlKey))if(!(pui.dup.alt&&!b.altKey)){var a=wb(b),c=a.value,e=a.maxLength;if(e==null)e=0;e=Number(e);if(isNaN(e))e=0;var f=Cb(a);if(f<0)f=0;for(c=c.substr(0,f);c.length<f;)c+=" ";for(;c.length<e;)c+=pui.dup["char"];a.value=c;pui.Nj(b);pui.Do(a);xb(b);return false}};
|
|
156
156
|
pui.Po=function(b){var a="";if(typeof b=="string")a=b;if(typeof b=="object")a=b.value;if(a==null)a="";if(typeof a!="string")a=String(a);return a.indexOf(pui.dup["char"])!=-1};pui.Cz=function(b,a){var c=b;if(typeof b==="string"&&b.length>0)c=RegExp(b,a?"ig":"i");if(typeof c==="object"&&c instanceof RegExp){if(a&&!c.global)c=RegExp(c.source,"ig")}else c=false;return c};pui.Ie=function(b,a){if(b==null)return b;return a?b.replace(/\u1E9E/g,"\u00df"):b.replace(/\u00DF/g,"\u1e9e")};
|
|
157
157
|
pui.RA=function(b){if(b==null)return b;var a=b.split("\u00df");if(a.length<=1)return b.toUpperCase();for(b=0;b<a.length;b++)a[b]=a[b].toUpperCase();return a.join("\u00df")};pui.lp=function(b){if(b.target.value.match(/\u00DF/)){var a=b.target.selectionStart;b.target.value=pui.Ie(b.target.value,false);pui.is_ie&&b.target.setSelectionRange(a,a)}};
|
|
158
158
|
pui.mt=function(b){var a=0;if(pui.is_firefox)if(b.deltaMode==0)a=Math.round(b.deltaY/48);else{if(b.deltaMode==1)a=b.deltaY/3}else if(pui.is_ie)a=b.wheelDelta?b.wheelDelta/-120:b.deltaY/144;else if(pui.is_edge&&b.wheelDelta)a=b.wheelDelta/-120;else if(pui.is_chrome)a=b.deltaY/100;else if(pui.is_safari)a=b.deltaY/4;else if(typeof b.deltaY=="number"&&(b.deltaY>0||b.deltaY<0))a=b.wheelDelta?b.wheelDelta/120:b.deltaY/b.deltaY;return a};
|
|
159
|
-
pui.uo=function(b,a){var c=["B","KB","MB","GB","TB"];b=Math.max(b,0);var e=Math.floor((b?Math.log(b):0)/Math.log(1024));e=Math.min(e,c.length-1);b/=Math.pow(1024,e);a=typeof a=="number"?a:0;return Math.round(b*Math.pow(10,a))/Math.pow(10,a)+" "+c[e]};pui.Vz=function(b){b=
|
|
159
|
+
pui.uo=function(b,a){var c=["B","KB","MB","GB","TB"];b=Math.max(b,0);var e=Math.floor((b?Math.log(b):0)/Math.log(1024));e=Math.min(e,c.length-1);b/=Math.pow(1024,e);a=typeof a=="number"?a:0;return Math.round(b*Math.pow(10,a))/Math.pow(10,a)+" "+c[e]};pui.Vz=function(b){b=wb(b);if(b.tagName=="TD")b=b.parentNode;if(b.tagName!="TR")return null;return b};
|
|
160
160
|
pui.getDatabaseConnections=function(){if(pui.isCloud&&Fb()){for(var b=Array.isArray(pui.cloud.ws.settings.databaseConnections)?pui.cloud.ws.settings.databaseConnections.slice():[],a={name:"workspace",driver:"mysql"},c=false,e=0;e<b.length;e++)if(b[e]["default"]===true){c=true;break}c||(a["default"]=true);b.splice(0,0,a);return b}else return pui.databaseConnections};
|
|
161
161
|
pui.Jz=function(b){var a=pui.getDatabaseConnections();if(a){if(typeof b==="string")b=Lb(b);for(var c=0;c<a.length;c++){var e=a[c];if(!b&&e["default"]===true||e.name===b)return e}}};
|
|
162
162
|
pui.getVersionComparer=function(){function b(a){if((a=a||"0.0.0")&&typeof a!=="string")a=a.toString();return a.split(".")}return{isLessThan:function(a,c){var e;e=b(a);for(var f=b(c),h=0;h<e.length;h++){if(f.length-1<h)break;var g=e[h].length,l=f[h].length;if(g>l)f[h]="0".repeat(g-l)+f[h];if(l>g)e[h]="0".repeat(l-g)+e[h]}e=[e.join("."),f.join(".")];return e[0]<e[1]}}};
|
|
@@ -339,28 +339,29 @@ n=s.tag;var A=s.inputType;if(f){h.Ll=null;h.vA()}switch(p){case "select box":if(
|
|
|
339
339
|
c.tagName.toLowerCase()=="input")if(c.type!=A){y=true;if(c.type=="number"&&A=="text")y=false}if(y){C=true;y=document.createElement(n);if(n=="input"||!pui.is_old_ie&&n=="button")y.type=A;c.parentNode!=null&&c.parentNode.replaceChild(y,c);y.style.left=c.style.left;y.style.top=c.style.top;y.style.width=c.style.width;y.style.height=c.style.height;y.style.position=c.style.position;y.style.cursor=c.style.cursor;y.style.visibility=c.style.visibility;(A=c.getAttribute("puiwdgt"))&&y.setAttribute("puiwdgt",
|
|
340
340
|
A);y.id=c.id;if(typeof c.name=="string")y.name=c.name;if(R=="dspf"){if(y.pui==null)y.pui={};if(c.lc!=null){y.lc=c.lc;y.pui.formatName=c.lc}if(c.Sc!=null){y.Sc=c.Sc;y.pui.fieldName=c.Sc}}if(R=="genie"){y.B=c.B;if(pui.F.W==c)pui.F.W=y;F=true}if(c.className.indexOf("hide")!=-1){y.className="hide";if(f){y.style.visibility="visible";y.style.filter="alpha(opacity=30)";y.style.opacity=0.3}}c.getAttribute("maxlength")!=null&&y.setAttribute("maxlength",c.getAttribute("maxlength"));y.disabled=c.disabled;if(c.Va!=
|
|
341
341
|
null)y.Va=c.Va;if(c.db!=null)y.db=c.db;if(c.Go)y.Go=true;R=="genie"&&attachInputEvents(y);if(f){h.dom=y;g!=null&&g.qz(h);h.designer.pz(y,h)}if(c.readOnly)if(n=="input"){if(y.type=="checkbox"||y.type=="radio")R=="genie"&&U(y,"click",disableInputControl)}else if(n=="textarea")y.readOnly=true}else{y=c;if(n=="div"&&p!="tab panel")y.tabPanel=null;if(f||p=="chart"||p=="radio button")C=true}if(C){n=Hc();for(C=0;C<n.length;C++){A=n[C].name;var G=a[A];if(G!=null&&G!=""){var B=n[C].t!=null;if(A=="overflow x"||
|
|
342
|
-
A=="overflow y")if(a["field type"]=="layout")B=false;if(B)if(n[C].t=="visibility"&&f)if(G=="hidden"){y.style.filter="alpha(opacity=30)";y.style.opacity=0.3}else{y.style.filter="";y.style.opacity=""}else try{var
|
|
342
|
+
A=="overflow y")if(a["field type"]=="layout")B=false;if(B)if(n[C].t=="visibility"&&f)if(G=="hidden"){y.style.filter="alpha(opacity=30)";y.style.opacity=0.3}else{y.style.filter="";y.style.opacity=""}else try{var D=pui.us(n[C].t,G);y.style[n[C].t]=D;f&&pui.Bk(y,n[C].t,D)}catch(E){}if(n[C].V!=null){if(n[C].type=="boolean"&&G=="true")G=true;if(n[C].type=="boolean"&&G=="false")G=false;if(n[C].V=="disabled"&&f)G=false;try{if(G==false)y.getAttribute(n[C].V)!=null&&y.removeAttribute(n[C].V);else{var K=ac(G,
|
|
343
343
|
r,y);if(n[C].V=="src")K=pui.normalizeURL(K,true);n[C].V!=="style"&&y.setAttribute(n[C].V,K);if(n[C].V=="class")y.className=G}}catch(S){}}}}}if(R=="dspf"){C=[];C.push(a["css class"]);A=2;for(G=a["css class "+A];G!=null;){C.push(G);A++;G=a["css class "+A]}A=a["display attribute field"];G=false;if(A!=null&&!pui.p(A)&&A!=""&&A!=" "){C=C.concat(pui.ur(A));G=true}Qc(y,C,G)}n=y;if(!s.resizable){n.style.width="";n.style.height=""}}else{s=pui.widgets[a["field type"]];if(s==null)return n}if(n.pui==null)n.pui=
|
|
344
344
|
{};if(n.pui.properties==null)n.pui.properties={};n.pui.properties[t]=p;if(t=="value"&&e!="script: value"&&!f&&R=="genie"&&n.B!=null&&n.B.idx!=null)n.tagName=="INPUT"&&n.type=="radio"&&n.checked!=true||(pui.response[n.B.idx]=n);if(f&&t=="screen identifier"&&R=="genie"){C="red";C=e=="true"||e==true?"red":"#cccccc";if(n.style.borderLeftStyle=="dotted")n.style.borderLeftColor=C;if(n.style.borderRightStyle=="dotted")n.style.borderRightColor=C;if(n.style.borderTopStyle=="dotted")n.style.borderTopColor=
|
|
345
345
|
C;if(n.style.borderBottomStyle=="dotted")n.style.borderBottomColor=C}C=s.vf;A=s.propertySetters;G=null;if(A!=null)G=A[t];var P;if(G!=null||C!=null)P=new pui.Om(e,p,f,a,r,n,c,t,h,g);if(C!=null)if(C(P)==false)return;if(G!=null)if(G(P)==false)return;if(F)if(y.comboBoxWidget!=null){F=y.comboBoxWidget.getBox();pui.sr(F);F.B=y.B;attachInputEvents(F);y.comboBoxWidget.Up(c.maxLength)}else if(y.l!=null){F=y.l.getBox();pui.sr(F);F.B=y.B;attachInputEvents(F);y.l.Up(c.maxLength)}else pui.sr(y);if(t=="id"&&f){y=
|
|
346
346
|
h.designer;F=y.selection;if(h.dom.id!=e&&document.getElementById(e)!=null)if(!(pui.is_old_ie&&h.dom.id.toUpperCase()==e.toUpperCase())){pui.alert('The widget id "'+e+'" is already in use.');y.nb.refresh();return n}for(C=0;C<F.Sd.length;C++)if(h.properties.newitem=="true")if(Ec[y.Ma.tb]&&Ec[y.Ma.tb].items){A=Ec[y.Ma.tb].items;for(G=0;G<A.length;G++)if(A[G].id==h.properties.id)A[G].id=e}if(a["field type"]=="tab panel")for(C=0;C<y.items.length;C++)if(y.items[C].properties["parent tab panel"]==h.dom.id){y.items[C].properties["parent tab panel"]=
|
|
347
347
|
e;y.items[C].dom.Va=e;y.items[C].ob["parent tab panel"]=true;y.nb.Ih("parent tab panel")}F.Sd.length==1&&y.nb.JA("Properties - "+p)}if(t=="parent tab panel"&&(f||a.visibility!="hidden"))c.Va=p;if(t=="parent tab")c.db=p;if(t=="top"||t=="left"||t=="right"||t=="bottom")pui.Mx(c);t=="empty text"&&!f&&pui.By(c,p);y=null;if(String(e).substr(0,3).toLowerCase()=="js:")y=e.substr(3);if(String(e).substr(0,11).toLowerCase()=="javascript:")y=e.substr(11);if(String(e).substr(0,7).toLowerCase()=="script:")y=e.substr(7);
|
|
348
|
-
if(b.t!=null){if(b.t=="visibility"&&f)if(p=="hidden"){c.style.filter="alpha(opacity=30)";c.style.opacity=0.3}else{c.style.filter="";c.style.opacity="";c.style.visibility=p}else if(b.t=="backgroundColor"&&c.tabPanel!=null){c.tabPanel.Fc=p?p:"#eeeeff";if(R=="genie"||f)c.tabPanel.z()}else{try{
|
|
349
|
-
c.comboBoxWidget.getBox();O.value=pui.Ie(O.value,false);O.addEventListener("input",pui.lp)}else if(c.l!=null){var da=c.l.getBox();da.value=pui.Ie(da.value,false);da.addEventListener("input",pui.lp)}c.style[b.t]=
|
|
350
|
-
O;
|
|
348
|
+
if(b.t!=null){if(b.t=="visibility"&&f)if(p=="hidden"){c.style.filter="alpha(opacity=30)";c.style.opacity=0.3}else{c.style.filter="";c.style.opacity="";c.style.visibility=p}else if(b.t=="backgroundColor"&&c.tabPanel!=null){c.tabPanel.Fc=p?p:"#eeeeff";if(R=="genie"||f)c.tabPanel.z()}else{try{D=pui.us(b.t,p);if(b.t=="textTransform"&&p=="uppercase")if(c.tagName=="INPUT"&&c.type=="text"||c.tagName=="TEXTAREA"){c.value=pui.Ie(c.value,false);c.addEventListener("input",pui.lp)}else if(c.comboBoxWidget!=null){var O=
|
|
349
|
+
c.comboBoxWidget.getBox();O.value=pui.Ie(O.value,false);O.addEventListener("input",pui.lp)}else if(c.l!=null){var da=c.l.getBox();da.value=pui.Ie(da.value,false);da.addEventListener("input",pui.lp)}c.style[b.t]=D;if(f)p===null||p.length==0?pui.Ap(c,b.t):pui.Bk(c,b.t,D)}catch(T){if(y==null&&f){D="'"+e+"' is not a valid value for "+t+".";if(Ib.xh){O=Ib.designer.Pp[Ib.designer.Ma.tb]["record format name"];if(a.grid!=null){da=Db(a.grid);if(da!=null&&da.grid!=null)O=da.grid.Wa}D+="\n\n\nRecord Format: "+
|
|
350
|
+
O;D+="\n\nElement Id: "+a.id;D+="\n\nElement Type: "+a["field type"]}pui.alert(D)}}if(c.tabPanel!=null)if(b.t=="color"||b.t=="fontFamily"||b.t=="fontSize"||b.t=="height"||b.t=="width")if(R=="genie"||f)c.tabPanel.z()}b.t=="visibility"&&p=="hidden"&&!f&&a["field type"]=="date field"&&setTimeout(function(){if(c.calimg&&c.style.visibility=="hidden")c.calimg.style.visibility="hidden"},1);b.t=="visibility"&&p=="hidden"&&!f&&a["field type"]=="spinner"&&setTimeout(function(){c.ad&&c.style.visibility=="hidden"&&
|
|
351
351
|
c.ad.hide()},1);b.t=="visibility"&&p=="hidden"&&!f&&a["field type"]=="textbox"&&setTimeout(function(){if(c.tj&&c.style.visibility=="hidden")c.tj.style.visibility="hidden"},1);if(b.t=="color"&&c.firstChild!=null&&c.firstChild.tagName=="A")c.firstChild.style.color=p;else if(b.t=="color"&&c.firstChild!=null&&c.firstChild.nextSibling!=null&&c.firstChild.nextSibling.tagName=="A")c.firstChild.nextSibling.style.color=p;if(b.t=="textDecoration"&&c.firstChild!=null&&c.firstChild.tagName=="A")c.firstChild.style.textDecoration=
|
|
352
352
|
p;else if(b.t=="textDecoration"&&c.firstChild!=null&&c.firstChild.nextSibling!=null&&c.firstChild.nextSibling.tagName=="A")c.firstChild.nextSibling.style.textDecoration=p;if(b.t=="width"&&!s.resizable)c.style.width="";if(b.t=="height"&&!s.resizable)c.style.height=""}if(b.V!=null)if(p=="")try{b.V==="style"?pui.ey(c):c.removeAttribute(b.V);if(b.V=="class")c.className=""}catch(L){y==null&&f&&pui.alert(L.message)}else try{K=p;if(b.type=="boolean"&&K=="true"){K=true;if(b.V=="disabled"&&f)K=false}if(b.type==
|
|
353
|
-
"boolean"&&K=="false")K=false;if(K==false)c.getAttribute(b.V)!=null&&c.removeAttribute(b.V);else{if(b.V=="src")K=pui.normalizeURL(K,true);b.V==="style"?pui.dr(c,K,a["field type"]==="layout"):c.setAttribute(b.V,K);if(b.V=="class")c.className=K}}catch(Z){if(y==null&&f){
|
|
354
|
-
a.id;
|
|
355
|
-
"true"||c.G=="send data")pui.G=c.G;pui.runLogic(e.routine,c.o,c.Wj);if(!N)N=window.event;N&&N.stopPropagation&&N.stopPropagation()};else if(t=="ontabclick")b=function(){eval("var tab = arguments[0];");try{return eval(e)}catch(N){pui.Ca(N,t.substr(0,1).toUpperCase()+t.substr(1)+" Error:\n")}};else if(t=="onoptionclick")b=function(){eval("var value = arguments[0];");eval("var text = arguments[1];");try{eval(e)}catch(N){pui.Ca(N,
|
|
356
|
-
function(){eval("var value = arguments[0];");try{eval(e)}catch(N){pui.Ca(N,t.substr(0,1).toUpperCase()+t.substr(1)+" Error:\n")}};else if(t=="onspin")b=function(){eval("var value = arguments[0];");eval("var increment = arguments[1];");eval("var spinner = arguments[2];");eval("var newValue = arguments[3];");eval("var row;");l!=null&&eval("row = "+l+";");eval("var rrn;");l!=null&&eval("rrn = "+l+";");eval("var rowNumber;");
|
|
357
|
-
t.substr(0,1).toUpperCase()+t.substr(1)+" Error:\n")}};else if(t=="onchartclick")b=function(N){eval("var name = arguments[0];");if(typeof name=="object"){eval("var category = name.category");eval("var name = name.name")}try{var v=eval(e);typeof v=="function"&&v(N)}catch(V){pui.Ca(V,t.substr(0,1).toUpperCase()+t.substr(1)+" Error:\n")}};else if(t=="onoptiondisplay")b=function(){arguments.length>=1&&eval("var row = "+
|
|
358
|
-
3&&eval("var rowNumber = "+arguments[2]+";");arguments.length>=4&&eval("var column = "+arguments[3]+";");if(arguments.length>=5){pui.temp_value=arguments[4];eval("var grid = pui.temp_value;")}eval("var choices;");if(c.comboBoxWidget!=null&&c.comboBoxWidget.choices!=null){pui.temp_value=c.comboBoxWidget.choices;eval("choices = pui.temp_value.slice(0);")}if(c.v!=null&&c.v.choices!=null){pui.temp_value=c.v.choices;
|
|
359
|
-
c.comboBoxWidget["choice values"]!=null){pui.temp_value=c.comboBoxWidget["choice values"];eval("values = pui.temp_value.slice(0);")}if(c.v!=null&&c.v.me!=null){pui.temp_value=c.v.me;eval("values = pui.temp_value.slice(0);")}try{var N=eval(e);typeof N=="function"&&N()}catch(v){pui.Ca(v,t.substr(0,1).toUpperCase()+t.substr(1)+" Error:\n")}if(c.comboBoxWidget!=null&&c.comboBoxWidget.choices!=null){eval("pui.temp_value = choices;");
|
|
360
|
-
null){eval("pui.temp_value = choices;");c.v.choices=pui.temp_value.slice(0)}if(c.comboBoxWidget!=null&&c.comboBoxWidget["choice values"]!=null){eval("pui.temp_value = values;");c.comboBoxWidget["choice values"]=pui.temp_value.slice(0)}if(c.v!=null&&c.v.me!=null){eval("pui.temp_value = values;");c.v.me=pui.temp_value.slice(0)}};else if(t!="onselect"&&t!="ondragstart")b=function(N){if(pui.dj==null)if(!(c.getAttribute!=null&&
|
|
361
|
-
"true"||c.G=="send data")pui.G=c.G;eval("var row;");l!=null&&eval("row = "+l+";");eval("var rrn;");l!=null&&eval("rrn = "+l+";");eval("var rowNumber;");c.Ub!=null&&eval("rowNumber = "+(c.Ub+1)+";");pui.temp_event=N;eval("var event = pui.temp_event;");try{var v=eval(e);if(typeof v=="function"){if(!N)N=window.event;v(N,this)}}catch(V){pui.Ca(V,t.substr(0,1).toUpperCase()+t.substr(1)+" Error:\n")}}};if(!f&&b!=null){c[t]=
|
|
362
|
-
b);c.l!=null&&t!="onselect"&&t!="onoptiondisplay"&&c.l.wn(t,b)}}if(f){if(e!=""||a[t]!=null)a[t]=e;h.ob[t]=true;if(t=="field type"||t=="left"||t=="right"||t=="top"||t=="bottom"||t=="z index"||t=="visibility"||t=="height"||t=="width"||t=="label"||t=="color"||t=="font family"||t=="font size"||t=="font style"||t=="font weight")h.kh();h.Bg();g!=null&&g.rj();if(R=="dspf"){if(t=="id"){pui.ide.sA();pui.ide.tA()}if(t=="id"||
|
|
363
|
-
s.qc;A=s.Ev;G=null;if(A!=null)G=A[t];if(G!=null||C!=null)P=new pui.Om(e,p,f,a,r,n,c,t,h,g);C!=null&&C(P);G!=null&&G(P);return n}pui.Om=function(b,a,c,e,f,h,g,l,o,n){this.newValue=b;this.value=a;this.design=c;this.properties=e;this.originalValue=f;this.dom=h;this.za=g;this.propertyName=l;this.e=o;this.Tt=n};
|
|
353
|
+
"boolean"&&K=="false")K=false;if(K==false)c.getAttribute(b.V)!=null&&c.removeAttribute(b.V);else{if(b.V=="src")K=pui.normalizeURL(K,true);b.V==="style"?pui.dr(c,K,a["field type"]==="layout"):c.setAttribute(b.V,K);if(b.V=="class")c.className=K}}catch(Z){if(y==null&&f){D="'"+e+"' is not a valid value for "+t+".";if(Ib.xh){O=Ib.designer.Pp[Ib.designer.Ma.tb]["record format name"];if(a.grid!=null){da=Db(a.grid);if(da!=null&&da.grid!=null)O=da.grid.Wa}D+="\n\n\nRecord Format: "+O;D+="\n\nElement Id: "+
|
|
354
|
+
a.id;D+="\n\nElement Type: "+a["field type"]}pui.alert(D)}}if(R=="dspf"&&(t.substr(0,9)=="css class"||t=="display attribute field")){if(t=="display attribute field"&&a["field type"]=="combo box")C=c.className.split(" ");else{C=[];C.push(a["css class"]);A=2;for(G=a["css class "+A];G!=null;){C.push(G);A++;G=a["css class "+A]}}K=Number(t.substr(10));if(isNaN(K)||K<1||K>99)K=1;if(t!="display attribute field")C[K-1]=p;A=a["display attribute field"];G=false;if(A!=null&&!pui.p(A)&&A!=""&&A!=" "){C=C.concat(pui.ur(A));
|
|
355
|
+
G=true}Qc(c,C,G)}if(b.type=="js"){b=null;if(pui.Zb(e))b=function(N){if(!c.Ka)if(c.G=="true"||c.G=="send data")pui.G=c.G;pui.runLogic(e.routine,c.o,c.Wj);if(!N)N=window.event;N&&N.stopPropagation&&N.stopPropagation()};else if(t=="ontabclick")b=function(){eval("var tab = arguments[0];");try{return eval(e)}catch(N){pui.Ca(N,t.substr(0,1).toUpperCase()+t.substr(1)+" Error:\n")}};else if(t=="onoptionclick")b=function(){eval("var value = arguments[0];");eval("var text = arguments[1];");try{eval(e)}catch(N){pui.Ca(N,
|
|
356
|
+
t.substr(0,1).toUpperCase()+t.substr(1)+" Error:\n")}};else if(t=="onprompt")b=function(){eval("var value = arguments[0];");try{eval(e)}catch(N){pui.Ca(N,t.substr(0,1).toUpperCase()+t.substr(1)+" Error:\n")}};else if(t=="onspin")b=function(){eval("var value = arguments[0];");eval("var increment = arguments[1];");eval("var spinner = arguments[2];");eval("var newValue = arguments[3];");eval("var row;");l!=null&&eval("row = "+l+";");eval("var rrn;");l!=null&&eval("rrn = "+l+";");eval("var rowNumber;");
|
|
357
|
+
c.Ub!=null&&eval("rowNumber = "+(c.Ub+1)+";");try{return eval(e)}catch(N){pui.Ca(N,t.substr(0,1).toUpperCase()+t.substr(1)+" Error:\n")}};else if(t=="onchartclick")b=function(N){eval("var name = arguments[0];");if(typeof name=="object"){eval("var category = name.category");eval("var name = name.name")}try{var v=eval(e);typeof v=="function"&&v(N)}catch(V){pui.Ca(V,t.substr(0,1).toUpperCase()+t.substr(1)+" Error:\n")}};else if(t=="onoptiondisplay")b=function(){arguments.length>=1&&eval("var row = "+
|
|
358
|
+
arguments[0]+";");arguments.length>=2&&eval("var rrn = "+arguments[1]+";");arguments.length>=3&&eval("var rowNumber = "+arguments[2]+";");arguments.length>=4&&eval("var column = "+arguments[3]+";");if(arguments.length>=5){pui.temp_value=arguments[4];eval("var grid = pui.temp_value;")}eval("var choices;");if(c.comboBoxWidget!=null&&c.comboBoxWidget.choices!=null){pui.temp_value=c.comboBoxWidget.choices;eval("choices = pui.temp_value.slice(0);")}if(c.v!=null&&c.v.choices!=null){pui.temp_value=c.v.choices;
|
|
359
|
+
eval("choices = pui.temp_value.slice(0);")}eval("var values;");if(c.comboBoxWidget!=null&&c.comboBoxWidget["choice values"]!=null){pui.temp_value=c.comboBoxWidget["choice values"];eval("values = pui.temp_value.slice(0);")}if(c.v!=null&&c.v.me!=null){pui.temp_value=c.v.me;eval("values = pui.temp_value.slice(0);")}try{var N=eval(e);typeof N=="function"&&N()}catch(v){pui.Ca(v,t.substr(0,1).toUpperCase()+t.substr(1)+" Error:\n")}if(c.comboBoxWidget!=null&&c.comboBoxWidget.choices!=null){eval("pui.temp_value = choices;");
|
|
360
|
+
c.comboBoxWidget.choices=pui.temp_value.slice(0)}if(c.v!=null&&c.v.choices!=null){eval("pui.temp_value = choices;");c.v.choices=pui.temp_value.slice(0)}if(c.comboBoxWidget!=null&&c.comboBoxWidget["choice values"]!=null){eval("pui.temp_value = values;");c.comboBoxWidget["choice values"]=pui.temp_value.slice(0)}if(c.v!=null&&c.v.me!=null){eval("pui.temp_value = values;");c.v.me=pui.temp_value.slice(0)}};else if(t!="onselect"&&t!="ondragstart")b=function(N){if(pui.dj==null)if(!(c.getAttribute!=null&&
|
|
361
|
+
c.getAttribute("disabled")=="true"||c.disabled!=null&&c.disabled==true)){if(c.G=="true"||c.G=="send data")pui.G=c.G;eval("var row;");l!=null&&eval("row = "+l+";");eval("var rrn;");l!=null&&eval("rrn = "+l+";");eval("var rowNumber;");c.Ub!=null&&eval("rowNumber = "+(c.Ub+1)+";");pui.temp_event=N;eval("var event = pui.temp_event;");try{var v=eval(e);if(typeof v=="function"){if(!N)N=window.event;v(N,this)}}catch(V){pui.Ca(V,t.substr(0,1).toUpperCase()+t.substr(1)+" Error:\n")}}};if(!f&&b!=null){c[t]=
|
|
362
|
+
b;c.comboBoxWidget!=null&&t!="onselect"&&t!="onoptiondisplay"&&c.comboBoxWidget.wn(t,b);c.l!=null&&t!="onselect"&&t!="onoptiondisplay"&&c.l.wn(t,b)}}if(f){if(e!=""||a[t]!=null)a[t]=e;h.ob[t]=true;if(t=="field type"||t=="left"||t=="right"||t=="top"||t=="bottom"||t=="z index"||t=="visibility"||t=="height"||t=="width"||t=="label"||t=="color"||t=="font family"||t=="font size"||t=="font style"||t=="font weight")h.kh();h.Bg();g!=null&&g.rj();if(R=="dspf"){if(t=="id"){pui.ide.sA();pui.ide.tA()}if(t=="id"||
|
|
363
|
+
t=="field type"||t=="value")pui.ide.Kt();if(!h.Bf&&o!==true){h.designer.cp();pui.ide.refreshRibbon()}}}C=s.qc;A=s.Ev;G=null;if(A!=null)G=A[t];if(G!=null||C!=null)P=new pui.Om(e,p,f,a,r,n,c,t,h,g);C!=null&&C(P);G!=null&&G(P);return n}pui.Om=function(b,a,c,e,f,h,g,l,o,n){this.newValue=b;this.value=a;this.design=c;this.properties=e;this.originalValue=f;this.dom=h;this.za=g;this.propertyName=l;this.e=o;this.Tt=n};
|
|
364
|
+
pui.Om.prototype.evalProperty=function(b){return ac(this.properties[b],this.originalValue,this.dom)};
|
|
364
365
|
function Qc(b,a,c){function e(t){return t=="BLU"||t=="GRN"||t=="PNK"||t=="RED"||t=="TRQ"||t=="WHT"||t=="YLW"}for(var f=[],h=false,g=[],l=false,o=null,n=0;n<a.length;n++){var r=false;if(c&&n==a.length-1)r=true;var p=a[n];if(!(p==null||p=="")){if(e(p)){if(l&&!r)continue;if(l){if(r&&o!=null){f[o]=p;continue}}else{l=true;o=f.length}}f.push(p);if(p=="PR"||p=="PR-UL"){b.readOnly=true;b.tabIndex="-1";if(b.tagName=="SELECT"&&!Fb())b.disabled=true;if(b.comboBoxWidget!=null){r=b.comboBoxWidget.getBox();r.readOnly=
|
|
365
366
|
true;if(!Fb())r.disabled=true;r.tabIndex="-1"}if(b.l!=null){r=b.l.getBox();r.readOnly=true;r.disabled=true;r.tabIndex="-1"}}if(p=="RI")h=true;if(e(p)||p=="HI")g.push(p)}}if(h)for(n=0;n<g.length;n++)f.push("RI-"+g[n]);a=f.join(" ");b.setAttribute("class",a);b.className=a}
|
|
366
367
|
function ac(b){var a="";if(pui.p(b)||pui.Jb(b)||pui.Zb(b)){if(b.designValue!=null)a=b.designValue;return a}if(b==null)b="";var c=null;if(String(b).substr(0,3).toLowerCase()=="js:")c=b.substr(3);if(String(b).substr(0,11).toLowerCase()=="javascript:")c=b.substr(11);if(String(b).substr(0,7).toLowerCase()=="script:")c=b.substr(7);if(c==null||Lb(c)=="")a=b;else{eval("var value = arguments[1];");eval("var obj = arguments[2];");try{a=eval(c)}catch(e){if(!pui.Th){pui.Th=true;setTimeout(function(){pui.alert("Expression '"+
|
|
@@ -376,7 +377,7 @@ if(c.U!=null)e=String(c.value);if(c.M!=null){e="";if(c.M.Kd&&c.M.Bh!=null)e=c.M.
|
|
|
376
377
|
function Xc(b,a){var c;c=typeof b=="object"?b:document.getElementById(b);if(c!=null){if(c.tagName=="DIV")if(c.U!=null)c.U.setValue(a);else if(c.comboBoxWidget!=null)c.comboBoxWidget.setValue(a);else if(c.l!=null)c.l.setValue(a);else if(c.button&&c.button.m)c.button.m.innerHTML=a;else if(c.pui&&c.pui.widget)applyProperty(c,"value",a);else c.innerHTML=a;else if(c.tagName=="INPUT"||c.tagName=="SELECT"||c.tagName=="TEXTAREA")if(c.tagName=="INPUT"&&c.type=="checkbox")c.checked=typeof a=="boolean"?a:c.checkedValue!=
|
|
377
378
|
null&&a==c.checkedValue?true:false;else{R=="genie"&&a!=c.value&&pui.F.gA(c);c.value=a;if(c.Ed!=null)c.Ed.value=a}if(R=="dspf"||pui.fa&&c.B==null){c.modified=true;pui.Re(c);var e=c.H;if(c.id!=null&&c.id.indexOf(".")==-1&&c.lc!=null)pui.jf[c.lc]=true;if(e!=null){e.hide();e.ja=true;pui.da(c,e.qg())}}if(R=="genie"&&c.B!=null&&c.B.idx!=null)pui.response[c.B.idx]=c;pui.le(c);if(c.pui&&c.pui.properties)c.pui.properties.value=a}}
|
|
378
379
|
function Yc(b,a,c,e,f){if(typeof b=="string"){f=c;e=a;c=b;b=a=0}var h;if(c==null)c="div";h=c=c.toLowerCase();if(c=="dspf")h="div";if(c=="button")h="input";h=document.createElement(h);h.style.position="absolute";h.style.top=b*pui.vl+Ja+"px";h.style.left=a*pui.ul+"px";if(e!=null)switch(c){case "div":h.innerHTML=e;break;case "dspf":b=new pui.Ajax(e);b.async=false;b.send();if(b.ot())h.innerHTML=b.yc();break;case "input":h.value=e;break;case "button":h.type="button";h.value=e;h.className="button";if(!pui.is_quirksmode)h.style.width=
|
|
379
|
-
"55px";break;case "img":h.src=e;break}if(f!=null)h.id=f;if(c=="input"){document.forms.main.appendChild(h);U(h,"keydown",
|
|
380
|
+
"55px";break;case "img":h.src=e;break}if(f!=null)h.id=f;if(c=="input"){document.forms.main.appendChild(h);U(h,"keydown",yb)}else{R=="genie"&&document.getElementById(za).appendChild(h);R=="dspf"&&pui.runtimeContainer.appendChild(h)}return h}function xb(b){if(!b)b=window.event;if(window.event){window.event.cancelBubble=true;window.event.returnValue=false}if(b.preventDefault){b.cancelBubble=true;b.preventDefault()}b.stopPropagation&&b.stopPropagation()}var Zc={};
|
|
380
381
|
function Vb(b){if(typeof b!=="string")return b;for(;b.charAt(0)==" ";)b=b.replace(b.charAt(0),"");return b}function Qb(b){if(typeof b!=="string")return b;for(;b.charAt(b.length-1)==" ";)b=b.substring(0,b.length-1);return b}function Lb(b){if(typeof b!=="string")return b;return b.replace(/^\s*|\s*$/g,"")}pui.detachCalendar=function(b){if(typeof b=="string")b=Db(b);b!=null&&pui.Bp(b)};
|
|
381
382
|
function Zb(b,a){var c;try{c=document.createElement("<"+b+' name="'+a+'">')}catch(e){c=document.createElement(b);c.name=a}return c}function Oc(b){if(typeof b=="string")b=Db(b);if(b==null)return"";var a=b.textContent;if(a==null){a=b.innerText;if(a==null)return""}for(;a.indexOf(String.fromCharCode(160))!=-1;)a=a.replace(String.fromCharCode(160)," ");return a}
|
|
382
383
|
function Xb(b,a,c){var e=false,f=location.href;f=f.split("?")[0];f=f.split("/");if(f.length>2&&f[f.length-2].toLowerCase()=="auth")e=true;f="/profoundui/";var h=["PUI0009101.PGM","PUI0009102.PGM","PUI0009103.PGM","PUI0009104.PGM","PUI0009107.PGM","PUI0009109.PGM","PUI0009110.PGM","PUI0009119.PGM"];if(typeof pui.widgetURLPrefix==="string"&&h.indexOf(b.toUpperCase())!=-1){f=pui.widgetURLPrefix;if(f.substr(f.length-1)!="/")f+="/"}if(e==true||c==true)f+="auth/";f+=b;if(a!=null&&a==true)f+="/"+PSID;if(pui.serverURL!=
|
|
@@ -430,20 +431,20 @@ window&&pui.Uh(window.parent)&&window.parent.noderun?console.log("Suppressed ale
|
|
|
430
431
|
pui.getDisplayType=function(){return pui.fa?"5250-handler":R=="dspf"?"rdf":"5250"};
|
|
431
432
|
function dd(b){function a(){if(!(r>=n.length)){s=n[r].command;y=n[r].wait;r+=1;if(typeof pui.onPCCommand=="function")try{var C=pui.onPCCommand(s,y);if(C==null||C==true){setTimeout(a,0);return}}catch(F){showFailureMessage(s)}t="?cmd="+encodeURIComponent(s)+"&wait="+(y?"1":"0");if(g==1||g==2)if(l){A.params.cmd=s;A.params.sign=1;A.params.hashalg=typeof pui["pccmd hash sign algorithm"]==="string"?pui["pccmd hash sign algorithm"].toUpperCase():"SHA-512";A.handler=f;dc(A)}else c("");else if(g==3){A.params.cmd=
|
|
432
433
|
s;A.handler=e;dc(A)}else{if(r==0&&n.length>0){C=[];for(var G=0;G<n.length;G++)C.push("("+n[G].wz+")");s=C.join(" && ")}try{o.runCommand(s)}catch(B){C='Unable to execute "'+s+'".\n\n';if(B!=null)C+=B.name+":\n\n"+B.message+".";alert(C)}}}}function c(C){if(g==2){var F=new Image;F.onload=a;F.onerror=function(){console.log("PC Command Listener image mode failure.");h(s)};F.src=p+t+"&type=image&rnd="+String(Math.random())+String((new Date).getTime())+C}else{C=new pui.Ajax(p+t+C);C.method="GET";C.async=
|
|
433
|
-
y?false:true;C.suppressAlert=true;C.onfail=function(B){if(B.uf()!=200){console.log("PC Command Listener comm. failure: "+B.Ni());h(s)}};C.onsuccess=function(B){try{var
|
|
434
|
-
"string"&&C.error.length>0)throw"PCCMD crypt error: "+String(C.error);if(typeof C.cmd!=="string"||C.cmd.length==0)throw"PCCMD crypt response was missing a command.";var G="puilaunch:"+encodeURIComponent(C.cmd),B=document.createElement("iframe");B.style.display="none";B.src=G;document.body.appendChild(B);setTimeout(function(){B!=null&&B.parentNode!=null&&document.body.removeChild(B);B=null;a()},5E3)}catch(
|
|
434
|
+
y?false:true;C.suppressAlert=true;C.onfail=function(B){if(B.uf()!=200){console.log("PC Command Listener comm. failure: "+B.Ni());h(s)}};C.onsuccess=function(B){try{var D=JSON.parse(B.yc());if(!D.success&&typeof D.error==="string"){console.log("PC Command Listener failure.",D.error);h(s);return}}catch(E){}a()};try{C.send()}catch(G){console.log("PC Command Listener failure.",G);h(s)}}}function e(C,F){try{if(F)throw F;if(C==null)throw"Empty response from PCCMD crypt program.";if(C.error!=null||typeof C.error===
|
|
435
|
+
"string"&&C.error.length>0)throw"PCCMD crypt error: "+String(C.error);if(typeof C.cmd!=="string"||C.cmd.length==0)throw"PCCMD crypt response was missing a command.";var G="puilaunch:"+encodeURIComponent(C.cmd),B=document.createElement("iframe");B.style.display="none";B.src=G;document.body.appendChild(B);setTimeout(function(){B!=null&&B.parentNode!=null&&document.body.removeChild(B);B=null;a()},5E3)}catch(D){console.log(D)}}function f(C,F){try{if(F)throw F;if(typeof C!=="object"||C===null)throw"Empty response";
|
|
435
436
|
if(C.success!==true)throw typeof C.error==="string"&&C.error.length>0?C.error:"Unknown error";var G="";if(typeof C.sig==="string"&&C.sig.length>0)G="&sig="+encodeURIComponent(C.sig);c(G)}catch(B){console.log(B);h(s)}}function h(C){console.log("Command: "+C);C=pui.getLanguageText("runtimeMsg","pccommand error");pui["alert pccommand errors"]!==false?alert(C):console.log(C);console.log("Visit https://docs.profoundlogic.com/x/aQFK for more information on supporting STRPCCMD.")}var g=1,l=false;if(pui["use pc listener"])g=
|
|
436
437
|
1;if(window.HTTPS!=null&&window.HTTPS=="ON"&&g==1)g=2;if(pui["pc listener mode"])g=parseInt(pui["pc listener mode"]);if(typeof pui["pc command mode"]=="string")switch(pui["pc command mode"]){case "applet":g=0;break;case "listener":case "listener_m1":g=1;break;case "listener_m1s":g=1;l=true;break;case "listener_m2":g=2;break;case "listener_m2s":g=2;l=true;break;case "launcher":g=3;break;default:g=1;console.log("Unsupported pc command mode:",pui["pc command mode"])}if(g==0){var o=document.getElementById("PCCommandApplet");
|
|
437
438
|
if(!o){pui.nr=b;ed("runCommandCb");return}}var n=[],r=0;n=typeof b=="string"?[{command:b,wait:false}]:b;var p="http://localhost:"+(typeof pui["pc listener port"]=="number"?pui["pc listener port"]:80)+"/",t="",s,y,A={url:Xb("PUI0009117.pgm"),method:"post",params:{auth:pui.appJob&&pui.appJob.auth?pui.appJob.auth:""},async:true};a()}window.runCommandCb=function(){dd(pui.nr);pui.nr=null};pui.runPCCommand=dd;
|
|
438
439
|
function Wb(b,a){if(a!=null&&typeof a!="string"&&a==true)setTimeout(function(){Wb(b)},0);else if(R=="dspf"){var c=Yc("button");c.id="puiKeyButton";c.style.display="none";applyProperty("puiKeyButton","shortcut key",b);pui.click("puiKeyButton")}else if(arguments.length>1){c=[];for(var e=0;e<arguments.length;e++)c[e]="pressKey('"+arguments[e]+"')";multiStepAction(c)}else if(b.substr(0,6)=="option"){c=b.substr(6);selectOption(c)}else{c=getKeyNameFromDesc(b);c!=""&&pressKeyUsingHexName(c)}}
|
|
439
440
|
pui.isServerBusy=function(){if(typeof R=="undefined")return false;if(R=="dspf"&&pui.Mb===false||R=="genie"&&pui.F.Id===true)return true;for(var b=document.getElementsByTagName("iframe"),a=0;a<b.length;a++){var c=b[a].contentWindow;if(c!=null){var e=null;try{e=c.pui}catch(f){}if(e!=null)if(typeof e==="object")if(typeof e.isServerBusy==="function")if(e.isServerBusy())return true}}return false};
|
|
440
441
|
pui.showLastError=function(){if(Ya.length==0)alert("No errors have been reported.");else{var b=Ya.length-1;alert("Operation: "+Ya[b].Dl+"\nId: "+Ya[b].id+"\n\nMessage: "+Ya[b].text+"\n"+Ya[b].tm)}};
|
|
441
|
-
pui.editCode=function(b,a){function c(S,P){var O=["","","","nn/n","nn/nn","nn/nn/n","nn/nn/nn","nnn/nn/nn","nn/nn/nnnn","nnn/nn/nnnn"];if(l.dateEdit==="*ymd"){O[8]="nnnn/nn/nn";O[9]="nnnnn/nn/nn"}O=O[
|
|
442
|
+
pui.editCode=function(b,a){function c(S,P){var O=["","","","nn/n","nn/nn","nn/nn/n","nn/nn/nn","nnn/nn/nn","nn/nn/nnnn","nnn/nn/nnnn"];if(l.dateEdit==="*ymd"){O[8]="nnnn/nn/nn";O[9]="nnnnn/nn/nn"}O=O[D];S=String(S);S=S.replace(".","");S=S.replace(",","");S=S.replace("-","");S="0000000000"+S;S=S.substr(S.length-P);var da="/";if(l.dateEditSeparator!=null)da=l.dateEditSeparator;for(var T=false,L=0,Z="",N=0;N<O.length;N++){var v=O.substr(N,1),V=O.substr(N+1,1);if(v==="/"||V==="/")T=true;if(v==="/")v=
|
|
442
443
|
da;else{v=S.substr(L,1);L+=1;if(v==="0")T||(v=" ");else T=true}Z+=v}return Z}function e(S,P,O){for(S+="";S.length<P;)S+=O;return S}var f=null,h=0,g=null,l={},o=2;if(typeof arguments[o]==="number"){f=arguments[o];o++;if(typeof arguments[o]==="number"){h=arguments[o];o++}}if(typeof arguments[o]==="string"){g=arguments[o];o++}if(typeof arguments[o]==="object"){l=arguments[o];o++}var n=false;if(g==="*astfill"){n=true;g=null}var r=false,p=null,t=false,s=o=false;o=" ";if(pui.appJob&&typeof pui.appJob.decimalFormat===
|
|
443
444
|
"string")o=pui.appJob.decimalFormat;var y=o==="I"||o==="J",A=o==="J";if(l.decimalEdit!=null){y=l.decimalEdit===","||l.decimalEdit==="0,";A=l.decimalEdit==="0."||l.decimalEdit==="0,"}if(a>="1"&&a<="4")p="999.00";if(a>="A"&&a<="D")p="999.00CR";if(a>="J"&&a<="M")p="999.00-";if(a>="N"&&a<="Q")p="-999.00";if(a=="1"||a=="A"||a=="J"||a=="N"||a=="2"||a=="B"||a=="K"||a=="O")t=true;o=a=="1"||a=="A"||a=="J"||a=="N"||a=="3"||a=="C"||a=="L"||a=="P"?true:false;if(a=="Z")p="999.00";if(a==="X"||a==="Z")s=true;if(a===
|
|
444
|
-
"X")r=true;a>="5"&&a<="9"&&pui.alert("User-defined edit code not supported: "+a+".");a>="1"&&a<="9"||a>="A"&&a<="D"||a>="J"&&a<="Q"||a>="X"&&a<="Z"||pui.alert("Invalid edit code: "+a+".");var C=(b||0)+"",F=parseFloat(C,10)||0,G;G=C.replace(/\..*/,"");if(G==="-0")G="-";if((G==""||G=="-")&&A)G="0";var B;B=C;if(B.indexOf(".")==-1)B+=".";B=B.replace(/.*\./,"");var
|
|
445
|
-
return c(F,
|
|
446
|
-
(function(){var S=
|
|
445
|
+
"X")r=true;a>="5"&&a<="9"&&pui.alert("User-defined edit code not supported: "+a+".");a>="1"&&a<="9"||a>="A"&&a<="D"||a>="J"&&a<="Q"||a>="X"&&a<="Z"||pui.alert("Invalid edit code: "+a+".");var C=(b||0)+"",F=parseFloat(C,10)||0,G;G=C.replace(/\..*/,"");if(G==="-0")G="-";if((G==""||G=="-")&&A)G="0";var B;B=C;if(B.indexOf(".")==-1)B+=".";B=B.replace(/.*\./,"");var D=G.length;if(D<3)D=3;var E=B.length;if(typeof f==="number")D=f;if(typeof h==="number")E=h;if(a=="Y"){if(D<3||D>9)pui.alert("Length not valid for edit code Y.");
|
|
446
|
+
return c(F,D)}f=".";if(y)f=",";if(s)f="";if(E>0){B=e(B,E,"0");if(G==="0"&&!A)G="";C=G+f+B}var K=" ";if(r)K="0";if(n)K="*";if(t){for(h=/(\d+)(\d{3})/;h.test(G);)G=G.replace(h,"$1"+(y?".":",")+"$2");C=G+(E>0?f+B:"");y=D-E-1;y=y>=0?y:0}y=F<0;C=C.replace(/-/g,"");if(p==="(999.00)"){if(y)C="("+C+")"}else if(p==="999.00-")C+=y?"-":" ";else if(p==="999.00CR")C+=y?"CR":" ";else if(p==="-999.00")if(y)C="-"+C;if(g)C=g=="EUR"?C+" EUR":g=="$"?C.substr(0,1)=="-"?"-"+g+C.substr(1):g+C:g+C;if(!o)if(F===0)C="";
|
|
447
|
+
(function(){var S=D;S+=E&&!s?1:0;if(t)S+=parseInt((D-E-1)/3);if(p==="999.00CR")S+=2;if(p==="999.00-")S+=1;if(p==="-999.00")S+=1;if(typeof g==="string")S+=g.length;var P=C;for(P+="";P.length<S;)P=K+P;C=P})();return C};
|
|
447
448
|
pui.editWord=function(b,a,c){function e(){if(A.length>0){var G=A.substr(A.length-1,1);A=A.substr(0,A.length-1);if(G=="0"&&A.length==0&&F)G=C?"*":" "}else{G="0";if(F)G=" ";if(C)G="*"}return G}b=String(b);var f={};if(typeof c==="object")f=c;c="$";if(f.currencySymbol!=null)c=f.currencySymbol;var h=a.indexOf("0")+1,g=a.indexOf("*")+1;if(h==0||g!=0&&g<h)h=g;for(var l=-1,o=a.length-1;o>=0;o-=1)if(o+1==h||a.substr(o,1)==" "){l=o;break}g=a.substr(0,l+1);var n="",r="",p=false,t=false,s=a.substr(l+1).indexOf("-")>=
|
|
448
449
|
0||a.substr(l+1).indexOf("CR")>=0;for(o=l+1;o<a.length;o++){var y=a.substr(o,1);if(a.substr(o,2)=="CR"){t=true;o++}else if(y=="-")t=true;else if(y!="&")if(!(y=="*"&&!t))if(y.toUpperCase()>="A"&&y.toUpperCase()<="Z"&&s&&!t)a=a.substr(0,o)+" "+a.substr(o+1);else{n=a.substring(l+1,o);r=a.substr(o);p=true;break}}p||(n=a.substr(l+1));o=".";y=" ";if(pui.appJob&&typeof pui.appJob.decimalFormat==="string")y=pui.appJob.decimalFormat;if(typeof f.decimalFormat==="string")y=f.decimalFormat;if(y==="I"||y==="J")o=
|
|
449
450
|
",";f=0;o=g.split(o);if(o.length>1)f=o[1].replace(/[^ ]/g,"").length;var A;A=isNaN(Number(b))?"0":String(b);A=A.replace("-","");o=A.split(".");y=o[0];a="";l=null;if(o.length>1)a=o[1];if(l==null||isNaN(l))l=f;for(;a.length>l;)a=a.substr(0,a.length-1);for(;l>a.length;)a+="0";for(A=y+a;A.substr(0,1)=="0";)A=A.substr(1);f="";var C=l=false;var F=a=false;if(h==0)F=true;for(o=g.length-1;o>=0;o-=1){p=y=g.substr(o,1);if(y==" ")p=e();else if(y=="&")p=" ";else if(y=="0"&&o+1==h)p=e();else if(y=="*"){C=true;
|
|
@@ -484,50 +485,50 @@ pui.runLogic=function(b,a,c){if(pui.clientLogic&&pui.clientLogic[b]){pui.routine
|
|
|
484
485
|
if(g==true)return true;var l=false,o=document.createElement("script");o.type="text/javascript";o.onreadystatechange=function(){if(o.readyState=="complete"||o.readyState=="loaded"){!l&&h!=null&&h();l=true}};o.onload=function(){!l&&h!=null&&h();l=true};a[f]=o;o.src=pui.normalizeURL(f);e.appendChild(o);return true};this.load=function(f){c.init();var h=null,g;if(f!=null){g=false;h=f.metaData.screen}else{g=true;h=Ib.designer.Pp[Ib.designer.Ma.tb]}var l={},o=1,n=h["external css"];for(g||(n=pui.R(n,f.data,
|
|
485
486
|
f.ref));n!=null;){l[n]=true;o++;n=h["external css "+o];g||(n=pui.R(n,f.data,f.ref))}o=[];for(n in b)l[n]!=true&&o.push(n);for(var r=0;r<o.length;r++){n=o[r];e.removeChild(b[n]);delete b[n]}for(n in l)c.wv(n);var p=0;if(g!=true){o=1;for(n=pui.R(h["external javascript"],f.data,f.ref);n!=null;){if(c.fr(n,la(),true)){f.Ej=false;p++}o++;n=pui.R(h["external javascript "+o],f.data,f.ref)}if(p>0){o=1;for(n=pui.R(h["external javascript"],f.data,f.ref);n!=null;){c.fr(n,function(){p-=1;if(p==0){pui.onload!=
|
|
486
487
|
null&&typeof pui.onload=="function"&&pui.onload(f);if(pui.clientLogic){var t=h["initial routine"];if(t&&t.routine){t=t.routine;try{eval('pui["routineFunction"] = function() {\r\n'+pui.clientLogic[t]+'\r\n}; \r\npui["routineFunction"]();')}catch(s){console.error(s)}}}t=h.onload;if(t!=null&&t!="")try{eval('var format = "'+h["record format name"]+'";');eval('var file = "'+f.file+'";');eval(t)}catch(y){pui.Ca(y,"Onload Error:\n")}if(h.onmessage&&f.msgInfo!=null){pui.message=f.msgInfo;try{eval('var message = pui["message"];');
|
|
487
|
-
eval(h.onmessage)}catch(A){pui.Ca(A,"Onmessage Error:\n")}}}});o++;n=pui.R(h["external javascript "+o],f.data,f.ref)}}}}};pui.yw=new pui.Lu;pui.Vf=function(b){function a(y,A){setTimeout(function(){y==o&&s.hide()},A)}function c(){if(s.Ec>=0&&s.Ec<=100){s.J.style.filter="alpha(opacity="+s.Ec+")";s.J.style.opacity=s.Ec/100}if(l)s.Ec-=30;else s.Ec+=20;if(l&&s.Ec<=0||!l&&s.Ec>=100)if(l){s.J.style.display="none";s.J.style.visibility="hidden";s.Ec=0}else{s.J.style.filter="alpha(opacity=100)";s.J.style.opacity=1;s.Ec=100}else setTimeout(c,100)}function e(y){if(!pui.cx){y=
|
|
488
|
-
y.keyCode;if(!(A>=9&&A<=45))if(!(A>=112&&A<=145)){y=
|
|
488
|
+
eval(h.onmessage)}catch(A){pui.Ca(A,"Onmessage Error:\n")}}}});o++;n=pui.R(h["external javascript "+o],f.data,f.ref)}}}}};pui.yw=new pui.Lu;pui.Vf=function(b){function a(y,A){setTimeout(function(){y==o&&s.hide()},A)}function c(){if(s.Ec>=0&&s.Ec<=100){s.J.style.filter="alpha(opacity="+s.Ec+")";s.J.style.opacity=s.Ec/100}if(l)s.Ec-=30;else s.Ec+=20;if(l&&s.Ec<=0||!l&&s.Ec>=100)if(l){s.J.style.display="none";s.J.style.visibility="hidden";s.Ec=0}else{s.J.style.filter="alpha(opacity=100)";s.J.style.opacity=1;s.Ec=100}else setTimeout(c,100)}function e(y){if(!pui.cx){y=wb(y);if(y!=null){y=y.H;y!=null&&y.ja!=true&&y.show()}}}function f(y){var A=
|
|
489
|
+
y.keyCode;if(!(A>=9&&A<=45))if(!(A>=112&&A<=145)){y=wb(y);if(y!=null){A=y.H;if(A!=null){A.hide();A.ja=true;pui.da(y,A.qg())}}}}function h(y){y=wb(y);if(y!=null){var A=y.H;if(A!=null){A.hide();A.ja=true;pui.da(y,A.qg())}}}function g(y){if(y!=null)s.Rb=y;else if(typeof r.pui.properties["error message location"]!="undefined")s.Rb=r.pui.properties["error message location"];if(s.Rb!="left"&&s.Rb!="right"&&s.Rb!="top"&&s.Rb!="bottom")s.Rb="right"}this.b=null;this.Ec=0;var l=false,o=0,n=b,r=b;this.Rb="right";
|
|
489
490
|
var p="";this.mi="";if(typeof r.pui.properties["error message css class"]=="string")this.mi=Lb(r.pui.properties["error message css class"]);if(this.mi=="")this.mi="pui-tip-error";var t=this.mi+"-invalid";this.pb=this.Dc=this.J=null;var s=this;if(r.pui.properties["error message attach"]=="parent"){this.Hq=true;this.b=r.parentNode}else{this.Hq=false;this.b=pui.Jw(r);if(this.b==null)this.b=pui.runtimeContainer}if(n.comboBoxWidget!=null)n=n.comboBoxWidget.getBox();if(n.l!=null)n=n.l.getBox();U(n,"focus",
|
|
490
|
-
e);n.tagName=="INPUT"&&(n.type=="text"||pui.dl(n.type))||U(n,"click",e);U(n,"blur",function(y){if(!pui.xg){y=
|
|
491
|
+
e);n.tagName=="INPUT"&&(n.type=="text"||pui.dl(n.type))||U(n,"click",e);U(n,"blur",function(y){if(!pui.xg){y=wb(y);if(y!=null){y=y.H;y!=null&&y.hide()}}});n.tagName=="SELECT"?U(n,"change",h):U(n,"keydown",f);n.H=this;g();gd(this);this.Mh=function(y){p=y;s.Dc.innerHTML='<div class="pui-tip-icon" />';s.Dc.appendChild(document.createTextNode(p))};this.setPosition=function(y,A){s.J.style.left=y+"px";s.J.style.top=A+"px"};this.Nx=function(){var y=s.J.offsetHeight,A=s.J.offsetWidth,C=r.offsetHeight,F=r.offsetWidth,
|
|
491
492
|
G=s.Rb;g();if(G!=s.Rb){gd(s);s.Mh(p)}if(s.Rb=="left"||s.Rb=="right"){y=r.offsetTop-(y-C)/2;A=s.Rb=="left"?r.offsetLeft-A-3:r.offsetLeft+F+3}else{A=r.offsetLeft+(F-A)/2;y=s.Rb=="top"?r.offsetTop-y-3:r.offsetTop+C+3}C=r.parentNode;if(C==null||pui.is_old_ie&&C.nodeName=="#document-fragment"){g("right");gd(s);s.Mh(p);y=0;A=-7}else{if(this.Hq){if(A<0)A=0;if(y<0)y=0}else if(C.getAttribute("container")=="true"){F=pui.layout.tf(C);y+=F.y;A+=F.x}if(C!=s.b&&C.getAttribute("container")!="true"){A+=C.offsetLeft;
|
|
492
493
|
y+=C.offsetTop;C=C.parentNode;if(C!=s.b){A+=C.offsetLeft;y+=C.offsetTop;if(C.parentNode.getAttribute("container")=="true"){F=pui.layout.tf(C.parentNode);y+=F.y;A+=F.x}}}}if(r.style.visibility=="hidden"){C=r.db;F=r.Va;if(C!=null&&F){F=Db(F);if(F!=null){F=F.tabPanel;if(F!=null)if(F.selectedTab!=C){F.selectedTab=C;F.z()}}}}s.setPosition(A,parseInt(y))};this.show=function(y,A){this.ja=false;if(A==true)setTimeout(function(){s.show(y,false)},0);else{if(s.J.style.display=="none"){s.J.style.display="block";
|
|
493
494
|
s.J.style.visibility="";s.Ec=0;l=false;c()}o+=1;if(o>1E4)o=0;y!=null&&a(o,y);s.Nx()}};this.hide=function(){l=true;c()};this.Zw=function(){s.J.style.display="none";s.J.style.visibility="hidden";s.Ec=0};this.qg=function(){return t}};pui.Vf.prototype=Object.create(pui.zd.prototype);
|
|
494
495
|
pui.Vf.prototype.destroy=function(){this.J.removeEventListener("mousedown",this);this.pb.removeEventListener("mousedown",this);this.pb.removeEventListener("mouseup",this);this.pb.removeEventListener("click",this);this.J.removeChild(this.pb);this.J.removeChild(this.Dc);this.J.parentNode.removeChild(this.J);$b(this)};
|
|
495
496
|
function gd(b){var a=b.J!=null;if(a){b.pb.removeEventListener("mousedown",b);b.pb.removeEventListener("mouseup",b);b.pb.removeEventListener("click",b);b.pb.parentNode.removeChild(b.pb);b.pb=null;b.Dc.parentNode.removeChild(b.Dc);b.Dc=null;b.J.removeEventListener("mousedown",b);b.J.parentNode.removeChild(b.J);b.J=null}b.J=document.createElement("div");b.J.classList.add("pui-tip");if(b.Rb=="top")b.J.classList.add("pui-tip-top");else if(b.Rb=="bottom")b.J.classList.add("pui-tip-bottom");else b.Rb=="left"?
|
|
496
497
|
b.J.classList.add("pui-tip-left"):b.J.classList.add("pui-tip-right");b.J.classList.add(b.mi);b.J.style.position="absolute";b.Dc=document.createElement("div");b.Dc.className="pui-tip-content";b.pb=document.createElement("div");b.pb.className="pui-tip-close";b.pb.addEventListener("mousedown",b);b.pb.addEventListener("mouseup",b);b.pb.addEventListener("click",b);b.J.addEventListener("mousedown",b);if(!a){b.J.style.display="none";b.J.style.visibility="hidden"}b.J.appendChild(b.Dc);b.J.appendChild(b.pb);
|
|
497
|
-
b.b.appendChild(b.J)}pui.Vf.prototype.handleEvent=function(b){switch(b.type){case "mousedown":if(b.target==this.pb)this.pb.className="pui-tip-close-click";
|
|
498
|
+
b.b.appendChild(b.J)}pui.Vf.prototype.handleEvent=function(b){switch(b.type){case "mousedown":if(b.target==this.pb)this.pb.className="pui-tip-close-click";xb(b);return false;case "mouseup":this.pb.className="pui-tip-close";break;case "click":this.J.style.display="none";this.J.style.visibility="hidden";this.Ec=0;break;case "scroll":break}};function jd(b){function a(){if(!(ra&&Fa)){A=true;setTimeout(n,200)}}function c(fa){bb=true;fa=fa||window.event;var ma=fa.keyCode;if((ma==38||ma==40)&&B.style.display=="block"){var sa;if(ma==38)sa=T!=null?T-1:L.length-1;else if(ma==40)sa=T!=null?T+1:0;if(sa<0||sa>=L.length)sa=null;h(sa,true);fa.cancelBubble=true;fa.returnValue=false;fa.preventDefault&&fa.preventDefault();fa.stopPropagation&&fa.stopPropagation();return false}else if(ma==9&&T!=null)p();else if(ma==9&&T==null&&pui["autocomplete tab selects"]==
|
|
498
499
|
true){T=0;p()}else if(ma==13){if((ma=B.style.display=="block")&&B.children.length==1&&B.children[0].textContent.toUpperCase()===fa.currentTarget.value.toUpperCase()){T=0;p();n();return true}if(ma&&T!=null){p();n();fa.cancelBubble=true;fa.returnValue=false;fa.preventDefault&&fa.preventDefault();fa.stopPropagation&&fa.stopPropagation();return false}else{n();if(ma){fa.cancelBubble=true;fa.returnValue=false;fa.preventDefault&&fa.preventDefault();fa.stopPropagation&&fa.stopPropagation();return false}}}}
|
|
499
500
|
function e(fa){bb=false;fa=fa||window.event;fa=fa.keyCode;if(!(ia.readOnly||ia.disabled))if(Lb(ia.value)==""){if(N)N.value="";n()}else if(fa==8||fa>=46&&fa<=90||fa>=96&&fa<=111||fa>=186&&fa<=222||(window.xz!=null||typeof window.orientation!=="undefined")&&(fa==0||fa==229))if(ia.value.replace(/ /g,"")!="")if(d&&fb)g(Qb(ia.value.toUpperCase()));else{clearTimeout(Z);A=false;Z=setTimeout(function(){l(Qb(ia.value))},Mb)}}function f(){if(!bb)if(Lb(ia.value)==""){if(N)N.value="";n()}else if(ia.value.replace(/ /g,
|
|
500
501
|
"")!="")if(d&&fb)g(Qb(ia.value.toUpperCase()));else{A=false;l(Qb(ia.value))}}function h(fa,ma){if(T!=null&&B.childNodes!=null&&B.childNodes[T]!=null){B.childNodes[T].className=B.childNodes[T].className.replace(" autocomplete-selected","");B.childNodes[T].className=B.childNodes[T].className.replace("autocomplete-selected","")}if(fa!=null){var sa=B.childNodes[fa];sa.className+=" autocomplete-selected";if(ma==true&&typeof sa.scrollIntoView==="function"){var Pa=0;if(typeof window.pageYOffset=="number")Pa=
|
|
501
502
|
window.pageYOffset;else if(document.body&&document.body.scrollTop)Pa=document.body.scrollTop;else if(document.documentElement&&document.documentElement.scrollTop)Pa=document.documentElement.scrollTop;var kb=0;if(self.innerHeight)kb=self.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)kb=document.documentElement.clientHeight;else if(document.body)kb=document.body.clientHeight;kb=Pa+kb;var lb=sa.offsetTop+sa.parentNode.offsetTop,Qa=sa.parentNode.parentNode;lb+=Qa.offsetTop;
|
|
502
503
|
if(Qa.parentNode!=null&&Qa.parentNode.grid!=null){lb+=Qa.parentNode.offsetHeight;lb+=Qa.parentNode.parentNode.offsetHeight}if(lb+sa.offsetHeight>kb||lb<Pa){V=true;sa.scrollIntoView(true);setTimeout(function(){V=false},1)}if(ra&&sa.offsetTop>Ga&&!V){V=true;sa.scrollIntoView(true);setTimeout(function(){V=false},1)}}}T=fa}function g(fa){if(N)N.value="";if(fa!=""){tb({results:[{field1:""}]});L=[];for(var ma=0;ma<aa.length;ma++)if(b.ew)aa[ma][0].toUpperCase().indexOf(fa)!=-1&&L.push({field1:aa[ma][0],
|
|
503
|
-
field2:aa[ma][1]});else aa[ma][0].toUpperCase().indexOf(fa)==0&&L.push({field1:aa[ma][0],field2:aa[ma][1]});if(L.length==0)n();else if(N&&L.length==1&&ia.value.toUpperCase()==L[0][da].toUpperCase()){N.value=t(L[0],na);n()}else o()}}function l(fa){if(fa=="")n();else if(!(
|
|
504
|
+
field2:aa[ma][1]});else aa[ma][0].toUpperCase().indexOf(fa)==0&&L.push({field1:aa[ma][0],field2:aa[ma][1]});if(L.length==0)n();else if(N&&L.length==1&&ia.value.toUpperCase()==L[0][da].toUpperCase()){N.value=t(L[0],na);n()}else o()}}function l(fa){if(fa=="")n();else if(!(ub&&ub(gb,fa)==false)){v=null;fa=encodeURIComponent($a)+"="+encodeURIComponent(fa);if(qb!=null)fa+="&limit="+qb;if((qb==null||qb=="")&&pui["Default Auto Complete Max Choices"]!=null)fa+="&limit="+encodeURIComponent(pui["Default Auto Complete Max Choices"]);
|
|
504
505
|
if(gb)for(var ma in gb)if(!(gb[ma]==null&&ma==="AUTH")){fa+="&";fa+=encodeURIComponent(ma)+"="+encodeURIComponent(gb[ma])}if(pui["read db driven data as ebcdic"]!==true)fa+="&UTF8=Y";if(N)Ea+=1;ma=gb.AUTH?new pui.Ajax(pui.df(rb)):new pui.Ajax(rb);ma.method="post";ma.async=true;ma.suppressAlert=true;ma.postData=fa;ma.sequence=qa;ma.onready=function(sa){if(N)Ea-=1;if(sa.sequence!=null){if(sa.sequence<qa)return;qa++}if(sa=Kb(sa,"Generate Auto-Complete Suggestions"))if(Lb(ia.value)=="")n();else if(A)n();
|
|
505
506
|
else{sa=eval(sa);L=sa.results;if(R==="dspf"&&typeof sa.valueField==="string"){na=sa.valueField;N={value:""};ia.Ed=N}if((na==null||da==null)&&L!=null&&L.length>0)for(var Pa in L[0]){if(na==null)na=Pa;if(da==null)da=Pa}if(N&&L!=null&&L.length==1&&ia.value.toUpperCase()==L[0][da].toUpperCase())N.value=t(L[0],na);else if(N)N.value="";if(L!=null&&L.length>0){tb&&tb(sa);o()}else n();ga&&pui.mf(ga,true,ia.id)}else ga&&pui.mf(ga,false,ia.id)};ma.send()}}function o(){var fa=ia.offsetWidth;if(!pui.is_old_ie||
|
|
506
507
|
!pui.is_quirksmode)fa-=2;if(Da==null||Da<fa)Da=fa;B.style.width=Da+"px";fa=L;if(b.Lr){fa=[];for(var ma=false,sa=0;sa<b.Lr.length;sa++){var Pa=ia.value,kb=d[sa];if(Pa!==null&&kb!==null){kb=kb.substr(0,Pa.length);Pa=Pa.toUpperCase();kb=kb.toUpperCase()}if(Pa==kb){fa.push(b.Lr[sa]);ma=true}else if(ma)break}}if(!mb){var lb;for(sa in fa[0]){lb=sa;break}mb='<div class="autocomplete-item">('+lb+")</div>"}B.innerHTML="";for(sa=0;sa<fa.length;sa++){lb=mb;for(var Qa in fa[sa])lb=lb.replace("("+Qa+")",fa[sa][Qa]);
|
|
507
508
|
B.innerHTML+=lb;B.lastChild.setAttribute("recordIndex",String(sa))}for(sa=0;sa<B.childNodes.length;sa++)B.childNodes[sa].addEventListener("mousemove",s,false);B.style.display="block";sa=ia;F=ia.offsetTop;G=ia.offsetLeft;if(ia.parentNode!=null&&ia.parentNode.l){F=ia.parentNode.offsetTop;G=ia.parentNode.offsetLeft;sa=ia.parentNode}Qa=sa.parentNode;if(Qa.parentNode.grid){F+=Qa.offsetTop;G+=Qa.offsetLeft;Qa=Qa.parentNode;F+=Qa.offsetTop;G+=Qa.offsetLeft;Qa=Qa.parentNode}if(Qa.getAttribute("container")==
|
|
508
|
-
"true"){Qa=pui.layout.tf(Qa);F+=Qa.y;G+=Qa.x}if(R=="genie")if(sa.parentNode.layerInfo){F+=sa.parentNode.offsetTop+sa.parentNode.clientTop;G+=sa.parentNode.offsetLeft+sa.parentNode.clientLeft}F+=ia.offsetHeight;F+=hb;G+=ta;sa=pui.Cs();if(F-sa+B.offsetHeight>pui.getWindowSize().height){Qa=F-B.offsetHeight-ia.offsetHeight-3;if(Qa-sa>=0)F=Qa}B.style.top=F+"px";B.style.left=G+"px";if(La){B.style.height="";ra=false;if(B.clientHeight>Ga){B.style.height=String(Ga)+"px";ra=true}B.style.overflowY="auto"}if(sb){
|
|
509
|
-
F+3+"px";
|
|
510
|
-
6)K.style.height=B.offsetHeight-6+"px";if(B.offsetHeight>=6)O.style.top=B.offsetHeight-6+"px";O.style.right="0px";O.style.height="6px";O.style.width="6px";
|
|
509
|
+
"true"){Qa=pui.layout.tf(Qa);F+=Qa.y;G+=Qa.x}if(R=="genie")if(sa.parentNode.layerInfo){F+=sa.parentNode.offsetTop+sa.parentNode.clientTop;G+=sa.parentNode.offsetLeft+sa.parentNode.clientLeft}F+=ia.offsetHeight;F+=hb;G+=ta;sa=pui.Cs();if(F-sa+B.offsetHeight>pui.getWindowSize().height){Qa=F-B.offsetHeight-ia.offsetHeight-3;if(Qa-sa>=0)F=Qa}B.style.top=F+"px";B.style.left=G+"px";if(La){B.style.height="";ra=false;if(B.clientHeight>Ga){B.style.height=String(Ga)+"px";ra=true}B.style.overflowY="auto"}if(sb){D.style.top=
|
|
510
|
+
F+3+"px";D.style.left=G-4+"px";D.style.width=Da+10+"px";D.style.height=B.offsetHeight+2+"px";E.style.top="0px";E.style.left="0px";E.style.width="6px";if(B.offsetHeight>=6)E.style.height=B.offsetHeight-6+"px";if(B.offsetHeight>=6)P.style.top=B.offsetHeight-6+"px";P.style.left="0px";P.style.height="6px";P.style.width="6px";if(B.offsetHeight>=6)S.style.top=B.offsetHeight-6+"px";S.style.left="6px";S.style.height="6px";S.style.width=Da-2+"px";K.style.top="0px";K.style.right="0px";K.style.width="6px";if(B.offsetHeight>=
|
|
511
|
+
6)K.style.height=B.offsetHeight-6+"px";if(B.offsetHeight>=6)O.style.top=B.offsetHeight-6+"px";O.style.right="0px";O.style.height="6px";O.style.width="6px";D.style.display="block"}}function n(){if(B!=null)B.style.display="none";if(sb)D.style.display="none";L=[];T=null}function r(){B.style.display=="block"&&o()}function p(){if(T!=null){for(var fa in L[T]){ia.value=L[T][fa];break}v=L[T];if(N!=null)if(L[T]!=null)N.value=t(L[T],na);if(ab)if(pui.Zb(b.pt))pui.runLogic(b.pt.routine,ia.o,ia.Wj);else try{var ma=
|
|
511
512
|
eval(ab);typeof ma=="function"&&ma(v,ia)}catch(sa){pui.Ca(sa,"Onselect error:\n")}}}function t(fa,ma){var sa=fa[ma];if(sa==null)for(var Pa in fa)sa=fa[Pa];return sa}function s(fa){if(!V){fa=fa||window.event;fa=fa.target||fa.srcElement;var ma=fa.getAttribute("recordIndex");if(ma==""||ma==null){fa=fa.parentNode;ma=fa.getAttribute("recordIndex");if(ma==""||ma==null)return}h(Number(ma))}}function y(fa){if(ra&&ua!=null&&B.offsetWidth!=null){var ma=fa.currentTarget.getBoundingClientRect().right-ua;if(pui.zo(fa)>
|
|
512
|
-
ma)return true}return false}var A=false,C=this,F,G,B,E,
|
|
513
|
-
false,bb=false,Ca,ia,rb,na,hb,ta,Ua,Da,gb,$a,qb,sb,mb,Mb,ab,
|
|
513
|
+
ma)return true}return false}var A=false,C=this,F,G,B,D,E,K,S,P,O,da,T=null,L=[],Z,N,v,V=false,La=false,ra=false,ua=function(){var fa=document.createElement("div");fa.style.overflow="scroll";fa.style.visibility="hidden";fa.style.position="absolute";document.body.appendChild(fa);fa.style.height="50px";fa.style.width="50px";var ma=document.createElement("div");ma.style.height="1px";fa.appendChild(ma);ma=ma.offsetWidth;var sa=fa.offsetWidth;fa.parentElement.removeChild(fa);return sa-ma}(),Ga=null,Fa=
|
|
514
|
+
false,bb=false,Ca,ia,rb,na,hb,ta,Ua,Da,gb,$a,qb,sb,mb,Mb,ab,ub,tb,d,fb,aa,ga,qa=0;rb=b.url;na=b.valueField;ia=typeof b.gq=="object"?b.gq:document.getElementById(b.gq);ia.setAttribute("autocomplete","off");Ca=b.b?b.b:ia.parentNode;if(R=="genie"){ia.setAttribute("fieldLength",ia.getAttribute("maxLength"));ia.setAttribute("maxLength","133")}if(b.choices&&b.values){Ua=false;var xa=Lb(ia.value);aa=[];d=b.choices;fb=b.values;for(var Oa=0;Oa<fb.length;Oa++)if(d[Oa]!=null){aa[aa.length]=[];aa[aa.length-1][0]=
|
|
514
515
|
Lb(d[Oa]);aa[aa.length-1][1]=Lb(fb[Oa]);if(!Ua&&xa!="")if(xa==Lb(fb[Oa])){ia.value=Lb(d[Oa]);Ua=ia.vr=true}}aa.sort(function(fa,ma){return fa[0].toUpperCase()<ma[0].toUpperCase()?-1:1});da="field1";na="field2"}if(na){if(R=="genie"){Ua=ia.getAttribute("name");ia.removeAttribute("name");try{N=document.createElement('<input name="'+Ua+'" />')}catch(db){N=document.createElement("input");N.name=Ua}N.type="hidden";N.value=ia.value;N.rz=ia;if(ia.B!=null){ia.setAttribute("fieldRow",ia.B.row);ia.setAttribute("fieldCol",
|
|
515
|
-
ia.B.col);Ua=ia.B.idx;N.B=ia.B;pui.response[Ua]=N;ia.B=null}document.forms.main.appendChild(N)}if(R=="dspf"){N={value:""};ia.Ed=N}}hb=b.az?b.az:0;ta=b.px?b.px:0;Ua=b.zIndex?b.zIndex:1E5;if(typeof b.width!="undefined")Da=b.width;if(b.baseParams)gb=b.baseParams;$a=b.Hx?b.Hx:"query";if(typeof b.ml!="undefined")qb=b.ml;sb=typeof b.shadow!="undefined"&&b.shadow==false?false:true;if(typeof b.beforequery=="function")
|
|
516
|
+
ia.B.col);Ua=ia.B.idx;N.B=ia.B;pui.response[Ua]=N;ia.B=null}document.forms.main.appendChild(N)}if(R=="dspf"){N={value:""};ia.Ed=N}}hb=b.az?b.az:0;ta=b.px?b.px:0;Ua=b.zIndex?b.zIndex:1E5;if(typeof b.width!="undefined")Da=b.width;if(b.baseParams)gb=b.baseParams;$a=b.Hx?b.Hx:"query";if(typeof b.ml!="undefined")qb=b.ml;sb=typeof b.shadow!="undefined"&&b.shadow==false?false:true;if(typeof b.beforequery=="function")ub=b.beforequery;if(typeof b.onload=="function")tb=b.onload;if(b.onselect!=null)ab=b.onselect;
|
|
516
517
|
if(b.qt!=null)ga=b.qt;if(typeof b.template!="undefined")mb=b.template;Mb=typeof b.typeAheadDelay==="number"?b.typeAheadDelay:200;if(typeof b.$t!="undefined"&&typeof b.maxHeight!="undefined"&&b.maxHeight!=null){La=b.$t;Ga=b.maxHeight}B=document.createElement("div");B.style.display="none";B.style.margin="0px";B.style.padding="0px";B.style.position="absolute";B.style.zIndex=Ua;B.className="autocomplete-results "+Lb(ia.id)+"-autocomplete-results";B.addEventListener("mousedown",function(fa){Fa=true;setTimeout(function(){ia.focus()},
|
|
517
|
-
0);if(!y(fa)){p();n()}},false);B.addEventListener("mouseup",function(){Fa=false},false);Ca.appendChild(B);if(sb){xa="";if(Ba=="ON")xa="https://"+HTTP_HOST;xa+=pui.normalizeURL("/profoundui/proddata/images/");
|
|
518
|
-
xa+"shadow-side.png) repeat-y scroll";
|
|
519
|
-
"0px";K.style.margin="0px";K.style.position="absolute";K.style.background="transparent url("+xa+"shadow-side.png) repeat-y scroll -6px";
|
|
520
|
-
f,false);window.addEventListener("resize",r,false);this.gu=function(fa){mb=fa};this.gl=function(){return B.style.display=="block"};this.setWidth=function(fa){Da=fa};this.Uz=function(){return v};this.destroy=function(){ia.removeEventListener("keyup",e);ia.removeEventListener("keydown",c);ia.removeEventListener("blur",a);ia.removeEventListener("input",f);ia.removeEventListener("resize",r);window.removeEventListener("resize",r);C=ga=aa=fb=d=tb=
|
|
518
|
+
0);if(!y(fa)){p();n()}},false);B.addEventListener("mouseup",function(){Fa=false},false);Ca.appendChild(B);if(sb){xa="";if(Ba=="ON")xa="https://"+HTTP_HOST;xa+=pui.normalizeURL("/profoundui/proddata/images/");D=document.createElement("div");D.style.display="none";D.style.padding="0px";D.style.margin="0px";D.style.position="absolute";D.style.zIndex=Ua-1;D.style.fontSize="0px";E=document.createElement("div");E.style.padding="0px";E.style.margin="0px";E.style.position="absolute";E.style.background="transparent url("+
|
|
519
|
+
xa+"shadow-side.png) repeat-y scroll";D.appendChild(E);P=document.createElement("div");P.style.padding="0px";P.style.margin="0px";P.style.position="absolute";P.style.background="transparent url("+xa+"shadow.png) no-repeat scroll 0px -12px";D.appendChild(P);S=document.createElement("div");S.style.padding="0px";S.style.margin="0px";S.style.position="absolute";S.style.background="transparent url("+xa+"shadow.png) repeat-x scroll 0px -36px";D.appendChild(S);K=document.createElement("div");K.style.padding=
|
|
520
|
+
"0px";K.style.margin="0px";K.style.position="absolute";K.style.background="transparent url("+xa+"shadow-side.png) repeat-y scroll -6px";D.appendChild(K);O=document.createElement("div");O.style.padding="0px";O.style.margin="0px";O.style.position="absolute";O.style.background="transparent url("+xa+"shadow.png) no-repeat scroll 0px -6px";D.appendChild(O);Ca.appendChild(D)}ia.addEventListener("keyup",e,false);ia.addEventListener("keydown",c,false);ia.addEventListener("blur",a,false);ia.addEventListener("input",
|
|
521
|
+
f,false);window.addEventListener("resize",r,false);this.gu=function(fa){mb=fa};this.gl=function(){return B.style.display=="block"};this.setWidth=function(fa){Da=fa};this.Uz=function(){return v};this.destroy=function(){ia.removeEventListener("keyup",e);ia.removeEventListener("keydown",c);ia.removeEventListener("blur",a);ia.removeEventListener("input",f);ia.removeEventListener("resize",r);window.removeEventListener("resize",r);C=ga=aa=fb=d=tb=ub=ab=sb=gb=ia=Ca=v=N=Z=L=T=da=O=P=S=K=E=D=B=null};this.Eu=
|
|
521
522
|
function(fa){rb=fa}}
|
|
522
523
|
function md(b,a,c){var e=ac(b["choices database file"],a,c),f=ac(b["choice options field"],a,c),h=pui.oh(f),g=ac(b["choices url"],a,c);f=ac(b["use choices url for reverse lookup"],a,c);f=g!=""&&f!=null&&(f=="true"||f==true)?true:false;var l=ac(b["choice values field"],a,c),o=ac(b["max choices"],a,c),n=ac(b["contains match"])=="true",r=ac(b.choices,a,c);r=pui.ha(r);if(r.length==0)r=[""];var p=ac(b["choice values"],a,c);if(p==""){p=[];for(var t=0;t<r.length;t++)p.push(r[t])}else p=pui.ha(p);if(p.length==
|
|
523
524
|
0)p=[""];var s=Lb(ac(b["results template"],a,c));if(s=="")s=null;if(e!=""&&h[0]!=""||g!=""||r.length>0&&r[0]!=""&&p[0]!=""){var y=ac(b.onselect,a,c),A;if(y!=null&&y!=""){A=y;y=A.indexOf("(");if(y!=-1)if(A.substr(y+1,1)==")")A=A.substr(0,y)}y=ac(b.ondbload,a,c);if(typeof y!="string"||y=="")y=null;var C={};if(pui.isCloud)C.workspace_id=pui.cloud.ws.id;if(pui.ba)C.AUTH=pui.ba;else if(g==""||!pui.bj){C.AUTH=pui.appJob.auth;if(typeof pui.vId!=="undefined")C.VID=pui.vId}if(g==""&&r[0]==""&&p[0]==""){n=
|
|
524
|
-
ac(b["contains match"],a,c)=="true";var F="SELECT DISTINCT ";for(t=0;t<h.length;t++){if(t!=0)F+=", ";F+=h[t]}if(l!="")F+=","+l;F+=" FROM "+e;F+=" WHERE UPPER("+h[0]+") LIKE '";if(n)F+="%";F+="!!QUERY!!%'";t=ac(b["choices selection criteria"],a,c);if(t!="")F+=" AND ("+t+")";F+=" ORDER BY "+h[0]}if(c.kc!=null&&c.kc.destroy!=null){c.kc.destroy();c.kc=null}var G;if(R=="dspf"&&Fb())G=Ib.designer.b;else{for(t=c.parentNode;t;){if(t.Ac){G=t;break}t=t.parentNode}if(G==null)G=pui.runtimeContainer}var B=function(
|
|
525
|
-
Qb(
|
|
526
|
-
c.N!=null&&c.N.textTransform=="uppercase")K=B(K);else{if(ac(b["text transform"],a,c)=="lowercase"||c.N!=null&&c.N.textTransform=="lowercase")K=Qb(K.toLowerCase())}else K=B(K);if(K=="")return false;if(pui.secLevel>0){if(ac(b["contains match"],a,c)=="true")K="%"+Lb(K)+"%";else K+="%";
|
|
527
|
-
K.style.position="absolute";K.style.top="0px";K.style.left="0px";K.style.className="autocomplete-item";K.style.visibility="hidden";document.body.appendChild(K);var S='<div class="autocomplete-item">',P=
|
|
528
|
-
S+=K.offsetWidth+5+'px;"';T+=K.offsetWidth+5}else if(typeof P[da]=="string"){S+=P[da]+';"';L=Number(P[da].replace("px",""));isNaN(L)||(T+=L)}else{S+='100px"';T+=100}else{S+='100px"';T+=100}S+=">("+Z+")</div>";da++}}S+="</div>";c.An=S;c.Bn=T+20;c.Lv=true;
|
|
525
|
+
ac(b["contains match"],a,c)=="true";var F="SELECT DISTINCT ";for(t=0;t<h.length;t++){if(t!=0)F+=", ";F+=h[t]}if(l!="")F+=","+l;F+=" FROM "+e;F+=" WHERE UPPER("+h[0]+") LIKE '";if(n)F+="%";F+="!!QUERY!!%'";t=ac(b["choices selection criteria"],a,c);if(t!="")F+=" AND ("+t+")";F+=" ORDER BY "+h[0]}if(c.kc!=null&&c.kc.destroy!=null){c.kc.destroy();c.kc=null}var G;if(R=="dspf"&&Fb())G=Ib.designer.b;else{for(t=c.parentNode;t;){if(t.Ac){G=t;break}t=t.parentNode}if(G==null)G=pui.runtimeContainer}var B=function(E){E=
|
|
526
|
+
Qb(E.replace(/\u00DF/g,"\u1e9e"));E=E.toUpperCase();return E=E.replace(/\u1E9E/g,"\u00df")},D=new jd({gq:c,url:g!=""?g:Xb("PUI0009102.PGM"),baseParams:C,b:G,ew:n,choices:r[0]!=""?r:null,values:p[0]!=""?p:null,ml:o!=""?o:null,template:s,onselect:A,pt:b.onselect,qt:y,typeAheadDelay:pui["autocomplete typeahead delay"],valueField:g==""&&r[0]==""&&p[0]==""&&l!=""&&l!=h[0]?l:null,beforequery:g==""&&r[0]==""&&p[0]==""?function(E,K){if(ac(b["case sensitive"],a,c)=="true")if(ac(b["text transform"],a,c)=="uppercase"||
|
|
527
|
+
c.N!=null&&c.N.textTransform=="uppercase")K=B(K);else{if(ac(b["text transform"],a,c)=="lowercase"||c.N!=null&&c.N.textTransform=="lowercase")K=Qb(K.toLowerCase())}else K=B(K);if(K=="")return false;if(pui.secLevel>0){if(ac(b["contains match"],a,c)=="true")K="%"+Lb(K)+"%";else K+="%";E.q=pui.Wc(c);E.p1=K;pui.ld(b,E)}else{K=K.replace(/'/g,"''");E.q=pui.xb.lf(F.replace("!!QUERY!!",K))}}:null,onload:function(E){if(!s)if(c.Lv!=null){c.An&&D.gu(c.An);c.Bn&&D.setWidth(c.Bn)}else{var K=document.createElement("div");
|
|
528
|
+
K.style.position="absolute";K.style.top="0px";K.style.left="0px";K.style.className="autocomplete-item";K.style.visibility="hidden";document.body.appendChild(K);var S='<div class="autocomplete-item">',P=E.colWidths,O=E.results[0],da=0,T=0,L;for(var Z in O){if(g==""&&da==h.length)break;if(!(g!=""&&typeof E.valueField==="string"&&Z==E.valueField)){K.innerHTML="";S+='<div class="autocomplete-col" style="float: left; width: ';if(P&&P[da])if(typeof P[da]=="number"){for(L=0;L<P[da];L++)K.innerHTML+="a";
|
|
529
|
+
S+=K.offsetWidth+5+'px;"';T+=K.offsetWidth+5}else if(typeof P[da]=="string"){S+=P[da]+';"';L=Number(P[da].replace("px",""));isNaN(L)||(T+=L)}else{S+='100px"';T+=100}else{S+='100px"';T+=100}S+=">("+Z+")</div>";da++}}S+="</div>";c.An=S;c.Bn=T+20;c.Lv=true;D.setWidth(c.Bn);D.gu(c.An);document.body.removeChild(K)}},shadow:pui.is_old_ie&&pui.ie_mode<=6?false:true,$t:true,maxHeight:isNaN(parseInt(ac(b["max height"],a,c)))?null:parseInt(ac(b["max height"],a,c))});c.kc=D;if((f||g==""&&h[0]!=""&&l!=""&&l!=
|
|
529
530
|
h[0])&&c.value!=""){A=new pui.Ajax(g!=""?g:Xb("PUI0009102.PGM"));A.method="post";A.async=true;A.suppressAlert=true;if(pui.ba)A.postData="AUTH="+pui.ba;else{A.postData="AUTH="+pui.appJob.auth;if(typeof pui.vId!=="undefined")A.postData+="&VID="+pui.vId}if(f)A.postData+="&reverse=1&value="+encodeURIComponent(Qb(c.value));else if(pui.secLevel>0){A.postData+="&q="+encodeURIComponent(pui.Wc(c))+".reverse";A.postData+="&p1="+encodeURIComponent(Qb(c.value));e=pui.ld(b);if(e!="")A.postData+="&"+e}else{t=ac(b["choices selection criteria"],
|
|
530
|
-
a,c);e="SELECT "+h[0]+" FROM "+e+" WHERE "+l+" = '"+Qb(c.value).replace("'","''")+"'";if(t!="")e+=" AND ("+t+")";A.postData+="&q="+pui.xb.lf(e)}A.postData+="&limit=1";if(pui.isCloud)A.postData+="&workspace_id="+pui.cloud.ws.id;A.onready=function(
|
|
531
|
+
a,c);e="SELECT "+h[0]+" FROM "+e+" WHERE "+l+" = '"+Qb(c.value).replace("'","''")+"'";if(t!="")e+=" AND ("+t+")";A.postData+="&q="+pui.xb.lf(e)}A.postData+="&limit=1";if(pui.isCloud)A.postData+="&workspace_id="+pui.cloud.ws.id;A.onready=function(E){Ea-=1;if(E=Kb(E,"Generate Auto-Complete Suggestions.")){var K;E=E.results[0];for(var S in E){K=S;break}if(K==null){if(pui["force auto complete match"]!==false)c.value=""}else{if(c.Ed!=null)c.Ed.value=c.value;c.value=E[K]}}else if(pui["force auto complete match"]!==
|
|
531
532
|
false)c.value=""};Ea+=1;A.send()}}};function pd(b){for(var a=false,c=0,e=0;e<b.length;e++)if((b.charCodeAt(e)>=19968&&b.charCodeAt(e)<=40959||b.charCodeAt(e)>=19968&&b.charCodeAt(e)<=40895||b.charCodeAt(e)>=12352&&b.charCodeAt(e)<=12447||b.charCodeAt(e)>=12448&&b.charCodeAt(e)<=12543||b.charCodeAt(e)>=44032&&b.charCodeAt(e)<=55203||b.charCodeAt(e)>=4352&&b.charCodeAt(e)<=4607||b.charCodeAt(e)>=12593&&b.charCodeAt(e)<=12686||b.charCodeAt(e)>=65441&&b.charCodeAt(e)<=65500?true:false)==true){a==false&&c++;a=true;c+=2}else{a==true&&c++;
|
|
532
533
|
a=false;c++}a==true&&c++;return c}pui.Lz=pd;function qd(b){this.toString=function(){return"INVALID: "+this.message};this.message=b}
|
|
533
534
|
function rd(b){this.Vg[0][0][0]||this.mv();var a,c,e,f,h=this.Vg[0][4],g=this.Vg[1];a=b.length;var l=1;if(a!==4&&a!==6&&a!==8)throw new qd("invalid key size");this.iv=[e=b.slice(0),f=[]];for(b=a;b<4*a+28;b++){c=e[b-1];if(b%a===0||a===8&&b%a===4){c=h[c>>>24]<<24^h[c>>16&255]<<16^h[c>>8&255]<<8^h[c&255];if(b%a===0){c=c<<8^c>>>24^l<<24;l=l<<1^(l>>7)*283}}e[b]=e[b-a]^c}for(a=0;b;a++,b--){c=e[a&3?b:b-4];f[a]=b<=4||a<4?c:g[0][h[c>>>24]]^g[1][h[c>>16&255]]^g[2][h[c>>8&255]]^g[3][h[c&255]]}}
|
|
@@ -571,71 +572,71 @@ null))pui.focusOnContainer();pui.Mb=true;pui.iu();pui.nt!=null&&pui.nt.update();
|
|
|
571
572
|
pui.iu=function(){for(var b=0;b<pui.Ua.length;b++){var a=pui.Ua[b];if(a.d!=null&&!a.Zt){a.d.xn!=null&&typeof a.d.xn=="function"&&a.d.xn();a.d.Lf=true;a.d.cc==1&&a.d.z();a.Zt=true}}};
|
|
572
573
|
pui.Fp=function(b){function a(aa,ga,qa){var xa;if(S[aa].root!=null&&S[aa].b!=null){xa=S[aa].root;qa=S[aa].b}else xa=S[aa];aa=xa;var Oa=qa-1;if(aa.dg[Oa]==null)aa.dg[Oa]=[];var db=aa.P.id,fa={};for(var ma in ga)if(ga.layout!=db||ma!="container"&&ma!="layout")if(typeof ga[ma]=="object"&&ga[ma]!=null)try{fa[ma]=JSON.parse(JSON.stringify(ga[ma]))}catch(sa){}else fa[ma]=ga[ma];aa.dg[Oa].push(fa);if(ga["field type"]=="layout"||ga["field type"]=="grid")S[ga.id]={root:xa,b:qa}}function c(){bb=pui.L(Fa.fieldName);
|
|
573
574
|
Ca=p+"."+bb;if(pui.handler!=null)Ca=bb;if(b.o!=null)Ca+="."+b.o}var e=ud(),f=b.designMode;if(f==null)f=false;var h=b.metaData.screen,g=b.metaData.items,l=b.metaData["dds field order"],o=b.metaData["subfile field order"],n=b.designer,r=b.data,p=b.name,t=false,s=[],y={},A=pui["strict tab control"],C=b.Dj==null&&b.ll==null;if(pui.controller!=null&&h!=null)for(var F="",G=1,B="error condition";h[B+F];){if(pui.R(h[B+F],r)=="1"){F=pui.R(h["error message"+F],r);s.push({msg:F});break}F=" "+ ++G}!f&&b.o==null&&
|
|
574
|
-
b.ll==null&&pui.currentFormatNames.push(p);if(h!=null){if(pui.R(h["show as window"],r,b.ref)=="true")t=true;if(h["window reference"]!=null&&h["window reference"]!="")t=true}if(!f&&C){p=p||pui.format;pui.Z[p]={};var
|
|
575
|
-
true}G=b.metaData.screen["return cursor position"];if(pui.p(G)){if(pui.Aa.position==null)pui.Aa.position={};pui.Aa.position[
|
|
576
|
-
if(pui.p(G))pui.ym=
|
|
577
|
-
G=b.metaData.screen["target record number"];if(pui.p(G))pui.lb.eq=
|
|
578
|
-
pui.R(h["set cursor condition"],r,b.ref);if(G!=true&&G!="true"){pui.r.Rf=null;pui.r.Me=null}}if(b.jl&&h["strict tab control"]!=null&&h["strict tab control"]!="")A=pui.R(h["strict tab control"],r,b.ref)==="true"}if(f){n.Ma.name=h["record format name"];if(n.Ma.name==null||n.Ma.name=="")n.Ma.name="[Unnamed Screen]";for(B in h){var
|
|
579
|
-
"object")F=pui.display.logic[
|
|
580
|
-
parseInt(g[
|
|
581
|
-
g[
|
|
582
|
-
Number(g[
|
|
583
|
-
if(v.xc[L].Hh==true){v.xc[L].style.display="";v.xc[L].Hh=false}}if(v.Yk===true){pui.iw(v);v.Yk=false}if(b.Y!=null&&b.Y.text!=""&&(String(g[
|
|
584
|
-
null)v.style.top=L;if(!f&&g[
|
|
585
|
-
{};if(b.ox)F=null;if(pui.display&&typeof pui.display==="object"&&typeof pui.display.logic==="object"&&typeof pui.display.logic[
|
|
586
|
-
|
|
587
|
-
p;v.Sc=pui.L(
|
|
588
|
-
|
|
589
|
-
"initial sort field")v.dx=
|
|
590
|
-
"range low"||ra=="range high")&&g[
|
|
591
|
-
null;Z=Db(g[
|
|
592
|
-
v))}for(B in V){F=v.Eh==null?pui.Li(K,B):pui.Li(v.Eh,B);if(F!=null){
|
|
593
|
-
"J"){v.type="number";Fa.maxLength>0&&U(v,"textInput",function(aa){var ga=
|
|
575
|
+
b.ll==null&&pui.currentFormatNames.push(p);if(h!=null){if(pui.R(h["show as window"],r,b.ref)=="true")t=true;if(h["window reference"]!=null&&h["window reference"]!="")t=true}if(!f&&C){p=p||pui.format;pui.Z[p]={};var D=pui.handler==null?p+".":"";G=b.metaData.screen["return cursor record"];if(pui.p(G)){if(pui.Aa.record==null)pui.Aa.record={};pui.Aa.record[D+pui.L(G.fieldName)]=true}G=b.metaData.screen["return cursor field"];if(pui.p(G)){if(pui.Aa.field==null)pui.Aa.field={};pui.Aa.field[D+pui.L(G.fieldName)]=
|
|
576
|
+
true}G=b.metaData.screen["return cursor position"];if(pui.p(G)){if(pui.Aa.position==null)pui.Aa.position={};pui.Aa.position[D+pui.L(G.fieldName)]=true}G=b.metaData.screen["return cursor row"];if(pui.p(G)){if(pui.Aa.row==null)pui.Aa.row={};pui.Aa.row[D+pui.L(G.fieldName)]=true}G=b.metaData.screen["return cursor column"];if(pui.p(G)){if(pui.Aa.column==null)pui.Aa.column={};pui.Aa.column[D+pui.L(G.fieldName)]=true}G=b.metaData.screen.changed;if(pui.p(G))pui.Dk[p]=D+pui.L(G.fieldName);G=b.metaData.screen["window left"];
|
|
577
|
+
if(pui.p(G))pui.ym=D+pui.L(G.fieldName);G=b.metaData.screen["window top"];if(pui.p(G))pui.Am=D+pui.L(G.fieldName);G=b.metaData.screen["valid command key"];if(pui.p(G))pui.wm=D+pui.L(G.fieldName);G=b.metaData.screen["back button"];if(pui.p(G))pui.oi=D+pui.L(G.fieldName);G=b.metaData.screen["dd element id"];if(pui.p(G))pui.lb.Wn=D+pui.L(G.fieldName);G=b.metaData.screen["dd record number"];if(pui.p(G))pui.lb.Xn=D+pui.L(G.fieldName);G=b.metaData.screen["target element id"];if(pui.p(G))pui.lb.dq=D+pui.L(G.fieldName);
|
|
578
|
+
G=b.metaData.screen["target record number"];if(pui.p(G))pui.lb.eq=D+pui.L(G.fieldName);D=1;for(G=b.metaData.screen["set off"];pui.p(G);){pui.jm.push(p+"."+pui.L(G.fieldName));D++;G=b.metaData.screen["set off "+D]}pui.Vn=pui.R(h["bypass validation"],r,b.ref);pui.r.Rf=pui.R(h["set cursor row"],r,b.ref);pui.r.Me=pui.R(h["set cursor column"],r,b.ref);pui.r.Od=pui.R(h["no focus"],r,b.ref);if(pui.r.Od=="true")pui.r.Od=true;if(pui["no focus"]=="true"||pui["no focus"]==true)pui.r.Od=true;if(pui.p(h["set cursor condition"])){G=
|
|
579
|
+
pui.R(h["set cursor condition"],r,b.ref);if(G!=true&&G!="true"){pui.r.Rf=null;pui.r.Me=null}}if(b.jl&&h["strict tab control"]!=null&&h["strict tab control"]!="")A=pui.R(h["strict tab control"],r,b.ref)==="true"}if(f){n.Ma.name=h["record format name"];if(n.Ma.name==null||n.Ma.name=="")n.Ma.name="[Unnamed Screen]";for(B in h){var E=h[B];n.Pp[n.Ma.tb][B]=E;n.CA[n.Ma.tb][B]=true;if(pui.wf.hq&&pui.Zb(E))if(f){F={};if(b.ox)F=null;if(pui.display&&typeof pui.display.logic==="object"&&typeof pui.display.logic[E.routine]===
|
|
580
|
+
"object")F=pui.display.logic[E.routine];pui.wf.hq.update({name:E.routine,e:n,designer:n,property:B,data:F})}}n.zz=l;n.MA=o}if(!f&&C)if(pui.R(h["disable enter key"],r,b.ref)=="true")pui.bo=true;var K=Dc();l=[];o=[];G=[];var S={},P=false;if(b.jq!==undefined&&b.jq!==null){g.push(b.jq);P=true}for(D=0;D<g.length;D++)if(!(b.hideControlRecord==true&&!f&&g[D]["field type"]!="grid"&&g[D].grid==null&&g[D]["cursor row"]!=null)){if(!f&&b.Dj!=null&&g[D]["field type"]=="output field"&&g[D].visibility=="hidden"){var O=
|
|
581
|
+
parseInt(g[D].top),da=parseInt(g[D].left);if(!isNaN(O)&&O<0&&!isNaN(da)&&da<0)continue}if(!f){O=g[D]["auto arrange"]||"false";if(O=="true"||pui.p(O)&&pui.R(O,r,b.ref)=="true"){O=g[D].visibility;if(O=="hidden"||pui.p(O)&&pui.R(O,r,b.ref)=="hidden")g[D]["shortcut key"]!=null&&delete g[D]["shortcut key"]}}if(!f&&g[D]["shortcut key"]!=null){O=g[D].disabled;if(O=="true"||pui.p(O)&&pui.R(O,r,b.ref)=="true")delete g[D]["shortcut key"]}if(g[D]["csv file name"]!=null&&g[D]["export file name"]==null)g[D]["export file name"]=
|
|
582
|
+
g[D]["csv file name"];da=O=null;var T=g[D].grid,L=g[D].layout;if(T!=null){var Z=Db(T);if(Z!=null){O=Z.grid;da=Number(g[D].column);if(g[D].columnId==undefined)g[D].columnId=da;if(f)da=O.cells[O.h?1:0][da];else{if(b.Dj!=null)da=O.cells[b.Dj][da];else{g[D].domEls!=null&&delete g[D].domEls;O.C.push(g[D]);continue}F="";F+=pui.eo(g[D],pui.xd,false,O.zu);F!=""&&pui.alert("Missing translation data:\n\n"+F)}}else if(S[T]!=null){a(T,g[D]);continue}}else if(L!=null){var N=Db(L);if(N!=null&&N.layout!=null){da=
|
|
583
|
+
Number(g[D].container);if(S[L]!=null){a(L,g[D],da);continue}else da=N.layout.wc[da-1]}else if(S[L]!=null){a(L,g[D]);continue}}if(da==null)da=f?n.b:b.b;var v;if(!f&&b.o!=null&&g[D].domEls!=null&&g[D].domEls[b.o-1]!=null){v=g[D].domEls[b.o-1];if(da!=null){da.appendChild(v);if(v.Hh==true){v.style.display="";v.Hh=false}if(v.calimg!=null){da.appendChild(v.calimg);v.calimg.kt&&pui.tl(v);if(v.calimg.Hh){v.calimg.style.display="";v.calimg.Hh=false}}if(v.xc!=null)for(L=0;L<v.xc.length;L++){da.appendChild(v.xc[L]);
|
|
584
|
+
if(v.xc[L].Hh==true){v.xc[L].style.display="";v.xc[L].Hh=false}}if(v.Yk===true){pui.iw(v);v.Yk=false}if(b.Y!=null&&b.Y.text!=""&&(String(g[D].column)===String(b.Y.col)||b.Y.col==="*all"))if(v.tagName=="DIV"){pui.Xk(v,b.Y.text);v.Yk=true}}}else{v=document.createElement("div");v.style.position="absolute";v.setAttribute("puiwdgt",g[D]["field type"]);var V=g[D].left;L=g[D].top;if(pui.p(V))V="0px";if(pui.p(L))L="0px";if(V=="NaNpx")V="0px";if(L=="NaNpx")L="0px";if(g[D].left!=null)v.style.left=V;if(g[D].top!=
|
|
585
|
+
null)v.style.top=L;if(!f&&g[D]["parent tab panel"]!=null&&g[D]["parent tab panel"]!="")v.style.visibility="hidden";if(da!=null)g[D].ex!=null?da.insertBefore(v,g[D].ex):da.appendChild(v);V={};L=null;if(f){L=n.addItem(v,true);L.properties=V;L.properties.newitem="true";L.ob.newitem=true;N=g[D]["field type"];if(N=="styled button"||N=="panel"||N=="css panel"||N=="css button"||N=="Layout")L.dom.style.borderStyle="none"}var La=N=null;for(var ra in g[D])if(ra!="domEls"){E=g[D][ra];if(pui.wf.hq&&pui.Zb(E))if(f){F=
|
|
586
|
+
{};if(b.ox)F=null;if(pui.display&&typeof pui.display==="object"&&typeof pui.display.logic==="object"&&typeof pui.display.logic[E.routine]==="object")F=pui.display.logic[E.routine];pui.wf.hq.update({name:E.routine,e:L,designer:n,property:ra,data:F})}if(pui.p(E))if(f)F=E;else{if(pui.kx(ra))v.Go=true;if(E.longName&&E.fieldName)if(!E.lowerCaseField&&pui.handler==null){pui.Ef[pui.L(E.longName)]=pui.L(E.fieldName);pui.Ef[pui.L(E.fieldName)]=pui.L(E.longName)}else{pui.Ef[E.longName]=E.fieldName;pui.Ef[E.fieldName]=
|
|
587
|
+
E.longName}if(g[D]["field type"]=="grid"&&(ra=="row background"||ra=="row font color"))F="";else if(ra.includes("grid row translation placeholder value")&&g[D]["field type"]=="grid")F=E;else if(ra.includes("translation placeholder value")&&g[D].grid!=null)F=E;else{E.revert=false;F=pui.R(E,r,b.ref);if((ra=="range low"||ra=="range high")&&E.dataType=="date"){Z=E.dateFormat;var ua;E.dateFormat="Y-m-d";ua=pui.R(E,r,b.ref);E.dateFormat=Z;if(ra=="range low")N=ua;else La=ua}}if(ra=="value"||ra=="html"){v.lc=
|
|
588
|
+
p;v.Sc=pui.L(E.fieldName);if(v.pui==null)v.pui={};v.pui.formatName=p;v.pui.fieldName=v.Sc;if(g[D]["field type"]=="textbox"){Z=pui.R(g[D]["choices database file"],r,b.ref);if(Z!=null&&Z!=""){Z=pui.R(g[D]["choice options field"],r,b.ref);var Ga;if(Z!=null)Ga=pui.ha(Z)[0];Z=pui.R(g[D]["choice values field"],r,b.ref);if(Ga!=null&&Ga!=""&&Z!=null&&Z!=""&&Ga!=Z){E.formatting="Text";E.Ce=null;E.maxLength=null}}Z=pui.R(g[D]["choices url"],r,b.ref);if(Z!=null&&Z!=""&&E.formatting=="Number"){E.formatting="Text";
|
|
589
|
+
E.Ce=null;E.maxLength=null}}}if(ra=="cursor record number")pui.Fk[(pui.handler==null?p+".":"")+pui.L(E.fieldName)]=v;else if(ra=="subfile return rrn")pui.Xl[(pui.handler==null?p+".":"")+pui.L(E.fieldName)]=v;else if(ra=="return mode")pui.km[(pui.handler==null?p+".":"")+pui.L(E.fieldName)]=v;else if(ra=="column sort response")v.eh=(pui.handler==null?p+".":"")+pui.L(E.fieldName);else if(ra=="field name sort response"){v.ng=(pui.handler==null?p+".":"")+pui.L(E.fieldName);v.gs=E.dataLength}else if(ra==
|
|
590
|
+
"initial sort field")v.dx=E.dataLength;else if(ra=="filter response")v.hs=(pui.handler==null?p+".":"")+pui.L(E.fieldName);else if(ra=="subfile changed")pui.cq[V["record format name"].toLowerCase()]=pui.L(E.fieldName);if(ra=="column sort response"||ra=="field name sort response")if(pui.p(g[D]["return sort order"]))v.Jh=(pui.handler==null?p+".":"")+pui.L(g[D]["return sort order"].fieldName)}else{if(!f&&da!=null&&da.Ac){if(da.nu==null)da.nu="";if(ra=="id"||ra=="top"||ra=="left")da.nu+=E}F=E;if((ra==
|
|
591
|
+
"range low"||ra=="range high")&&g[D].value&&g[D].value.dataType=="date"){Z=g[D].value;ua={};ua.dataType=Z.dataType;ua.dateFormat=Z.dateFormat;ua.formatting=Z.formatting;ua.locale=Z.locale;ua.value=F;ua.Ke=true;ua=pui.tc.format(ua);if(ra=="range low")N=ua;else La=ua}}if(g[D].grid!=null&&!f)switch(ra){case "value":case "tab names":case "header text":case "export file name":case "tool tip":case "on text":case "off text":case "html":case "label":case "alternate text":case "empty text":case "placeholder":case "choices":case "blank option label":case "names":ua=
|
|
592
|
+
null;Z=Db(g[D].grid);if(Z!=null){ua=Z.grid.zu;if(ua!=null)if(ua.keys!=null&&ua.values!=null){Z={keys:[],values:[]};for(key in ua.keys)Z.keys.push(ua.keys[key]);for(value in ua.values)Z.values.push(pui.R(ua.values[value],r,b.ref));Z=pui.ir(g[D],Z,r,b.ref);for(ua=0;ua<Z.keys.length;ua++)F=F.replaceAll("(&"+Z.keys[ua]+")",Z.values[ua])}}}V[ra]=F}if(V["field type"]=="tab panel"||V["field type"]=="layout"&&V.template=="tab panel"){F=V.id;l.push(F);Zc[F]!=null?o.push(Zc[F]):o.push(ac(V["active tab"],"",
|
|
593
|
+
v))}for(B in V){F=v.Eh==null?pui.Li(K,B):pui.Li(v.Eh,B);if(F!=null){E=V[B];if(!f){var Fa=g[D][B];if(pui.p(Fa)){Fa.revert=false;if(pui.is_touch&&!pui.is_mouse_capable&&B=="value"&&V["field type"]=="textbox"&&Fa.formatting=="Number")if(Fa.numSep!="true"&&Fa.numBlankFill!="true"&&Fa.negNum!="(999.00)"&&Fa.negNum!="999.00-"&&Fa.negNum!="999.00 CR"&&(!Fa.edtWrd||Fa.edtWrd=="")&&(!Fa.edtMsk||Fa.edtMsk=="")&&(!Fa.curSym||Fa.curSym=="")&&(!Fa.units||Fa.units=="")&&pui.appJob.decimalFormat!="I"&&pui.appJob.decimalFormat!=
|
|
594
|
+
"J"){v.type="number";Fa.maxLength>0&&U(v,"textInput",function(aa){var ga=wb(aa);if(!(ga==null||ga.value==null))if(aa.data=="-"&&ga.validity!=null&&(ga.value!=""&&ga.validity.valid||!ga.validity.valid))xb(aa);else ga.maxLength>0&&ga.value.length>=ga.maxLength&&xb(aa)})}var bb,Ca;if(B=="changed"){c();if(pui.ah[Ca]==null)pui.ah[Ca]=[];pui.ah[Ca].push(v)}if(B=="is blank"){c();if(pui.sh[Ca]==null)pui.sh[Ca]=[];pui.sh[Ca].push(v)}if(B=="dup key response"&&V["allow dup key"]=="true"){c();if(pui.lh[Ca]==
|
|
594
595
|
null)pui.lh[Ca]=[];pui.lh[Ca].push(v)}if(pui.Ts(B,v)){c();if(B=="radio button group"){Z=bb;if(b.o!=null)Z+="."+b.o;v.name=Z;if(pui.is_old_ie){var ia;try{ia=document.createElement('<input name="'+Z+'" type="radio">')}catch(rb){ia=document.createElement("input");ia.name=Z;ia.type="radio"}ia.style.position=v.style.position;ia.style.left=v.style.left;ia.style.top=v.style.top;ia.style.visibility=v.style.visibility;ia.style.display=v.style.display;ia.id=v.id;ia.value=v.value;ia.xc=v.xc;ia.Ld=v.Ld;ia.modified=
|
|
595
596
|
v.modified;ia.disabled=v.disabled;v.parentNode.replaceChild(ia,v);ia.checked=v.checked;ia.Va=v.Va;ia.db=v.db;ia.onblur=v.onblur;ia.onchange=v.onchange;ia.oninput=v.oninput;ia.onclick=v.onclick;ia.ondblclick=v.ondblclick;ia.onfocus=v.onfocus;ia.onkeydown=v.onkeydown;ia.onkeypress=v.onkeypress;ia.onkeyup=v.onkeyup;ia.onmousedown=v.onmousedown;ia.onmousemove=v.onmousemove;ia.onmouseout=v.onmouseout;ia.onmouseover=v.onmouseover;ia.onmouseup=v.onmouseup;ia.pui=v.pui;v=ia}v.radioValue=V.value}Z=O!=null&&
|
|
596
597
|
O.ea()==true;if(!Z&&pui.O[Ca]==null)pui.O[Ca]=[];if(!Z&&pui.O[Ca][0]!=null&&pui.O[Ca][0].aj){pui.O[Ca]=[];v.modified=true;pui.modified=true}if(B=="page down response"){pui.O[Ca].push(v.grid.i.ka);pui.O[Ca].push(v.grid.i.na)}else if(B=="page up response"){pui.O[Ca].push(v.grid.i.xa);pui.O[Ca].push(v.grid.i.oa)}else Z||pui.O[Ca].push(v);if(B=="menu response")v.S="";if(B=="upload response")v.fileUpload.Wx=Ca;if(B=="chart response")v.S="";if(B=="tab response")if(Z=v.tabPanel)Z.bm=true;if(B=="active tab")if(Z=
|
|
597
598
|
v.tabPanel)Z.am=true;if(B=="response"){Z=V["shortcut key"];if(Z!=null&&Z!=""){if(pui.Z[p]==null)pui.Z[p]={};if(pui.Z[p][Z]==null)pui.Z[p][Z]=[];pui.Z[p][Z].push(v);v.vd=Z}if(T==null)v.S="0";if(V.onclick==null||V.onclick==""||pui.Zb(V.onclick)){if(pui.Zb(V.onclick))v.Ka=V.onclick.routine;pui.hg(v)}}if(B=="page down response"){if(pui.Z[p].PageDown==null)pui.Z[p].PageDown=[];pui.Z[p].PageDown.push(v.grid.i.na);pui.hg(v.grid.i.ka);pui.hg(v.grid.i.na);v.grid.i.ka.N=Fa;v.grid.i.na.N=Fa}if(B=="page up response"){if(pui.Z[p].PageUp==
|
|
598
|
-
null)pui.Z[p].PageUp=[];pui.Z[p].PageUp.push(v.grid.i.oa);pui.hg(v.grid.i.xa);pui.hg(v.grid.i.oa);v.grid.i.xa.N=Fa;v.grid.i.oa.N=Fa}v.N=Fa}else if(v.pui&&v.pui.widget&&vd(v.pui.widget,B)){c();if(pui.O[Ca]==null)pui.O[Ca]=[];pui.O[Ca].push(v);wd(v.pui.widget,B,Fa,Ca)}}if(B=="selection field"&&V["field type"]=="grid")if(pui.p(g[
|
|
599
|
-
if(B=="tree level field"&&V["field type"]=="grid")if(pui.p(g[
|
|
600
|
-
|
|
601
|
-
pui.W.Eg=true}if(B=="focus class"&&!pui.p(
|
|
602
|
-
if(B=="auto advance"&&
|
|
603
|
-
null)na=v.comboBoxWidget.getBox();if(v.l!=null)na=v.l.getBox();if(pui.p(g[
|
|
604
|
-
|
|
605
|
-
|
|
599
|
+
null)pui.Z[p].PageUp=[];pui.Z[p].PageUp.push(v.grid.i.oa);pui.hg(v.grid.i.xa);pui.hg(v.grid.i.oa);v.grid.i.xa.N=Fa;v.grid.i.oa.N=Fa}v.N=Fa}else if(v.pui&&v.pui.widget&&vd(v.pui.widget,B)){c();if(pui.O[Ca]==null)pui.O[Ca]=[];pui.O[Ca].push(v);wd(v.pui.widget,B,Fa,Ca)}}if(B=="selection field"&&V["field type"]=="grid")if(pui.p(g[D]["selection field"]))v.grid.Bb=g[D]["selection field"];if(B=="row is hidden field"&&V["field type"]=="grid")if(pui.p(g[D]["row is hidden field"]))v.grid.ye=g[D]["row is hidden field"];
|
|
600
|
+
if(B=="tree level field"&&V["field type"]=="grid")if(pui.p(g[D]["tree level field"])){v.grid.Sf=g[D]["tree level field"].fieldName;v.grid.ug=true;v.grid.sortable=false;if(v.grid.Qe==null)v.grid.Qe=0}if(B=="row font color"&&V["field type"]=="grid")if(pui.p(g[D][B]))v.grid.Bj=g[D][B];if(B=="row background"&&V["field type"]=="grid")if(pui.p(g[D][B]))v.grid.zj=g[D][B];if(B.includes("grid row translation placeholders")&&V["field type"]=="grid")v.grid.zu=pui.zk(null,g[D],null,r,b.ref);if(B=="shortcut key"&&
|
|
601
|
+
E!=null&&E!=""&&!pui.p(g[D].response)){if(pui.Z[p]==null)pui.Z[p]={};if(pui.Z[p][E]==null)pui.Z[p][E]=[];pui.Z[p][E].push(v);v.vd=E;if(T==null)v.S="0";if(V.onclick==null||V.onclick==""||pui.Zb(V.onclick)){if(pui.Zb(V.onclick))v.Ka=V.onclick.routine;pui.hg(v)}}if(B=="id"&&b.o!=null){E+="."+b.o;V[B]=E}if(B=="set focus"&&E=="true")if(pui.W.dom==null||pui.W.Eg!=true)if(V.visibility!="hidden"){pui.W.dom=v;if(v.comboBoxWidget!=null)pui.W.dom=v.comboBoxWidget.getBox();if(v.l!=null)pui.W.dom=v.l.getBox();
|
|
602
|
+
pui.W.Eg=true}if(B=="focus class"&&!pui.p(E)&&Lb(E)!="")if(v.pui.properties["field type"]==="combo box"){Z=v.comboBoxWidget.getBox();Z.focusClass=Lb(E);U(Z,"focus",pui.vk);U(Z,"blur",pui.Rl)}else{v.focusClass=Lb(E);U(v,"focus",pui.vk);U(v,"blur",pui.Rl)}if(B=="required"&&E=="true"){v.Ol=true;if(v.l!=null)v.l.getBox().Ol=true}if(B=="mandatory entry"&&E=="true")v.vq=true;if(B=="mandatory fill"&&E=="true")v.wq=true;if(B=="valid values"&&E!=null&&E!="")v.mq=E;if(B=="allow blanks"&&E=="true")v.lr=true;
|
|
603
|
+
if(B=="auto advance"&&E=="true"){var na=v;if(v.comboBoxWidget!=null)na=v.comboBoxWidget.getBox();if(v.l!=null)na=v.l.getBox();na.yn=true;U(na,"keyup",pui.zn)}B=="allow dup key"&&E=="true"&&U(v,"keydown",pui.mw);Z=false;if((pui["always allow field exit"]==true||pui["always allow field exit"]=="true")&&(V["field type"]=="combo box"||V["field type"]=="date field"||V["field type"]=="spinner"||V["field type"]=="textbox"))Z=true;if(B=="allow field exit"&&E=="true")Z=true;if(Z==true){na=v;if(v.comboBoxWidget!=
|
|
604
|
+
null)na=v.comboBoxWidget.getBox();if(v.l!=null)na=v.l.getBox();if(pui.p(g[D].value)&&g[D].value.rjZeroFill=="true"){v.Wt=true;na.Wt=true}U(na,"keydown",function(aa){aa=aa||window.event;var ga=aa.keyCode;if((ga==pui["field exit key"]||ga==pui["field exit minus key"])&&!aa.shiftKey&&(pui["field exit key"]==17||!aa.ctrlKey)){var qa=wb(aa);pui.aq(qa);if(pui.Wr(qa,ga==pui["field exit minus key"])==false){xb(aa);return false}}})}if(B=="validate name"&&E=="true")v.validateName=true;if(B=="validate email"&&
|
|
605
|
+
E=="true")v.validateEmail=true;if(B=="set as modified"&&E=="true"){v.modified=true;pui.modified=true;if(b.o==null)pui.jf[p]=true}if(B.length>=11&&B.substr(0,11)=="blank value"&&E!=null&&E!=""){if(v.pi==null)v.pi=[];v.pi.push(E);Z=v;if(v.l!=null)Z=v.l.getBox();if(v.comboBoxWidget!=null)Z=v.comboBoxWidget.getBox();if((Z.tagName=="DIV"?Oc(Z):Z.value)==E)if(Z.tagName=="DIV")Z.innerHTML="";else Z.value=""}if(B=="comparison operator"&&E!=null&&E!="")v.Qn=E;if(B=="comparison value"&&E!=null&&E!="")v.Rn=
|
|
606
|
+
E;if(B=="range low"&&E!=null&&E!=""){v.Gh=E;if(N!=null)v.Yx=N}if(B=="range high"&&E!=null&&E!=""){v.Fh=E;if(La!=null)v.Xx=La}if(B=="checked value")v.checkedValue=E;if(B=="unchecked value")v.uncheckedValue=E;if(B=="indeterminate value")v.indeterminateValue=E;if(B=="cursor row")v.kf=E;if(B=="cursor column")v.oe=E;if(B=="bypass validation")v.G=E;if(B=="auto arrange"&&E=="true")if(b.il!=true){v.style.display="none";v.style.visibility="hidden";v.removeAttribute("id")}else if(V.visibility!="hidden"){Z=
|
|
606
607
|
V["shortcut key"];if(pui.ia.keys[Z]==true){v.style.display="none";v.style.visibility="hidden"}else{if(Z!=null)pui.ia.keys[Z]=true;if(t||pui["horizontal auto arrange"]){if(pui.ia.top==null)pui.ia.top=parseInt(v.style.top);if(pui.ia.left==null){pui.ia.left=parseInt(v.style.left);pui.ia.gb=parseInt(v.style.left)}else if(pui["horizontal auto arrange"]){if(pui.ia.Ak==null)pui.ia.Ak=0;if(pui.ia.Da==null)pui.ia.Da=parseInt(v.style.top);pui.ia.Ak++;pui.ia.left=pui.ia.gb+pui.ia.Ak%pui["buttons per row"]*pui["horizontal button spacing"];
|
|
607
608
|
pui.ia.top=pui.ia.Da+Math.floor(pui.ia.Ak/pui["buttons per row"])*pui["vertical button spacing"]}else if(pui.ia.Dt!=null&&Math.abs(parseInt(v.style.top)-pui.ia.Dt)>5)pui.ia.left=pui.ia.gb;else pui.ia.left+=pui["horizontal button spacing"];v.style.left=pui.ia.left+"px";pui.ia.Dt=parseInt(v.style.top);if(pui["horizontal auto arrange"])v.style.top=pui.ia.top+"px"}else{if(pui.ia.top==null)pui.ia.top=parseInt(v.style.top);else pui.ia.top+=pui["vertical button spacing"];v.style.top=pui.ia.top+"px"}}}if(B==
|
|
608
|
-
"allow drag"&&
|
|
609
|
-
0&&
|
|
610
|
-
aa||window.event;var ga=
|
|
611
|
-
V["field type"]=="checkbox"){na=v;if(v.comboBoxWidget!=null)na=v.comboBoxWidget.getBox();if(v.l!=null)na=v.l.getBox();pui.kr(na)}if(A)if(V["field type"]=="combo box"||V["field type"]=="date field"||V["field type"]=="spinner"||V["field type"]=="textbox"||V["field type"]=="password field"||V["field type"]=="checkbox"){na=v;if(v.comboBoxWidget!=null)na=v.comboBoxWidget.getBox();if(v.l!=null)na=v.l.getBox();U(na,"keydown",function(aa){aa=aa||window.event;var ga=
|
|
612
|
-
9){cd(ga,!aa.shiftKey);
|
|
613
|
-
pui.r.Me!=""&&v.clientWidth>0){T=V["cursor row"];if(v.parentNode&&v.parentNode.parentNode&&v.parentNode.parentNode.grid){T=parseInt(T,10);T+=v.parentNode.parentNode.grid.h?v.parentNode.row-1:v.parentNode.row;T=""+T}if(pui.r.Rf==T){T=false;if(pui.r.Me==V["cursor column"])T=true;if(!T)if(V["field type"]=="textbox"||V["field type"]=="date field"||V["field type"]=="password field"||V["field type"]=="combox box"||V["field type"]=="spinner"){N=g[
|
|
609
|
+
"allow drag"&&E=="true"){if((V.cursor==null||V.cursor=="")&&!pui.pa)v.style.cursor="move";pui.Iv(v,V)}}if(!f&&B=="visibility"&&V["parent tab panel"]!=null&&V["parent tab panel"]!="")E="hidden";if(E!=null&&E!=""){Z=V;if(f)Z=L.properties;v=Pc(F,Z,v,E,f,L,null,b.o)}if(!f&&B=="visibility"&&E=="visible"&&b.Dj!=null)v.style.visibility=""}if(b.Y!=null&&b.Y.text!=""&&(String(V.column)===String(b.Y.col)||b.Y.col==="*all"))if(v.tagName=="DIV"){pui.Xk(v,b.Y.text);v.Yk=true}if(pui.controller!=null&&B.indexOf("error condition")==
|
|
610
|
+
0&&E=="1"&&!y[v.id]){F="";if(B.length>15)F=" "+parseInt(B.substr(15),10);F=V["error message"+F];s.push({id:v.id,msg:F});y[v.id]=true}}!f&&V["float placeholder"]=="true"&&pui.pg(v);if(pui["auto tab"]==true&&V["prevent auto tab"]!="true")if(V["field type"]=="combo box"||V["field type"]=="date field"||V["field type"]=="spinner"||V["field type"]=="textbox"||V["field type"]=="password field"){na=v;if(v.comboBoxWidget!=null)na=v.comboBoxWidget.getBox();if(v.l!=null)na=v.l.getBox();U(na,"keyup",function(aa){aa=
|
|
611
|
+
aa||window.event;var ga=wb(aa),qa=true,xa=aa.keyCode;if(xa<48||xa>90&&xa<96||xa>111&&xa<186)if(xa!=32)qa=false;xa=ga;if(xa.comboBoxWidget!=null)xa=xa.comboBoxWidget.getBox();if(xa.l!=null)xa=xa.l.getBox();if(qa&&xa.value.length==xa.maxLength&&(pui.is_touch||Cb(xa)>=xa.maxLength)){pui.Do(ga);xb(aa);return false}})}if(pui["enable arrow keys"]==true)if(V["field type"]=="combo box"||V["field type"]=="date field"||V["field type"]=="spinner"||V["field type"]=="textbox"||V["field type"]=="password field"||
|
|
612
|
+
V["field type"]=="checkbox"){na=v;if(v.comboBoxWidget!=null)na=v.comboBoxWidget.getBox();if(v.l!=null)na=v.l.getBox();pui.kr(na)}if(A)if(V["field type"]=="combo box"||V["field type"]=="date field"||V["field type"]=="spinner"||V["field type"]=="textbox"||V["field type"]=="password field"||V["field type"]=="checkbox"){na=v;if(v.comboBoxWidget!=null)na=v.comboBoxWidget.getBox();if(v.l!=null)na=v.l.getBox();U(na,"keydown",function(aa){aa=aa||window.event;var ga=wb(aa);if(!(ga.kc&&ga.kc.gl()))if(aa.keyCode==
|
|
613
|
+
9){cd(ga,!aa.shiftKey);xb(aa);return false}})}if(g[D].grid!==undefined&&g[D].grid!==null){T=Db(g[D].grid).grid;if(T.ug&&T.Sf!==null&&g[D].id==g[D].grid+T.vm){na=v;na.pui.rrn=b.o;na.pui.grid=g[D].grid;U(na,"keydown",function(aa){aa=aa||window.event;var ga=aa.keyCode,qa=wb(aa),xa=Db(qa.pui.grid).grid;qa=qa.pui.rrn;if(ga==37){xa.expandTreeLevel(qa);xb(aa);return false}if(ga==39){xa.collapseTreeLevel(qa);xb(aa);return false}})}}if(!f&&V.visibility!="hidden"&&pui.r.Rf!=null&&pui.r.Rf!=""&&pui.r.Me!=null&&
|
|
614
|
+
pui.r.Me!=""&&v.clientWidth>0){T=V["cursor row"];if(v.parentNode&&v.parentNode.parentNode&&v.parentNode.parentNode.grid){T=parseInt(T,10);T+=v.parentNode.parentNode.grid.h?v.parentNode.row-1:v.parentNode.row;T=""+T}if(pui.r.Rf==T){T=false;if(pui.r.Me==V["cursor column"])T=true;if(!T)if(V["field type"]=="textbox"||V["field type"]=="date field"||V["field type"]=="password field"||V["field type"]=="combox box"||V["field type"]=="spinner"){N=g[D].value;if(N!=null&&pui.p(N)&&N.dataLength!=null){N=Number(N.dataLength);
|
|
614
615
|
La=Number(V["cursor column"]);F=Number(pui.r.Me);if(!isNaN(N)&&!isNaN(La)&&!isNaN(F))if(F>La&&F<La+N)T=true}}if(T){pui.W.dom=v;if(v.comboBoxWidget!=null)pui.W.dom=v.comboBoxWidget.getBox();if(v.l!=null)pui.W.dom=v.l.getBox();pui.W.Eg=true}}}if(!f){var hb=function(aa){pui.Nj(aa,p)};if((window.React||window.Vue)&&v.N){if(v.pui==null)v.pui={};v.pui.data=r;if(b.Ds)v.pui.data=b.Ds;v.pui.Ai=v.N.fieldName}if(v.comboBoxWidget!=null||v.l!=null||v.tagName=="TEXTAREA"||v.tagName=="INPUT"&&(pui.Si(v)||v.type==
|
|
615
|
-
"file")){na=v;if(v.comboBoxWidget!=null){v.comboBoxWidget.formatName=p;na=v.comboBoxWidget.getBox()}if(v.l!=null){v.l.formatName=p;na=v.l.getBox()}if(v.N!=null&&v.N.maxLength!=null){na.maxLength=v.N.maxLength;if(v.tagName=="TEXTAREA"){U(v,"keyup",function(aa){aa=
|
|
616
|
-
null&&ga.value.length>qa)ga.value=ga.value.substr(0,qa)},0)});U(v,"keydown",function(aa){aa=aa||window.event;var ga=
|
|
616
|
+
"file")){na=v;if(v.comboBoxWidget!=null){v.comboBoxWidget.formatName=p;na=v.comboBoxWidget.getBox()}if(v.l!=null){v.l.formatName=p;na=v.l.getBox()}if(v.N!=null&&v.N.maxLength!=null){na.maxLength=v.N.maxLength;if(v.tagName=="TEXTAREA"){U(v,"keyup",function(aa){aa=wb(aa);var ga=Number(aa.maxLength);if(!isNaN(ga)&&ga>0&&aa.value!=null&&aa.value.length>ga)aa.value=aa.value.substr(0,ga)});U(v,"paste",function(aa){var ga=wb(aa);setTimeout(function(){var qa=Number(ga.maxLength);if(!isNaN(qa)&&qa>0&&ga.value!=
|
|
617
|
+
null&&ga.value.length>qa)ga.value=ga.value.substr(0,qa)},0)});U(v,"keydown",function(aa){aa=aa||window.event;var ga=wb(aa);if(!(aa.ctrlKey||ga.selectionStart!==ga.selectionEnd)){var qa=aa.keyCode;if(qa>=48&&qa<=57||qa>=65&&qa<=90||qa==32||qa>=106&&qa<=111||qa>=186&&qa<=192||qa>=219&&qa<=222){qa=Number(ga.maxLength);if(!isNaN(qa)&&qa>0&&ga.value!=null&&ga.value.length==qa){xb(aa);return false}}}})}}if(v.lc!=null||v.Sc!=null||v.kf!=null||v.oe!=null){U(na,"focus",pui.Td);U(na,"keyup",pui.Td)}U(na,"focus",
|
|
617
618
|
pui.Ij);U(na,"keydown",pui.Ij);U(na,"change",hb);U(na,"paste",hb);U(na,"input",hb);na.Tn=0;U(na,"mouseup",pui.bq);U(na,"mousedown",pui.bq);U(na,"keyup",pui.bq);if(pui.is_touch){na.Il=pui.Bw(na);U(na,"focus",function(aa){if(aa.srcElement.Il)aa.srcElement.Il.Qt=true;setTimeout(function(ga){if(ga.Il)ga.Il.Qt=false},1E3,aa.srcElement)})}U(na,"keydown",function(aa){aa=aa||window.event;var ga=aa.keyCode;ga>=9&&ga<=45&&ga!=32||ga>=112&&ga<=145||aa.ctrlKey&&ga!=88&&ga!=86||hb(aa)});v.N&&v.N.Ce&&function(){var aa=
|
|
618
|
-
v.N.Ce;U(na,"keypress",function(ga){ga=ga||window.event;pui.Ce(ga,aa)});v.type=="number"&&v.N.noExtraSpaces&&U(na,"textInput",function(ga){ga=ga||window.event;aa.test(ga.data)||
|
|
619
|
-
aa.keyCode,qa=
|
|
620
|
-
1);ga!=46&&ga!=8&&db++;qa.xl=true;
|
|
621
|
-
"click",hb);else{U(v,"keydown",function(aa){if(!aa)aa=window.event;if(aa.keyCode==34){aa.cancel=true;aa.preventDefault&&aa.preventDefault();return false}});b.o>0&&pui.is_firefox&&U(v,"keydown",function(aa){aa=aa||window.event;if(aa.keyCode==33||aa.keyCode==34)
|
|
619
|
+
v.N.Ce;U(na,"keypress",function(ga){ga=ga||window.event;pui.Ce(ga,aa)});v.type=="number"&&v.N.noExtraSpaces&&U(na,"textInput",function(ga){ga=ga||window.event;aa.test(ga.data)||xb(ga)})}();if(v.N!=null&&v.N.edtMsk!=null&&v.N.edtMsk!=""){na.xl=false;U(na,"focus",function(aa){wb(aa).xl=false});U(na,"blur",function(aa){var ga=wb(aa);if(ga.xl){typeof ga.onchange==="function"&&ga.onchange(aa);ga.xl=false}});U(na,"keyup",function(aa){pui.sn(wb(aa),aa)});U(na,"keydown",function(aa){aa=aa||window.event;var ga=
|
|
620
|
+
aa.keyCode,qa=wb(aa),xa=null;if(ga==46||ga==8||ga==32){var Oa=false;if(typeof qa.selectionStart=="number")Oa=qa.selectionStart==0&&qa.selectionEnd==qa.value.length;else if(typeof document.selection!="undefined")Oa=document.selection.createRange().text==qa.value;if(Oa){qa.value="";return}}if(ga>=48&&ga<=57)xa=ga-48;if(ga>=96&&ga<=105)xa=ga-96;if(ga==46)xa=0;if(ga==8)xa=0;if(xa!=null){qa=wb(aa);Oa=qa.value;if(Oa!=null){var db=Cb(qa);if(ga==8&&db>0)db-=1;qa.value=Oa.substr(0,db)+String(xa)+Oa.substr(db+
|
|
621
|
+
1);ga!=46&&ga!=8&&db++;qa.xl=true;xb(aa);pui.sn(qa,aa,db);if(pui.is_old_ie)try{aa.keyCode=0}catch(fa){}return false}}});pui.sn(na)}}v.tagName=="SELECT"&&U(v,"keydown",function(aa){aa=aa||window.event;var ga=aa.keyCode;if(ga==38||ga==40)hb(aa)});if(v.tagName=="SELECT"||v.tagName=="INPUT"&&(v.type=="checkbox"||v.type=="radio")){if(v.lc!=null||v.Sc!=null||v.kf!=null||v.oe!=null){U(v,"focus",pui.Td);U(v,"keyup",pui.Td)}U(v,"focus",pui.Ij);U(v,"keydown",pui.Ij);U(v,"change",hb);if(v.tagName!="SELECT")U(v,
|
|
622
|
+
"click",hb);else{U(v,"keydown",function(aa){if(!aa)aa=window.event;if(aa.keyCode==34){aa.cancel=true;aa.preventDefault&&aa.preventDefault();return false}});b.o>0&&pui.is_firefox&&U(v,"keydown",function(aa){aa=aa||window.event;if(aa.keyCode==33||aa.keyCode==34)xb(aa)})}}if(v.lc!=null||v.Sc!=null||v.kf!=null||v.oe!=null)U(v,"click",pui.Td);U(v,"click",pui.Ij)}if(!f&&!pui.pa&&pui.W.dom==null&&!v.disabled&&!v.readOnly&&V.visibility!="hidden"){if(v.tagName=="INPUT")if(pui.Si(v)||v.type=="checkbox"||v.type==
|
|
622
623
|
"radio"||v.type=="file")pui.W.dom=v;if(v.tagName=="TEXTAREA"||v.tagName=="SELECT")pui.W.dom=v;if(v.comboBoxWidget!=null)pui.W.dom=v.comboBoxWidget.getBox();if(v.l!=null)pui.W.dom=v.l.getBox()}f&&V["field type"]=="grid"&&n.Fs.push(L);f&&V["field type"]=="layout"&&n.fA.push(L);N=V["field type"];if(N!=null){T=pui.widgets[N];T!=null&&T.initialize!=null&&T.initialize({design:f,properties:V,dom:v,e:L});if(v.pui&&v.pui.widget&&v.pui.widget)fd(v.pui.widget);else v.Ia&&v.Ia.render(b)}if(!f&&V["field type"]==
|
|
623
624
|
"layout"){pui.Vi.push(v.layout);if(V["lazy load"]=="true"&&typeof v.layout.Yt=="function"){S[V.id]=v.layout;v.layout.Yt(b)}}if(!f&&V["field type"]=="grid"){L=b.subfiles;var ta,Ua,Da,gb,$a;T=pui.Hb(V["record format name"]);if(L!=null)ta=L[T];if(ta!=null)Ua=ta.data;if(ta!=null)Da=ta["field names"];if(ta!=null)gb=ta.ref;if(ta!=null)$a=ta.errors;v.grid.ro=b.fileId;if(typeof pui.view!="undefined")v.grid.Nb="pui-grid-"+pui.view;else if(typeof b.file!="undefined"&&typeof b.library!="undefined")v.grid.Nb=
|
|
624
625
|
"pui-grid-"+b.library+"-"+b.file+"-"+T;V["persist state"]==="program only"&&ta&&ta.renderCount===1&&delete pui.sj[v.grid.Nb];if(ta!=null&&ta.useServerState&&ta.storedState!=null){v.grid.gz=true;v.grid.Yd=ta.storedState}v.grid.dataArray=Ua!=null?Ua:[];v.grid.aa=Da!=null?Da:[];if(pui.handler!=null&&Ua==null){(Ua=r[pui.Hb(V["record format name"])])||(Ua=[]);Da=[];ta=[];Da={};for(L=0;L<g.length;L++){T=g[L];if(T.grid===V.id)for(var qb in T){N=T[qb];if(pui.p(N))Da[N.fieldName]=true}}Da=Object.keys(Da);
|
|
625
|
-
for(L=0;L<Ua.length;L++){T=[];N=Ua[L];for(La=0;La<Da.length;La++){bb=Da[La];T.push(N[bb])}ta.push(T)}v.grid.dataArray=ta;v.grid.aa=Da;v.grid.Es=Ua;ta={}}v.grid.ref=gb!=null?gb:{};if($a!=null)v.grid.errors=$a;L=g[
|
|
626
|
+
for(L=0;L<Ua.length;L++){T=[];N=Ua[L];for(La=0;La<Da.length;La++){bb=Da[La];T.push(N[bb])}ta.push(T)}v.grid.dataArray=ta;v.grid.aa=Da;v.grid.Es=Ua;ta={}}v.grid.ref=gb!=null?gb:{};if($a!=null)v.grid.errors=$a;L=g[D]["subfile message key"];T=g[D]["subfile program message queue"];N=g[D]["subfile control program message queue"];if(L!=null&&L!=""&&T!=null&&T!=""||N!=null&&N!=""){if(v.grid.d!=null)v.grid.d.zA="Message";v.grid.C.push({id:"_msgsfltext",column:"0","field type":"output field",grid:V.id,left:"5px",
|
|
626
627
|
top:"5px",cursor:"pointer",onclick:"pui.showMessageSubfileHelp(this);",value:{dataLength:"132",dataType:"char",fieldName:"text",formatting:"Text",textTransform:"none",trimLeading:"false",trimTrailing:"true",lowerCaseField:true}});v.grid.C.push({id:"_msgsflhelp",column:"0","field type":"output field",grid:V.id,left:"0px",top:"0px",visibility:"hidden",value:{dataLength:"9999",dataType:"char",fieldName:"help",formatting:"Text",textTransform:"none",trimLeading:"false",trimTrailing:"true",lowerCaseField:true}});
|
|
627
628
|
v.grid.C.push({id:"_msgsflid",column:"0","field type":"output field",grid:V.id,left:"0px",top:"0px",visibility:"hidden",value:{dataLength:"7",dataType:"char",fieldName:"id",formatting:"Text",textTransform:"none",trimLeading:"false",trimTrailing:"true",lowerCaseField:true}});v.grid.C.push({id:"_msgsfldate",column:"0","field type":"output field",grid:V.id,left:"0px",top:"0px",visibility:"hidden",value:{dataLength:"7",dataType:"char",fieldName:"date",formatting:"Text",textTransform:"none",trimLeading:"false",
|
|
628
|
-
trimTrailing:"true",lowerCaseField:true}});v.grid.C.push({id:"_msgsfltime",column:"0","field type":"output field",grid:V.id,left:"0px",top:"0px",visibility:"hidden",value:{dataLength:"6",dataType:"char",fieldName:"time",formatting:"Text",textTransform:"none",trimLeading:"false",trimTrailing:"true",lowerCaseField:true}})}if(v.grid.dataArray.length==0)if(pui.p(g[
|
|
629
|
-
v.grid.lm=L;if(isNaN(L)){L=1;v.grid.lm=0}if(L<1||L>9999){L=1;v.grid.lm=0}if(V["position at top"]!="true")v.grid.Du(L);else v.grid.j=L;if(V["place cursor"]=="true"){v.grid.qj=L;pui.pj=true}v.grid.Iy();G.push(v.grid);pui.Ua.push(v.grid)}if(!f&&b.o!=null){v.o=b.o;v.Wj=b.name;if(g[
|
|
629
|
+
trimTrailing:"true",lowerCaseField:true}});v.grid.C.push({id:"_msgsfltime",column:"0","field type":"output field",grid:V.id,left:"0px",top:"0px",visibility:"hidden",value:{dataLength:"6",dataType:"char",fieldName:"time",formatting:"Text",textTransform:"none",trimLeading:"false",trimTrailing:"true",lowerCaseField:true}})}if(v.grid.dataArray.length==0)if(pui.p(g[D]["subfile message key"])||pui.p(g[D]["subfile program message queue"]))v.grid.Lo();ta==null&&v.grid.Lo();L=Number(V["subfile record number"]);
|
|
630
|
+
v.grid.lm=L;if(isNaN(L)){L=1;v.grid.lm=0}if(L<1||L>9999){L=1;v.grid.lm=0}if(V["position at top"]!="true")v.grid.Du(L);else v.grid.j=L;if(V["place cursor"]=="true"){v.grid.qj=L;pui.pj=true}v.grid.Iy();G.push(v.grid);pui.Ua.push(v.grid)}if(!f&&b.o!=null){v.o=b.o;v.Wj=b.name;if(g[D].domEls==null)g[D].domEls=[];g[D].domEls[b.o-1]=v}}if((pui.controller!=null||typeof pui.handler=="function")&&V!=null&&V["set as modified"]!="false")v.modified=true;if(!f&&b.Ub!=null)v.Ub=b.Ub;if(!f&&O!=null&&!O.expanded&&
|
|
630
631
|
da){da=parseInt(da.style.height);if(!isNaN(da)){O=parseInt(v.style.top);if(isNaN(O))O=0;if(O>da&&(v.tagName=="INPUT"||v.tagName=="SELECT"||v.tagName=="TEXTAREA")&&!v.disabled){v.zp=true;v.disabled=true}}}}P&&g.pop();if(!f){$a=pui.controller!=null&&s.length>0?s:b.errors;if($a!=null)if(b.o!=null){$a=$a[String(b.o)];$a!=null&&pui.Xp($a,b.o)}else{for(r=0;r<$a.length;r++){var sb=$a[r],mb;try{mb=JSON.parse(sb.msg)}catch(Mb){mb=false}if(mb&&typeof mb=="object")if(!(!pui.xd||pui.xd.length<=0)){t=g.find(function(aa){return aa.id===
|
|
631
|
-
sb.id});s=pui.zk(t,null,screen,b.data,b.ref);sb.msg=s.keys&&s.keys.length>0?t["error message"]:pui.xd[mb.transId]}}pui.Xp($a)}}for(
|
|
632
|
+
sb.id});s=pui.zk(t,null,screen,b.data,b.ref);sb.msg=s.keys&&s.keys.length>0?t["error message"]:pui.xd[mb.transId]}}pui.Xp($a)}}for(D=0;D<l.length;D++){g=document.getElementById(l[D]);$a=g.tabPanel;if(!$a)$a=g.Ia;if($a&&typeof $a.Tc==="function"){if(o[D])$a.selectedTab=o[D];$a.Tc()}}if(f)for(D=0;D<n.Fs.length;D++)n.Fs[D].dom.grid.Wb(true);G.forEach(function(aa){if(pui.W!=null&&pui.W.Eg==true)aa.qj=null;if(aa.Ss())aa.collapse(Db(aa.c.id+"_expander"));else{if(aa.Pe)return;aa.getData()}if(!aa.Pe){aa.j>
|
|
632
633
|
1&&aa.d!=null&&aa.d.type=="sliding"&&aa.d.td(aa.j,true);if(pui.pj&&pui.r.Me==null&&pui.r.Rf==null)if(pui.W==null||pui.W.Eg!=true)setTimeout(function(){aa.yt(true)},1);if(aa.d!=null){!f&&aa.d.type=="sliding"&&aa.d.cc==1&&aa.d.z();if(!f&&typeof h["record format name"]==="string"&&aa.d.type=="paging"){var ga=h["record format name"],qa=pui.Hb(ga);if(pui.Z[ga]==null&&pui.Z[qa]!=null)ga=qa;if(pui.Z[ga]!=null){if(pui.Z[ga].PageDown==null)pui.Z[ga].PageDown=[];pui.Z[ga].PageDown.push(aa.i.na);aa.i.op=true;
|
|
633
634
|
if(pui.Z[ga].PageUp==null)pui.Z[ga].PageUp=[];pui.Z[ga].PageUp.push(aa.i.oa);aa.i.qp=true}}}if(aa.lx()){aa.xe.collapseAll();aa.Pl()}aa.ol();aa.my()}});for(var ab in S)if(n=S[ab]){g=-1;if(typeof n.sg==="function")g=n.sg();typeof n.Sl==="function"&&n.Sl(g)}if(!f){pui.onload!=null&&typeof pui.onload=="function"&&C&&b.Ej!==false&&!pui.fa&&pui.onload(b);if(h!=null){if(b.Ej!==false){if(pui.clientLogic)if((ab=h["initial routine"])&&ab.routine){ab=ab.routine;try{eval('pui["routineFunction"] = function() {\r\n'+
|
|
634
|
-
pui.clientLogic[ab]+'\r\n}; \r\npui["routineFunction"]();')}catch(
|
|
635
|
+
pui.clientLogic[ab]+'\r\n}; \r\npui["routineFunction"]();')}catch(ub){console.error(ub)}}ab=h.onload;if(ab!=null&&ab!="")try{eval('var format = "'+h["record format name"]+'";');eval('var file = "'+b.file+'";');eval(ab)}catch(tb){pui.Ca(tb,"Onload Error:\n")}}pui.Cl=h.onsubmit;if(h.onmessage&&typeof h["record format name"]==="string"){pui.Bl[h["record format name"].toLowerCase()]=h.onmessage;if(b.msgInfo!=null&&C&&b.Ej!==false&&!pui.fa){pui.message=b.msgInfo;try{eval('var message = pui["message"];');
|
|
635
636
|
eval(h.onmessage)}catch(d){pui.Ca(d,"Onmessage Error:\n")}}}["onkeydown","onkeypress","onkeyup"].forEach(function(aa){if(C&&b.jl&&h[aa]!=null&&h[aa]!=""){var ga=function(qa){pui.temp_event=qa;eval("var event = pui.temp_event;");eval('var format = "'+h["record format name"]+'";');eval('var file = "'+b.file+'";');try{var xa=eval(h[aa]);if(typeof xa=="function"){if(!qa)qa=window.event;xa(qa)}}catch(Oa){pui.Ca(Oa,aa.substr(0,1).toUpperCase()+aa.substr(1)+" Error:\n")}};U(document.body,aa.substr(2),ga);
|
|
636
637
|
pui.Zl.push({ww:document.body,vw:aa.substr(2),uw:ga})}})}if(b.ll!=null){pui.Mb&&pui.iu();if(b.ej!=null)try{eval('var lazyContainerNum = "'+b.ll+'";');eval(b.ej)}catch(fb){pui.Ca(fb,"OnLazyLoad Error:\n")}}}pui["enable arrow keys"]==true&&pui.pw();e=ud(e);pui.Tl&&console.log("Format "+p+" rendered in "+e+"ms")};
|
|
637
638
|
pui.pw=function(){pui.qr.jy();var b=null,a=document.querySelectorAll("[puiwdgt='grid']");if(!(a.length<1))for(var c=0;c<a.length;c++){b=a[c].querySelectorAll("input.qf");if(!(b.length<1))for(var e=0;e<b.length;e++){b[e].style.left="2px";b[e].style.top="30px";pui.kr(b[e])}}};
|
|
638
|
-
pui.qr=new (function(){var b=this;b.vn=false;b.jy=function(){b.vn=false};b.handler=function(a){a=a||window.event;var c=
|
|
639
|
+
pui.qr=new (function(){var b=this;b.vn=false;b.jy=function(){b.vn=false};b.handler=function(a){a=a||window.event;var c=wb(a);if(!(c.kc&&c.kc.gl())){var e=a.keyCode,f=c;if(f.comboBoxWidget!=null)f=f.comboBoxWidget.getBox();if(f.l!=null)f=f.l.getBox();if(e==37)if(Cb(f)<=0){pui.Uk(c,"left");xb(a);return false}if(e==38){pui.Uk(c,"up");xb(a);return false}if(e==39)if(Cb(f)>=f.value.length){pui.Uk(c,"right");xb(a);return false}if(e==40){pui.Uk(c,"down");xb(a);if(!b.vn&&c.className.includes("qf")&&c.nodeName===
|
|
639
640
|
"INPUT"){b.vn=true;setTimeout(function(){c.dispatchEvent(a)},50)}return false}}}});pui.kr=function(b){typeof b==="undefined"||typeof b.tagName==="undefined"||b.tagName!=="INPUT"||U(b,"keydown",pui.qr.handler)};
|
|
640
641
|
pui.hg=function(b){U(b,"click",function(){if(b.disabled!=true)if(!(b.getAttribute!=null&&b.getAttribute("disabled")=="true")){if(b.Ab!=null){if(b.nextPage==true&&!b.Ab.grid.Tb()){b.Ab.grid.np();return}if(b.Dh==true&&!b.Ab.grid.Gb()){b.Ab.grid.pp();return}}if(b.vd!=null)pui.sb=b.vd;var a=[];if(b.vd!=null){b.Ab&&a.push(b);for(var c in pui.Z){var e=pui.Z[c][pui.sb];if(e!=null)for(var f=0;f<e.length;f++)e[f].Ab||a.push(e[f])}}else a.push(b);for(f=0;f<a.length;f++){a[f].S="1";if(a[f].G=="true"||a[f].G==
|
|
641
642
|
"send data")pui.G=a[f].G}c=b.parentNode;if(c!=null){e=c.parentNode;if(e!=null){e=e.grid;e!=null&&e.fm(c.row)}}pui.Lk=null;pui.hh=null;pui.Kk=null;pui.$n=null;if(b.pui&&b.pui.properties&&b.pui.properties["destination url"]){c=b.pui.properties;pui.Lk=c["destination url"];pui.Kk=!c.bookmarkable||c.bookmarkable=="true";pui.$n=c["redirect to destination"]=="true";pui.hh=[];e=1;f="destination parameter name";for(var h="destination parameter value";c[f];){pui.hh.push([c[f],c[h]]);f="destination parameter name "+
|
|
@@ -646,8 +647,8 @@ f.H;if(n==null)n=new pui.Vf(l);if(!n.ja){pui.Q(f,n.qg());n.Mh(h);n.show(3E3,true
|
|
|
646
647
|
Db(s);if(y!=null){if(y.comboBoxWidget!=null)y=y.comboBoxWidget.getBox();if(y.l!=null)y=y.l.getBox();try{if(p){pui.W.dom=y;pui.W.Eg=true}else{y.focus();pui["highlight on focus"]&&y.select()}n.ja||y.H.show();break}catch(A){}}}setTimeout(function(){pui.xg=false},0)},0)};
|
|
647
648
|
pui.bc=function(){if(pui.dj!=null)return false;if(pui.isServerBusy())return false;var b=pui.Br();if(typeof b.valid=="boolean"&&b.valid==false)if(pui.G!="true"&&(pui.G!="send data"||b.kp==true)){b.kp=false;pui.Xp(b.errors);pui.Ud={};pui.sb="";return false}Bc();if(pui.Cl!=null&&pui.Cl!="")try{pui.Jt=b;var a=eval(pui.Cl);if(typeof a=="function")a=a(b);delete pui.Jt;if(a==false){pui.Ud={};pui.sb="";return false}}catch(c){pui.Ca(c,"Onsubmit Error:\n");pui.Ud={};pui.sb="";return false}if(pui.onsubmit!=
|
|
648
649
|
null&&typeof pui.onsubmit=="function")if(pui.onsubmit()==false){pui.Ud={};pui.sb="";return false}pui.Mb=false;pui.Ne();a=false;if(pui.G!="true"&&(pui.G!="send data"||b.kp==true))a=pui.Rx(b);if(!a){pui.haltFrames();pui.submitResponse(b)}return true};
|
|
649
|
-
pui.Br=function(b){function a(G,B){if(G!=null&&G!=""&&B!=null&&B!="")if(typeof G=="object")for(var
|
|
650
|
-
f[h];if(pui.Po(g)){c[e]="1";break}}if(c[e]!="1")c[e]="0"}pui.Ua.forEach(function(G){if(G.gz&&G.Nb!=null&&G.Yd!=null&&G.Yd!=""){var B=pui.Hb(G.Wa)+".storageKey",
|
|
650
|
+
pui.Br=function(b){function a(G,B){if(G!=null&&G!=""&&B!=null&&B!="")if(typeof G=="object")for(var D in G)c[D]=B;else c[G]=B}var c={};if(!b){for(var e in pui.ah){for(var f=pui.ah[e],h=0;h<f.length;h++){var g=f[h];if(g.modified&&(pui.controller!=null||pui.G!="true")){c[e]="1";break}}if(c[e]!="1")c[e]="0"}for(e in pui.sh){f=pui.sh[e];for(h=0;h<f.length;h++){g=f[h];if(typeof g.value=="string"&&Lb(g.value)==""){c[e]="1";break}}if(c[e]!="1")c[e]="0"}for(e in pui.lh){f=pui.lh[e];for(h=0;h<f.length;h++){g=
|
|
651
|
+
f[h];if(pui.Po(g)){c[e]="1";break}}if(c[e]!="1")c[e]="0"}pui.Ua.forEach(function(G){if(G.gz&&G.Nb!=null&&G.Yd!=null&&G.Yd!=""){var B=pui.Hb(G.Wa)+".storageKey",D=pui.Hb(G.Wa)+".storedState";c[B]=G.Nb;c[D]=G.Yd}})}f=pui.O;if(b)f=b;for(e in f){var l=f[e];g=l[0];if(g.type=="radio")for(var o=0;o<l.length;o++){h=l[o];if(h.modified){g=h;break}}var n=g;if(g.comboBoxWidget!=null)n=g.comboBoxWidget.getBox();if(g.l!=null)n=g.l.getBox();var r=null;if(g.S!=null){r=g.S;if(r=="0")for(h=1;h<l.length;h++){if(l[h].S==
|
|
651
652
|
"1"){r="1";break}}else if(g.S==""&&g.pui!=null&&g.pui.properties["field type"]=="menu"&&l.length>1)for(h=1;h<l.length;h++)if(l[h].S!=""){r=l[h].S;break}if(g.aj){h=e.split(".");o=h[0];h=parseInt(h[h.length-1]);if(!isNaN(h)&&h>0){l=o+".rrn";var p=l+"="+h;if(pui.Ud[p]!=true){if(c[l]==null)c[l]=[];c[l].push(h);pui.Ud[p]=true}}}c[e]=r}else{if(pui.modified&&pui.G!="true"&&pui.G!="send data"){if(g.vq==true&&g.modified!=true){c.valid=false;if(c.errors==null)c.errors=[];c.errors.push({dom:n,msg:pui.getLanguageText("runtimeMsg",
|
|
652
653
|
"ME")});if(n.H!=null&&n.H.ja!=null)n.H.ja=false;continue}if(g.wq==true&&g.modified==true&&n.maxLength!=null&&n.value!=null&&(n.maxLength!=n.value.length||n.value===n.emptyText)){c.valid=false;if(c.errors==null)c.errors=[];c.errors.push({dom:n,msg:pui.getLanguageText("runtimeMsg","MF")});if(n.H!=null&&n.H.ja!=null)n.H.ja=false;continue}}if(pui.G!="true"&&pui.G!="send data"&&g.Ol==true&&!g.disabled)if(typeof n.value=="string"&&(Lb(n.value)==""||n.value===n.emptyText)||g.fileUpload!=null&&g.fileUpload.getCount()<
|
|
653
654
|
1){c.valid=false;if(c.errors==null)c.errors=[];h=pui.getLanguageText("runtimeMsg","required");if(g.fileUpload!=null)h=pui.getLanguageText("runtimeMsg","file required");c.errors.push({dom:n,msg:h});if(n.H!=null&&n.H.ja!=null)n.H.ja=false;continue}if(g.fileUpload!=null&&pui.G!="true"&&pui.G!="send data"){h=xd(g.fileUpload);if(h==null)h=yd(g.fileUpload);if(h!=null){c.valid=false;if(c.errors==null)c.errors=[];c.errors.push({dom:g,msg:h});if(g.H!=null&&g.H.ja!=null)g.H.ja=false;continue}}if(g.modified==
|
|
@@ -682,9 +683,9 @@ document.createElement("div");b.style.backgroundImage="url('"+pui["loading anima
|
|
|
682
683
|
a+=Math.max(document.body.scrollTop,document.documentElement.scrollTop);b.style.top=a+"px";b.style.zIndex=pui["loading animation"].zIndex}b.id="_pui_loading_animation";pui.runtimeContainer.appendChild(b);for(b=0;b<pui.Ua.length;b++){a=pui.Ua[b];a.Pe||a.mask()}};pui.Yb=function(){var b=Db("_pui_loading_animation");b!=null&&b.parentNode!=null&&b.parentNode.removeChild(b);for(b=0;b<pui.Ua.length;b++){var a=pui.Ua[b];a.Pe||a.unMask()}};
|
|
683
684
|
pui.qh=function(b,a){if(!(R!="dspf"||pui.fl)){if(!b)b=window.event;var c=b.keyCode,e;if(pui.xr)pui.En(b);else{e=c-111;if(a==null)if(e>=1&&e<=12){if(!pui.is_old_ie||e>1||b.shiftKey){if(b.shiftKey)e+=12;else if(b.Ff&&Event.fk)e+=12;a="F"+e;if(b.altKey)a="Alt-"+a;else if(b.ctrlKey)a="Ctrl-"+a}}else switch(c){case 13:a="Enter";break;case 19:a="Pause/Break";break;case 27:a="Escape";break;case 33:a="PageUp";break;case 34:a="PageDown";break;case 44:a="PrtScn";break}if(a=="Ctrl-F9"){pui.downloadJSON();return false}if((e=
|
|
684
685
|
a!=null&&pui.Md!=null&&(a=="Enter"||a=="PageUp"||a=="PageDown"||pui.Z[pui.Md][a]!=null))&&a=="PageUp"||a=="PageDown"){var f=false;for(c=0;c<pui.Ua.length;c++){var h=pui.Ua[c];if(h.i&&h.i.wd)if(f==false)f=true;else{e=false;break}}}if(e){e=[];f=c=false;for(var g in pui.Z){h=pui.Z[g][a];if(h!=null){var l=true;for(c=0;c<h.length;c++){var o=h[c];o.disabled||(l=false);if(o.Ab!=null){if(pui.Fj!==undefined&&pui.Fj!==null&&o.Ab.grid.Wa!=pui.Fj)continue;if(o.nextPage==true&&!o.Ab.grid.Tb()){o.Ab.grid.np();
|
|
685
|
-
|
|
686
|
-
"function"&&!e[0].Ka&&o.nextPage!=true&&o.Dh!=true&&!f){e[0].onclick();pui.runtimeContainer.focus();
|
|
687
|
-
null;pui.Nc=null;pui.Mc=null}
|
|
686
|
+
xb(b);if(pui.is_old_ie)try{b.keyCode=0}catch(n){}return false}if(o.nextPage==true&&!o.Ab.lj){xb(b);if(pui.is_old_ie)try{b.keyCode=0}catch(r){}return false}if(o.Dh==true&&!o.Ab.grid.Gb()){o.Ab.grid.pp();xb(b);if(pui.is_old_ie)try{b.keyCode=0}catch(p){}return false}if(o.Dh==true&&!o.Ab.mj){xb(b);if(pui.is_old_ie)try{b.keyCode=0}catch(t){}return false}if(o.disabled){xb(b);if(pui.is_old_ie)try{b.keyCode=0}catch(s){}return false}}if(o.Dh==true||o.nextPage==true)f=true;e.push(o)}if(e.length>=1&&typeof e[0].onclick==
|
|
687
|
+
"function"&&!e[0].Ka&&o.nextPage!=true&&o.Dh!=true&&!f){e[0].onclick();pui.runtimeContainer.focus();xb(b);if(pui.is_old_ie)try{b.keyCode=0}catch(y){}return false}if(l){xb(b);if(pui.is_old_ie)try{b.keyCode=0}catch(A){}return false}c=true}}if(a=="Enter"&&!pui.bo)c=true;if(c){pui.sb=a;for(c=0;c<e.length;c++){e[c].S="1";if(e[c].G=="true"||e[c].G=="send data")pui.G=e[c].G;if(e[c].Ka){pui.Ka=e[c].Ka;pui.Nc=e[c].o;pui.Mc=e[c].Wj}}if(pui.bc()==false){for(c=0;c<e.length;c++)e[c].S="0";pui.G="false";pui.Ka=
|
|
688
|
+
null;pui.Nc=null;pui.Mc=null}xb(b);if(pui.is_old_ie)try{b.keyCode=0}catch(C){}return false}}if(a!=null&&(a!="PageUp"&&a!="PageDown"||pui.Cn)){xb(b);if(pui.is_old_ie)try{b.keyCode=0}catch(F){}return false}}}};pui.Fo=function(b){return pui.qh(b,"F1")};
|
|
688
689
|
pui.run=function(b){var a=b.mobile===true,c=b.screenshot===true,e=b.parameter,f=b.program;if(f==null)f="";var h=b.container,g=b.workstnid;if(g==null)g="";g=g.toUpperCase();var l=b.debug,o=b.log;if(l==null)l="0";if(o==null)o="0";pui.Tl=b.renderLog===true;var n="*LIBL",r=f.split("/");if(r.length==2){n=r[0];f=r[1]}if(h==null)h="pui";if(typeof h=="string")h=document.getElementById(h);U(document.body,"keydown",pui.qh);U(document.body,"help",pui.Fo);U(document.body,"mousedown",pui.Kr);b.jsonURL==null&&
|
|
689
690
|
b.replay==null&&b.mode!="preview"&&pui.tr();h.setAttribute("tabindex","0");pui.runtimeContainer=h;pui.Ne();r="post";var p=Xb("PUI0001200.pgm"),t=b.jsonURL;if(b.replay){t="/profoundui/userdata/automated-testing/tests/"+b.replay;t.endsWith(".json")||(t+=".json")}if(t!=null){p=t+"?r="+Math.floor(Math.random()*1E9+1);r="get"}f={program:f.toUpperCase(),library:n.toUpperCase(),init:"1",pathname:location.pathname,debug:l,log:o,workstnid:g};if(b.lang!=null&&b.lang!="")f.lang=b.lang;if(pui.isCloud){f.workspace_id=
|
|
690
691
|
pui.cloud.ws.id;f.workspace_url=location.href;if(c)f.screenshot="1"}if(b.suffixid=="1")f.suffixid="1";if(b.duplicateid=="1")f.duplicateid="1";if(a){f.mobile="1";if(e==null)e="";f.p1=e;f.l1="250"}f.screen_width=screen.width;if(pui.ff)f.screen_width=pui.ff.split("x")[0];c=b.params;if(c!=null)for(var s in c)f[s]=c[s];if(b.mode=="preview"){r=null;if(window.opener&&window.opener.pui&&typeof window.opener.pui.generatePreview==="function")r=window.opener.pui.generatePreview;if(window.parent&&window.parent!=
|
|
@@ -692,16 +693,16 @@ window&&pui.Uh(window.parent)&&window.parent.noderun&&typeof window.parent.noder
|
|
|
692
693
|
method:"post",params:A,sendAsBinary:false,suppressAlert:true,handler:function(){document.body.innerHTML="<br/><br/>Preview screen submitted."},onfail:function(){document.body.innerHTML="<br/><br/>Preview screen submitted."}})}:null;pui.nl(y,function(){pui.render(y)})}else{h.innerHTML="";pui.alert("Preview data is no longer available. You can rebuild the preview in the Visual Designer.")}}else{s=pui.getCookie("puiRefreshId");if(s!=null){pui.deleteCookie("puiRefreshId","/",null,null,"Strict");f={refresh:"1"};
|
|
693
694
|
p+="/"+s}pui.wj&&pui.pd.payloads.push({url:p,data:f});dc({url:pui.gg(p),method:r,sendAsBinary:false,params:f,saveResponse:true,suppressAlert:true,handler:function(A){function C(){if(Array.isArray(A.payloads)){pui.Gp=A;pui.Cg=Number(b.step);if(!pui.Cg||isNaN(pui.Cg))pui.Cg=1;var F=A.b;A=A.payloads[pui.Cg-1].response;A=JSON.parse(JSON.stringify(A));A.b=F;A.version=pui.version;pui.fw()}pui.render(A)}A.b=h;pui.nl(A,function(){pui.qx(a,C)})},onfail:function(A){pui.Yb();setTimeout(function(){if(pui.onoffline==
|
|
694
695
|
null){pui["suppress comm errors"]||pui.alert(pui.Ji(A));pui.is_touch&&setTimeout(function(){navigator.app!=null&&navigator.app.exitApp!=null&&navigator.app.exitApp()},500)}else pui.onoffline()},500)}})}};
|
|
695
|
-
pui.signon=function(b){var a=b.mobile===true,c=b.screenshot===true,e=b.container,f=b.debug,h=b.workstnid,g=b.atrium_item;if(g==null)g="";if(h==null)h="";h=h.toUpperCase();var l=b.log,o=b.plog;pui.Tl=b.renderLog===true;if(e==null)e="pui";if(f==null)f="0";if(l==null)l="0";if(o==null)o="0";if(typeof e=="string")e=document.getElementById(e);U(document.body,"keydown",pui.qh);U(document.body,"help",pui.Fo);pui.tr();e.setAttribute("tabindex","0");pui.runtimeContainer=e;pui.dj==
|
|
696
|
-
r="",p="";if(typeof b.program!="undefined"){
|
|
697
|
-
screen.width;if(pui.ff)f.screen_width=pui.ff.split("x")[0];b=b.params;if(b!=null)for(var
|
|
698
|
-
null){pui["suppress comm errors"]||pui.alert(pui.Ji(
|
|
696
|
+
pui.signon=function(b){var a=b.mobile===true,c=b.screenshot===true,e=b.container,f=b.debug,h=b.workstnid,g=b.atrium_item;if(g==null)g="";if(h==null)h="";h=h.toUpperCase();var l=b.log,o=b.plog,n=b.autotest;pui.Tl=b.renderLog===true;if(e==null)e="pui";if(f==null)f="0";if(l==null)l="0";if(o==null)o="0";if(n==null)n="0";if(typeof e=="string")e=document.getElementById(e);U(document.body,"keydown",pui.qh);U(document.body,"help",pui.Fo);pui.tr();e.setAttribute("tabindex","0");pui.runtimeContainer=e;pui.dj==
|
|
697
|
+
null&&pui.Ne();var r=Xb("PUI0001200.pgm"),p="",t="";if(typeof b.program!="undefined"){t="*LIBL";var s=b.program.split("/");if(s.length==2){t=s[0];p=s[1]}}f={signon:"1",program:p.toUpperCase(),library:t.toUpperCase(),init:"1",pathname:location.pathname,debug:f,log:l,plog:o,autotest:n,workstnid:h,atrium_item:g};if(b.lang!=null&&b.lang!="")f.lang=b.lang;if(pui.isCloud){f.workspace_id=pui.cloud.ws.id;f.workspace_url=location.href;if(c)f.screenshot="1"}if(b.suffixid=="1")f.suffixid="1";if(b.duplicateid==
|
|
698
|
+
"1")f.duplicateid="1";if(a)f.mobile="1";f.screen_width=screen.width;if(pui.ff)f.screen_width=pui.ff.split("x")[0];b=b.params;if(b!=null)for(var y in b)f[y]=b[y];y=pui.getCookie("puiRefreshId");if(y!=null){pui.deleteCookie("puiRefreshId","/",null,null,"Strict");f={refresh:"1"};r+="/"+y}if(pui.dj==null){pui.wj&&pui.pd.payloads.push({url:r,data:f});dc({url:pui.gg(r),method:"post",sendAsBinary:false,params:f,saveResponse:true,suppressAlert:true,handler:function(A){A.b=e;pui.nl(A,function(){pui.render(A)})},
|
|
699
|
+
onfail:function(A){pui.Yb();setTimeout(function(){if(pui.onoffline==null){pui["suppress comm errors"]||pui.alert(pui.Ji(A));pui.is_touch&&setTimeout(function(){navigator.app!=null&&navigator.app.exitApp!=null&&navigator.app.exitApp()},500)}else pui.onoffline()},500)}})}};
|
|
699
700
|
pui.Op=function(b){b.profoundui="1";dc({url:pui.normalizeURL(pui.controller),method:"post",params:b,sendAsBinary:false,saveResponse:true,suppressAlert:true,handler:function(a){if(a==null){document.body.innerHTML='<div id="close-browser-msg" style="font-family: Trebuchet MS; width: 95%; text-align: center; font-size: 200%;"><br/>'+pui.getLanguageText("runtimeMsg","session ended text")+"<br/><br/>"+pui.getLanguageText("runtimeMsg","close browser text")+"</div>";pui.closeSession()}else{a.b=pui.runtimeContainer;
|
|
700
701
|
var c=a.data;if(c==null)c={};if(a.view!=null)pui.view=a.view;if(a.redirect!=null)location.href=a.redirect;else if(a.controller!=null){pui.controller=a.controller;pui.Op({})}else if(a.html!=null)pui.runtimeContainer.innerHTML=a.html;else{var e=a.format;if(e==null)e=a.screen;var f=a.formats;if(f==null)f=a.screens;a=a.appJob||{};pui.show({path:pui.normalizeURL(pui.view),data:c,format:e,formats:f,appJob:a,handler:function(h){pui.Op(h)}})}}},onfail:function(a){pui.onoffline==null&&!pui["suppress comm errors"]&&
|
|
701
702
|
pui.alert(pui.Ji(a));pui.Yb();pui.Ul();pui.onoffline!=null&&pui.onoffline()}})};
|
|
702
|
-
pui.start=function(){pui.Ty();var b=Cc();pui.ff=b.canvasSize;var a=b.pgm;if(a==null)a=b.program;var c=b.debug,e=b.container,f=b.workstnid,h=b.suffixid,g=b.duplicateid,l=b.log,o=b.plog;pui.wj=b.record==="1";var
|
|
703
|
-
1;
|
|
704
|
-
a;if(
|
|
703
|
+
pui.start=function(){pui.Ty();var b=Cc();pui.ff=b.canvasSize;var a=b.pgm;if(a==null)a=b.program;var c=b.debug,e=b.container,f=b.workstnid,h=b.suffixid,g=b.duplicateid,l=b.log,o=b.plog,n=b.autotest;pui.wj=b.record==="1";var r=b.atrium_item,p=b.initpgm,t=b.jsonURL,s=b.replay,y=b.step,A=b.mode,C=b.controller,F=b.mobile==="1",G=b.screenshot==="1",B=b.observe==="1";if(B)pui.nt.enabled=true;var D="";if(b.lang!=null)D=b.lang;pui.Tl=b.renderLog==="1";var E={};pui.ao!=null&&typeof pui.ao=="function"&&pui.ao(e);
|
|
704
|
+
for(var K=1;K<=255;K++){var S=b["p"+K],P=b["l"+K];if(S==null||P==null)break;E["p"+K]=S;E["l"+K]=P}if(C!=null)pui.controller=C;if(pui.controller!=null){U(document.body,"keydown",pui.qh);U(document.body,"help",pui.Fo);U(document.body,"mousedown",pui.Kr);pui.Op({})}else{c={container:e,debug:c,log:l,plog:o,autotest:n,workstnid:f,suffixid:h,duplicateid:g,mobile:F,screenshot:G,params:E,observe:B,lang:D,renderLog:pui.Tl};if(a==null&&t==null&&s==null&&A==null){if(r!=null)c.atrium_item=r;else if(p!=null)c.program=
|
|
705
|
+
p;pui.signon(c)}else{c.program=a;if(t!=null)c.jsonURL=t;if(s!=null)c.replay=s;if(y!=null)c.step=y;if(A!=null)c.mode=A;if(c.mode==="preview")c.previewTab=b.previewTab;pui.run(c)}}};pui.newSession=function(){window.location.reload()};
|
|
705
706
|
pui.closeSession=function(){if(window.parent!=window&&pui.jg(window.parent))window.Atrium.closeTab();else{var b=pui.Uh(window.parent);if(window.parent!=window&&b&&window.parent.pui&&window.parent.pui.isCloud){var a=window.parent.Ext;if(a&&a.getCmp)if(a=a.getCmp("_south_panel_stop"))if(typeof a.handler==="function"){a.handler();return}}if(window.parent!=window&&b&&window.parent.noderun&&typeof window.parent.noderun.stopApp==="function")window.parent.noderun.stopApp();else{document.body.innerHTML='<div id="close-browser-msg" style="width: 95%; text-align: center; font-size: 200%;"><br/>'+
|
|
706
707
|
pui.getLanguageText("runtimeMsg","close browser text")+"</div>";try{window.close()}catch(c){}if(window.puiMobileClient!=null)window.location.href="index.html"}}};
|
|
707
708
|
pui.maskScreen=function(){function b(g){var l={x:0,y:0};if(g.offsetParent)for(;;){l.x+=g.offsetLeft;l.y+=g.offsetTop;if(!g.offsetParent)break;g=g.offsetParent}else if(g.x){l.x+=g.x;l.y+=g.y}if(document.documentElement.scrollHeight>document.documentElement.clientHeight)l.x+=8;return l}function a(){if(!(pui.scrollFrequency!=null&&pui.$s!=null&&(new Date).getTime()-pui.$s<pui.scrollFrequency)){pui.$s=(new Date).getTime();var g=document.documentElement.scrollTop,l=document.documentElement.scrollLeft;
|
|
@@ -717,23 +718,23 @@ pui.showMessageSubfileHelp=function(b){if(pui.Bc!=null&&!document.body.contains(
|
|
|
717
718
|
pui.appJob.dateSeparator);e=e.format(f,"en_US")}f=Wc("_msgsfltime"+c);h=pui.appJob.timeSeparator;if(h==null)h=".";f=f.substr(0,2)+h+f.substr(2,2)+h+f.substr(4,2);h=b.innerHTML;var g=Wc("_msgsflhelp"+c);g=g.replace(/&N/g,"<br/><br/>");g=g.replace("Cause . . . . . :","<strong>Cause:</strong>");g=g.replace("Recovery . . . :","<strong>Recovery:</strong>");if((g=g.trim())&&g.substr(0,1)!=="<")g="<br/><br/><strong>Additional Information:</strong> "+g;c='<div class="pui-sflmsg-panel-heading"><strong>Additional Message Information</strong></div>';
|
|
718
719
|
c+='<div class="pui-sflmsg-panel-content">';c+="<strong>Message Id:</strong> "+a+"<br/><br/>";c+="<strong>Message:</strong> "+h+"<br/><br/>";c+="<strong>Date/Time:</strong> "+e+" "+f;c+=g;c+="<br/><br/>";c+="</div>";e=b.parentNode.parentNode;b=parseInt(e.style.top);a=parseInt(e.style.left);a+=3;for(f=e.parentNode;f&&f!==pui.runtimeContainer&&f!==document.body;){b+=f.offsetTop;a+=f.offsetLeft;f=f.offsetParent}e=e.clientWidth-25;if(e<600)e=600;var l;if(pui.Bc==null||pui.Bc.parentNode==null){l=document.createElement("div");
|
|
719
720
|
pui.runtimeContainer.appendChild(l)}else l=pui.Bc;l.style.position="absolute";l.style.width=e+"px";l.className="pui-sflmsg-panel";l.style.zIndex=pui.cd;l.innerHTML=c;l.style.display="";c=document.createElement("div");c.style.position="absolute";c.style.top="3px";c.style.right="2px";c.className="pui-sflmsg-panel-close-button";c.onclick=function(){l.style.display="none";l.parentNode&&l.parentNode.removeChild(l)};l.style.left=a+"px";b=b-l.offsetHeight-5;if(b<5)b=5;l.style.top=b+"px";l.appendChild(c);
|
|
720
|
-
pui.Bc=l}};pui.Ij=function(b){b=
|
|
721
|
-
pui.Td=function(b,a){var c;if(b!=null)c=
|
|
721
|
+
pui.Bc=l}};pui.Ij=function(b){b=wb(b);if(!(b.tagName=="INPUT"&&b.type=="button"))pui.activeElement=b;b=b;if(b.parentNode&&b.parentNode.comboBoxWidget)b=b.parentNode;if(b.parentNode&&b.parentNode.l)b=b.parentNode;b=b.parentNode;if(b!=null){var a=b.parentNode;if(a!=null){a=a.grid;a!=null&&a.fm(b.row)}}};
|
|
722
|
+
pui.Td=function(b,a){var c;if(b!=null)c=wb(b);if(a!=null)c=a;var e=c.parentNode;if(e&&e.comboBoxWidget)e=e.parentNode;var f=null;if(e!=null&&e.parentNode!=null)f=e.parentNode.grid;var h=false;if(c.tagName=="A"||c.tagName=="BUTTON"||c.tagName=="INPUT"&&c.type=="button"||c.button!=null)h=true;var g=c;if(g.parentNode!=null&&g.parentNode.comboBoxWidget!=null)g=g.parentNode;if(g.parentNode!=null&&g.parentNode.l!=null)g=g.parentNode;if(g.tagName=="OPTION"&&g.parentNode.tagName=="SELECT")g=g.parentNode;
|
|
722
723
|
if(g.tagName=="IMG"&&g.parentNode.tagName=="BUTTON"){g=g.parentNode;h=true}pui.r.record=g.lc;pui.r.field=g.Sc;var l=Cb(c)+1;if(l<=0)l=1;if(c.maxLength!=null&&c.maxLength>=1&&l>c.maxLength)l=c.maxLength;pui.r.position=String(l);pui.r.lo=g.id;pui.r.row=g.kf;pui.r.qq=null;pui.r.pq=null;c=pui.Zo;if(c!=null)if(c.length<=2||c.substr(c.length-2)!="px"){c=Number(c);if(!isNaN(c)&&c>0){pui.r.qq=pui.r.row;if(pui.r.row!=null)pui.r.row=Number(pui.r.row)+c}}if(e!=null&&e.row!=null&&typeof e.row=="number"){if(pui.r.row!=
|
|
723
724
|
null){pui.r.row=Number(pui.r.row)+e.row;if(f!=null&&f.h)pui.r.row-=1;pui.r.row=String(pui.r.row)}f!=null&&f.fm(e.row)}e=pui.Yo;if(e!=null)if(e.length<=2||e.substr(e.length-2)!="px")e=Number(e);if(g.oe==null)pui.r.column=null;else{pui.r.column=Number(g.oe)+Number(l)-1;if(!isNaN(e)&&e>0){pui.r.pq=pui.r.column;pui.r.column=pui.r.column+e+1}}if(!h)for(h=0;h<pui.Ua.length;h++){g=pui.Ua[h];if(g!=f)g.c.zi=0}};
|
|
724
|
-
pui.Kr=function(b){var a=false;b=
|
|
725
|
-
pui.vk=function(b){b=
|
|
726
|
-
pui.Rl=function(b){b=
|
|
727
|
-
pui.zn=function(b){b=b||window.event;var a=b.keyCode;if(a<48||a>90&&a<96||a>111&&a<186)if(a!=32)return;b=
|
|
725
|
+
pui.Kr=function(b){var a=false;b=wb(b);if(b==document.body)a=true;if(b==pui.runtimeContainer)a=true;if(b.parentNode!=null&&b.parentNode.panel!=null)a=true;if(a){pui.r.field=null;pui.r.position=null;pui.r.lo=null}};
|
|
726
|
+
pui.vk=function(b){b=wb(b);var a=b.className;if(a==null)a="";a=Lb(a);if(a.indexOf(b.focusClass)==-1)a+=" "+b.focusClass;b.className=a;if(b.parentNode&&b.parentNode.pui&&b.parentNode.pui.properties["field type"]==="combo box"){a=b.parentNode;var c=a.className;if(c==null)c="";c=Lb(c);if(c.indexOf(b.focusClass)==-1)c+=" "+b.focusClass;a.className=c}};
|
|
727
|
+
pui.Rl=function(b){b=wb(b);var a=b.className;if(a==null)a="";for(a=Lb(a);a.indexOf(b.focusClass)>=0;)a=a.replace(b.focusClass,"");b.className=Lb(a);if(b.parentNode&&b.parentNode.pui&&b.parentNode.pui.properties["field type"]==="combo box"){a=b.parentNode;var c=a.className;if(c==null)c="";for(c=Lb(c);c.indexOf(b.focusClass)>=0;)c=c.replace(b.focusClass,"");a.className=c}};
|
|
728
|
+
pui.zn=function(b){b=b||window.event;var a=b.keyCode;if(a<48||a>90&&a<96||a>111&&a<186)if(a!=32)return;b=wb(b);if(b.comboBoxWidget!=null)b=b.comboBoxWidget.getBox();if(b.l!=null)b=b.l.getBox();if(b.value.length==b.maxLength&&(pui.is_touch||Cb(b)>=b.maxLength)){pui.sb="Enter";pui.click()}};pui.cz=function(b){switch(b){case 0:return"char";case 7:return"zoned";case 9:return"packed";case 10:return"floating";case 15:return"graphic";case 16:return"date";case 17:return"time";case 18:return"timestamp";default:return"char"}};
|
|
728
729
|
pui.Do=function(b){function a(h){for(var g=[],l=[],o=document.querySelectorAll("INPUT,SELECT,TEXTAREA"),n=null,r=null,p=0;p<o.length;p++){n=o[p];if(n==h)r=p;else!n.clientHeight||!n.clientWidth||n.readOnly=="true"||n.disabled=="true"||n.tabIndex=="-1"||(r?l.push(n):g.push(n))}h=l.concat(g);if(h.length>0)return h[0];return null}for(b=b;(b=a(b))!=null;){var c=b;if(b!=null&&b.comboBoxWidget!=null)c=b.comboBoxWidget.getBox();if(b!=null&&b.l!=null)c=b.l.getBox();var e=c.tagName;if(e=="INPUT"||e=="SELECT"||
|
|
729
730
|
e=="TEXTAREA"||e=="A")if(!c.readOnly&&!c.disabled&&b.style.visibility!="hidden"&&c.tabIndex!="-1"){try{c.focus();if(document.activeElement!=c)continue;pui["highlight on focus"]&&c.select();setTimeout(function(){pui.Td(null,c)},0)}catch(f){}break}}};pui.Kl=function(b){return b.search(/calc/i)>=0?true:false};
|
|
730
731
|
pui.Tk=function(b,a){var c,e;if(a=="left"||a=="right"){c=b.style[a];e=b.parentNode.offsetWidth}if(a=="bottom"||a=="top"){c=b.style[a];e=b.parentNode.offsetHeight}var f;f=c.replace(/calc|[{()}]/gi,"");f=f.split(" ");if(f.length<2){if(f[0].search("%")>=0)return pui.De(f[0],e);return pui.De(f[0])}c=f[1];e=f[0].search("%")>=0?pui.De(f[0],e):pui.De(f[0]);f=pui.De(f[2]);return eval(e+c+f)};
|
|
731
732
|
pui.De=function(b,a){if(b==="")return 0;if(b.search("%")>=0){if(!a)return null;return Math.round(parseInt(b)/100*parseInt(a))}return b.search(/rem/i)>=0||b.search(/em/i)>=0?parseInt(parseInt(b)*16):parseInt(b)};
|
|
732
|
-
pui.Uk=function(b,a){function c(
|
|
733
|
+
pui.Uk=function(b,a){function c(E){E=l.getElementsByTagName(E);for(var K,S=0;S<E.length;S++){K=E[S];K.tagName=="A"&&K.parentNode.pui!=null&&K.parentNode.pui.properties!=null&&K.parentNode.pui.properties["field type"]=="hyperlink"&&K.parentNode.tabIndex==-1||K.tagName.toUpperCase()=="INPUT"&&K.type.toUpperCase()=="BUTTON"||K.tabIndex==-1||C.push(K)}}if(b.parentNode.comboBoxWidget!=null)b=b.parentNode;if(b.parentNode.l!=null)b=b.parentNode;var e=b.parentNode.offsetWidth,f=b.parentNode.offsetHeight,
|
|
733
734
|
h=pui.Kl(b.style.left)?pui.Tk(b,"left"):pui.De(b.style.left,e);if(isNaN(h))return null;var g=pui.Kl(b.style.top)?pui.Tk(b,"top"):pui.De(b.style.top,f);if(isNaN(g))return null;var l=b.parentNode,o=l.parentNode;if(o.grid!=null){var n=parseInt(b.parentNode.style.left);if(isNaN(n))return null;var r=parseInt(b.parentNode.style.top);if(isNaN(r))return null;var p=parseInt(o.style.left);if(isNaN(p))return null;var t=parseInt(o.style.top);if(isNaN(t))return null;h+=n+p;g+=r+t;l=o.parentNode}var s=null,y=99999,
|
|
734
735
|
A=99999,C=[];c("input");c("select");c("textarea");c("a");for(var F=0;F<C.length;F++){var G=C[F];if(!(G.readOnly||G.disabled||G.style.visibility=="hidden"||G.parentNode.style.visibility=="hidden")){if(G.tagName=="A")G=G.parentNode;r=G;if(G.parentNode.comboBoxWidget!=null)r=G.parentNode;if(G.parentNode.l!=null)r=G.parentNode;G=pui.Kl(r.style.left)?pui.Tk(r,"left"):pui.De(r.style.left,e);if(!isNaN(G)){var B=pui.Kl(r.style.top)?pui.Tk(r,"top"):pui.De(r.style.top,f);if(!isNaN(B)){o=r.parentNode.parentNode;
|
|
735
736
|
if(o.grid!=null){n=parseInt(r.parentNode.style.left);if(isNaN(n))return null;r=parseInt(r.parentNode.style.top);if(isNaN(r))return null;p=parseInt(o.style.left);if(isNaN(p))continue;t=parseInt(o.style.top);if(isNaN(t))continue;G+=n+p;B+=r+t}o=Math.abs(h-G);n=Math.abs(g-B);if(a=="down"&&B>g||a=="up"&&g>B)if(n<A||n==A&&o<y){s=C[F];y=o;A=n}if(a=="right"&&G>h||a=="left"&&h>G)if(n<=3&&o<y){s=C[F];y=o;A=n}}}}}if(s!=null)try{s.focus();pui["highlight on focus"]&&s.select();setTimeout(function(){pui.Td(null,
|
|
736
|
-
s)},0)}catch(
|
|
737
|
+
s)},0)}catch(D){}};pui.L=pui.Hb=function(b){if(b==null)return"";return pui.handler!=null||pui.viewdesigner||pui.pjsDefaultMode==="case-sensitive"?b:b.toUpperCase()};
|
|
737
738
|
pui.Wr=function(b,a){if(!b.disabled&&!b.readOnly)if(b.tagName=="TEXTAREA"||b.tagName=="INPUT"&&(b.type=="text"||b.type=="number"||b.type=="password")){var c=b.Tn;if(pui.is_touch&&!pui.is_mouse_capable)c=Cb(b);if(c==null)return false;if(c<0)c=0;c=b.value.substr(0,c);if(b.Wt==true&&b.maxLength!=null)for(;c.length<b.maxLength;)c="0"+c;else if(a&&!c.includes("-")){var e=Number(c);if(!isNaN(e)&&e!=0)c="-"+c}e=b.value!==c;b.value=c;b.modified=true;e&&typeof b.onchange==="function"&&b.onchange()}if(b.yn==
|
|
738
739
|
true){pui.sb="Enter";pui.click()}else pui.Do(b);return false};
|
|
739
740
|
pui.translate=function(b){pui.xd=b.translations;if(pui.xd!=null){for(var a in pui.xd)pui.xd[a]=pui.formatting.fh(pui.xd[a]);a="";b=b.layers;for(var c=0;c<b.length;c++)for(var e=b[c].formats,f=0;f<e.length;f++){var h=e[f],g=h.metaData.screen,l=h.metaData.items,o=pui.zk(null,null,g,h.data,h.ref);a+=pui.eo(g,pui.xd,true,o);for(o=0;o<l.length;o++){var n=l[o];if(!n.grid){var r=pui.zk(n,null,g,h.data,h.ref);a+=pui.eo(n,pui.xd,false,r)}}}if(a!="")return"Missing translation data:\n\n"+a}};
|
|
@@ -753,7 +754,7 @@ pui.wikihelp.pu=function(b,a){b.getBoundingClientRect();var c=b.offsetWidth,e=b.
|
|
|
753
754
|
b.nextSibling.offsetHeight)}}else if(a.pui["field type"]==="tab panel"){e=b.childNodes[1].offsetHeight;a.style.fontSize=e*0.85+"px"}else if(a.pui["field type"]==="date field")c=b.offsetWidth+22;else if(a.pui["field type"]==="grid"&&a.pui.nj!=null)e+=a.pui.nj;else if(a.pui["field type"]==="styled button"&&!a.pui.nx){e=0;for(var f=b.firstChild;f!=null;){if(f.style!=null&&f.style.position=="absolute"){var h=f.offsetTop+f.offsetHeight;if(h>e)e=h}f=f.nextSibling}}a.style.width=c+"px";a.style.height=e+
|
|
754
755
|
"px";if(pui.wikihelp.overlayText&&pui.wikihelp.fontScale!=false){f=Number(pui.wikihelp.fontScale);if(isNaN(f))f=1.56;a.style.fontSize=Math.min(c/pui.wikihelp.overlayText.length*f,e*f/2)+"px"}if(pui.wikihelp.image){f=a.getElementsByTagName("img")[0];if(pui.wikihelp.imageSquare!==false){c=Math.min(c,e);f.width=c;f.height=c}else{f.width=c;f.height=e}}};
|
|
755
756
|
pui.wikihelp.overlayOff=function(){bc(window,"scroll",pui.wikihelp.onscroll);for(var b=0;b<pui.wikihelp.overlays.length;b++)pui.wikihelp.overlays[b].style.display="none"};
|
|
756
|
-
pui.wikihelp.Ax=function(b){b=b||window.event;
|
|
757
|
+
pui.wikihelp.Ax=function(b){b=b||window.event;xb(b);var a=b.target||b.srcElement;if(a.parentNode.pui&&a.parentNode.pui.dspf)a=a.parentNode;var c={};c.dspf=a.pui.dspf;c.recfmt=a.pui.recfmt;c.fieldId=a.pui.fieldId;c.fieldName=a.pui.fieldName;c["field type"]=a.pui["field type"];c.event=b;typeof pui.wikihelp.onclick==="function"&&pui.wikihelp.onclick(c);return false};
|
|
757
758
|
pui.wikihelp.getScreenInfo=function(){pui.wikihelp.overlays.length<1&&pui.wikihelp.Qr(false);var b={};b.formats=bd();b.dspf=pui.layers[0].formats[0].file;b.fields=[];for(var a=0;a<pui.wikihelp.overlays.length;a++){var c={};c.id=pui.wikihelp.overlays[a].pui.fieldId;if(pui.wikihelp.overlays[a].pui.fieldName&&pui.wikihelp.overlays[a].pui.fieldName.length>0)c.name=pui.wikihelp.overlays[a].pui.fieldName;b.fields.push(c)}return b};
|
|
758
759
|
pui.Ts=function(b,a){if(b=="response"||b=="chart response"||b=="menu response"||b=="upload response"||b=="tab response"||b=="active tab"||b=="active section"||b=="radio button group"||b=="page down response"&&a.grid!=null&&a.grid.i!=null||b=="page up response"&&a.grid!=null&&a.grid.i!=null||b=="value"&&(a.tagName=="INPUT"&&a.type!="button"||a.tagName=="SELECT"||a.tagName=="TEXTAREA"||a.comboBoxWidget!=null||a.l!=null||a.U!=null||a.signaturePad!=null||a.M!=null))return true;return false};
|
|
759
760
|
pui.Yj={Wp:function(b){this.rn=b.rn;this.he=b.he;if(this.he!=="previous")this.he="new";this.jj=b.jj==="true"||b.jj===true;pui.Yj.wi();var a=b.b.id;this.ac=b.b;this.ac.id="pui-previous";this.ac.style.zIndex=10;b=this.ac.getElementsByTagName("*");for(var c=0;c<b.length;c++){var e=b[c];e.hasAttribute("id")&&e.removeAttribute("id");e.Ia!=null&&typeof e.Ia.dm=="function"&&e.Ia.dm()}this.Hf=document.createElement("div");this.Hf.id=a;this.Hf.style.zIndex=20;this.ac.parentNode.appendChild(this.Hf);return this.Hf},
|
|
@@ -771,23 +772,23 @@ pui.ao=function(b){if(b==null)b="pui";if(typeof b=="string")b=document.getElemen
|
|
|
771
772
|
ad(e);e+=3;c.style.top=e+"px"});U(document,"mousedown",function(e){var f=$c(e);f+=1;c.style.left=f+"px";e=ad(e);e+=1;c.style.top=e+"px"})}b=document.createElement("input");b.style.position="absolute";if(pui.xf){b.style.left="90px";b.style.top="164px";b.style.width="223px";b.style.backgroundColor="#d3dae4"}else{b.style.left="285px";b.style.top="89px";b.style.width="455px"}b.style.color="#999999";b.style.borderStyle="none";b.style.fontFamily="Trebuchet MS, Sans-Serif";b.style.fontSize="14px";b.value=
|
|
772
773
|
location.href;if(!pui.xf){b.onclick=function(){Db("ipadKeyboard").style.display=""};b.onblur=function(){Db("ipadKeyboard").style.display="none"}}document.body.appendChild(b);a&&document.body.appendChild(c)}else if(pui.ff!=null){pui.Jy();pui.pa=true;pui.xf=true}}};
|
|
773
774
|
pui.dp=[{description:"iPhone 6/7/8",width:375,height:667},{description:"iPhone X/XS/11",width:375,height:812},{description:"iPhone XS Max/11 Pro Max",width:414,height:896},{description:"iPad Mini",width:768,height:1024},{description:"iPad Pro",width:1024,height:1366},{description:"Galaxy S8/S9",width:360,height:740},{description:"Galaxy S10",width:360,height:760},{description:"Galaxy S20",width:360,height:800},{description:"Galaxy Tablet",width:800,height:1280}];pui.dragDropInfo={};
|
|
774
|
-
pui.Iv=function(b,a){function c(C){function F(bb){bb.pointerType&&bb.stopImmediatePropagation&&bb.stopImmediatePropagation();var Ca=ad(bb),ia=$c(bb),rb=Ca-La,na=ia-V;if(na==0&&rb==0)return true;pui.Hs(v)||document.body.appendChild(v);if(y&&b.grid.Fd){var hb=Db(b.grid.Fd);hb.style.visibility="hidden";hb.style.display="none"}if(s){rb+=K;na+=
|
|
775
|
-
gb=pui.Vc(v.parentNode);Ua+=gb[0];Da+=gb[1];gb=Ua+v.offsetWidth;var $a=Da+v.offsetHeight;if(ta.vu==null||ta.wu==null){var qb=pui.Vc(ta.parentNode);ta.vu=qb[0];ta.wu=qb[1]}qb=ta.offsetLeft+ta.vu;var sb=ta.offsetTop+ta.wu,mb=qb+ta.offsetWidth,Mb=sb+ta.offsetHeight;if(ta.parentNode.getAttribute("container")=="true"){var ab=mb-ta.offsetWidth+ta.parentNode.offsetWidth-ta.offsetLeft;if(ab<mb)mb=ab}ab=false;if(ta.He!=null){var
|
|
776
|
-
ia<
|
|
775
|
+
pui.Iv=function(b,a){function c(C){function F(bb){bb.pointerType&&bb.stopImmediatePropagation&&bb.stopImmediatePropagation();var Ca=ad(bb),ia=$c(bb),rb=Ca-La,na=ia-V;if(na==0&&rb==0)return true;pui.Hs(v)||document.body.appendChild(v);if(y&&b.grid.Fd){var hb=Db(b.grid.Fd);hb.style.visibility="hidden";hb.style.display="none"}if(s){rb+=K;na+=E}v.style.top=ua+rb+"px";v.style.left=ra+na+"px";S&&bb.preventDefault();rb=Ga;na=false;for(hb=0;hb<da.length;hb++){var ta=da[hb],Ua=v.offsetLeft,Da=v.offsetTop,
|
|
776
|
+
gb=pui.Vc(v.parentNode);Ua+=gb[0];Da+=gb[1];gb=Ua+v.offsetWidth;var $a=Da+v.offsetHeight;if(ta.vu==null||ta.wu==null){var qb=pui.Vc(ta.parentNode);ta.vu=qb[0];ta.wu=qb[1]}qb=ta.offsetLeft+ta.vu;var sb=ta.offsetTop+ta.wu,mb=qb+ta.offsetWidth,Mb=sb+ta.offsetHeight;if(ta.parentNode.getAttribute("container")=="true"){var ab=mb-ta.offsetWidth+ta.parentNode.offsetWidth-ta.offsetLeft;if(ab<mb)mb=ab}ab=false;if(ta.He!=null){var ub=pui.Vc(ta.He.c),tb=ub[1]+ta.He.c.offsetHeight;if(ia>ub[0]+ta.He.c.offsetWidth||
|
|
777
|
+
ia<ub[0]||Ca>tb||Ca<ub[1])ab=true}if(na||qb>gb||mb<Ua||sb>$a||Mb<Da||ab)if(ta.He!=null)pui.da(ta,"grid-drop-target");else{if(ta.tagName=="IMG")if(ta.ef!=null)ta.style.backgroundColor=ta.ef;if(ta.qi!=null)ta.style.borderColor=ta.qi}else{if(ta.He!=null)pui.Q(ta,"grid-drop-target");else{if(ta.qi==null)ta.qi=ta.style.borderColor;if(ta.qi==null)ta.qi="";ta.style.borderColor="#9999ff";if(ta.tagName=="IMG"){if(ta.ef==null)ta.ef=ta.style.backgroundColor;if(ta.ef==null)ta.ef="";ta.style.backgroundColor="#D8F0FD"}}na=
|
|
777
778
|
true;Ga=ta}}na||(Ga=null);if(rb!=Ga){clearTimeout(r);if(rb!=null){pui.dragDropInfo={};pui.dragDropInfo["dd element"]=b;pui.dragDropInfo["dd element id"]=b.id;if(n!=null)pui.dragDropInfo["dd record number"]=n;pui.dragDropInfo.proxy=v;pui.dragDropInfo.event=bb;o=g(rb);pui.dragDropInfo["target element"]=o.dom;pui.dragDropInfo["target element id"]=o.id;if(o.Ba!=null)pui.dragDropInfo["target record number"]=o.Ba;pui.dragDropInfo.text=n!=null?"ondragleave: Dragging row "+n+" of grid "+b.id:"ondragleave: Dragging element "+
|
|
778
779
|
b.id;pui.dragDropInfo.text+=o.Ba!=null?" off of row "+o.Ba+" of grid "+o.id:" off of element "+o.id;l("ondragleave")}if(Ga!=null){pui.dragDropInfo={};pui.dragDropInfo["dd element"]=b;pui.dragDropInfo["dd element id"]=b.id;if(n!=null)pui.dragDropInfo["dd record number"]=n;pui.dragDropInfo.proxy=v;pui.dragDropInfo.event=bb;o=g(Ga);pui.dragDropInfo["target element"]=o.dom;pui.dragDropInfo["target element id"]=o.id;if(o.Ba!=null)pui.dragDropInfo["target record number"]=o.Ba;pui.dragDropInfo.text=n!=null?
|
|
779
|
-
"ondragenter: Dragging row "+n+" of grid "+b.id:"ondragenter: Dragging element "+b.id;pui.dragDropInfo.text+=o.Ba==0?" before row "+(o.Ba+1)+" of grid "+o.id:o.Ba!=null?" after row "+o.Ba+" of grid "+o.id:" over element "+o.id;l("ondragenter");if(e()||f())if(t>=0){clearTimeout(r);r=setTimeout(h,t)}}}S||
|
|
780
|
+
"ondragenter: Dragging row "+n+" of grid "+b.id:"ondragenter: Dragging element "+b.id;pui.dragDropInfo.text+=o.Ba==0?" before row "+(o.Ba+1)+" of grid "+o.id:o.Ba!=null?" after row "+o.Ba+" of grid "+o.id:" over element "+o.id;l("ondragenter");if(e()||f())if(t>=0){clearTimeout(r);r=setTimeout(h,t)}}}S||xb(bb)}function G(){clearTimeout(r);if(s){pui.Hs(v)&&v.parentNode.removeChild(v);v=null}if(S){bc(document,"touchmove",F);bc(document,"touchend",G)}else{bc(document,"mousemove",F);bc(document,"mouseup",
|
|
780
781
|
G)}document.onselectstart=Fa;if(Ga!=null){pui.dragDropInfo={};pui.dragDropInfo["dd element"]=b;pui.dragDropInfo["dd element id"]=b.id;if(n!=null)pui.dragDropInfo["dd record number"]=n;pui.dragDropInfo.proxy=v;pui.dragDropInfo.event=C;o=g(Ga);pui.dragDropInfo["target element"]=o.dom;pui.dragDropInfo["target element id"]=o.id;if(o.Ba!=null)pui.dragDropInfo["target record number"]=o.Ba;pui.dragDropInfo.text=n!=null?"ondrop: Dropped row "+n+" of grid "+b.id:"ondrop: Dropped element "+b.id;pui.dragDropInfo.text+=
|
|
781
782
|
o.Ba==0?" before row "+(o.Ba+1)+" of grid "+o.id:o.Ba!=null?" after row "+o.Ba+" of grid "+o.id:" into element "+o.id;if(Ga.He!=null)pui.da(Ga,"grid-drop-target");else{if(Ga.tagName=="IMG")Ga.style.backgroundColor=Ga.ef;if(Ga.ef!=null)Ga.style.borderColor=Ga.ef}if(!(o.dom.id==b.id&&n!=null&&o.Ba!=null&&(n==o.Ba||n==o.Ba+1))){pui.dragDropInfo.cancel=false;l("ondrop");if(pui.dragDropInfo.cancel!=true)if(pui.lb.Wn!=null||pui.lb.Xn||pui.lb.dq!=null||pui.lb.eq){pui.lb.bc=true;pui.G=pui.Vn;pui.bc();pui.G=
|
|
782
|
-
"false";pui.Ka=null;pui.Nc=null;pui.Mc=null}}}if(!s&&pui.lb.bc!=true){b.style.left=ra+"px";b.style.top=ua+"px"}if(y)b.grid.io=false;n=o=null}C.pointerType&&C.stopImmediatePropagation&&C.stopImmediatePropagation();var B=
|
|
783
|
-
b.grid.X;
|
|
784
|
-
for(B=0;B<
|
|
783
|
+
"false";pui.Ka=null;pui.Nc=null;pui.Mc=null}}}if(!s&&pui.lb.bc!=true){b.style.left=ra+"px";b.style.top=ua+"px"}if(y)b.grid.io=false;n=o=null}C.pointerType&&C.stopImmediatePropagation&&C.stopImmediatePropagation();var B=wb(C),D=pui.Vc(b.parentNode),E=D[0],K=D[1],S=false;if(C)if(C.touches!=null){if(C.touches.length!=1)return;S=true}else if(C.pointerType==="touch")S=true;S&&C.preventDefault();var P;n=null;if(A)if(B.tagName=="TEXTAREA"||B.tagName=="INPUT")return;if(y){var O=b.grid.dataArray;if(b.grid.isFiltered())O=
|
|
784
|
+
b.grid.X;D=b.grid.cells.length-1;if(!b.grid.ea()){P=O.length-b.grid.j+1;if(D>P)D=P}P=0;if(b.grid.h)P=1;B=wb(C);if(B.tagName=="A"||B.tagName=="IMG"||B.tagName=="INPUT"||B.tagName=="SELECT"||B.tagName=="TEXTAREA")return;for(;B!=null&&(B.row==null||B.col==null);)B=B.parentNode;if(B!=null&&B.row>=P)P=B.row;else return;if(P>D)return;n=P+b.grid.j;if(b.grid.h)n-=1;if(O.length>0&&O[n-1]!==null&&O[n-1].length!=0&&O[n-1].o!=null)n=O[n-1].o;b.grid.io=true}D=a["drop targets"];var da=[];if(D!=null&&D!=""){D=D.split(",");
|
|
785
|
+
for(B=0;B<D.length;B++){var T=Db(D[B]);if(T!=null)if(T.grid!=null){var L=T.grid.k,Z=L.length-1;if(!T.grid.ea()){O=T.grid.dataArray;if(T.grid.isFiltered())O=T.grid.X;var N=O.length-T.grid.j+2;if(Z>N)Z=N}T=N=T.grid.h?1:0;if(O.length==0)Z=N-1;for(N=N;N<L.length;N++){if(N<=Z)T=L[N].$r=N;else L[N].$r=T;da.push(L[N])}}else da.push(T)}}var v=b;if(s){if(y){O=b.grid.cells[P];P=O[0];v=document.createElement("div");v.style.position="absolute";v.style.left=b.style.left;v.style.top=parseInt(b.style.top)+parseInt(P.style.top)+
|
|
785
786
|
"px";B=parseInt(b.style.width);B-=2;if(a.scrollbar!="none")B-=16;if(B<5)B=5;v.style.width=B+"px";P=parseInt(P.style.height);P-=2;if(P<5)P=5;v.style.height=P+"px";for(B=0;B<O.length;B++){P=O[B].cloneNode(true);P.style.top="0px";P.onclick=null;P.onmousedown=null;P.onmouseup=null;v.appendChild(P)}}else v=b.cloneNode(true);v.style.zIndex=701;if(!pui.pa)v.style.cursor="move";v.style.opacity=0.6;v.style.filter="alpha(opacity=60)";v.style.border="1px solid #333333"}if(v.style.top.indexOf("calc")!==-1)v.style.top=
|
|
786
787
|
window.getComputedStyle(b,null).getPropertyValue("top");if(v.style.left.indexOf("calc")!==-1)v.style.left=window.getComputedStyle(b,null).getPropertyValue("left");var V=$c(C),La=ad(C),ra=parseInt(v.style.left),ua=parseInt(v.style.top),Ga=null,Fa=document.onselectstart;pui.dragDropInfo={};pui.dragDropInfo["dd element"]=b;pui.dragDropInfo["dd element id"]=b.id;if(n!=null)pui.dragDropInfo["dd record number"]=n;pui.dragDropInfo.proxy=v;pui.dragDropInfo.event=C;pui.dragDropInfo.text=n!=null?"ondragstart: Dragging row "+
|
|
787
788
|
n+" of grid "+b.id:"ondragstart: Dragging element "+b.id;l("ondragstart");if(S){U(document,"touchmove",F);U(document,"touchend",G)}else{U(document,"mousemove",F);U(document,"mouseup",G)}document.onselectstart=pa(false)}function e(){if(o.row==null)return false;if(o.grid.Gb())return false;if(o.row==0)return true;if(o.row==1&&o.grid.h)return true;return false}function f(){if(o.row==null)return false;if(o.grid.Tb())return false;if(o.row==o.grid.cells.length)return true;return false}function h(){var C=
|
|
788
789
|
false;if(e()){o.grid.j-=1;o.Ba-=1;C=true}else if(f()){o.grid.j+=1;o.Ba+=1;C=true}if(C){o.grid.Cc?o.grid.d.td(o.grid.j):o.grid.getData();pui.dragDropInfo.text=n!=null?"ondragleave: Dragging row "+n+" of grid "+b.id:"ondragleave: Dragging element "+b.id;pui.dragDropInfo.text+=" off of row "+pui.dragDropInfo["target record number"]+" of grid "+o.id;l("ondragleave");pui.dragDropInfo["target record number"]=o.Ba;pui.dragDropInfo.text=n!=null?"ondragenter: Dragging row "+n+" of grid "+b.id:"ondragenter: Dragging element "+
|
|
789
|
-
b.id;pui.dragDropInfo.text+=o.Ba==0?" before row "+(o.Ba+1)+" of grid "+o.id:" after row "+o.Ba+" of grid "+o.id;l("ondragenter");clearTimeout(r);r=setTimeout(h,p+35)}}function g(C){var F=C.He;if(F==null)return{dom:C,id:C.id};else{C=C.$r;var G=F.j-1+C-(F.h?1:0),B=G>0?G:0,
|
|
790
|
-
null&&F!="")try{if(eval(F)==false)return false}catch(G){pui.Ca(G,C+" Error:\n");return false}}var o,n,r=0,p=350,t=p;if(typeof pui["drop scroll wait"]=="number")t=pui["drop scroll wait"];b.onselectstart=function(C){if(y||A){C=
|
|
790
|
+
b.id;pui.dragDropInfo.text+=o.Ba==0?" before row "+(o.Ba+1)+" of grid "+o.id:" after row "+o.Ba+" of grid "+o.id;l("ondragenter");clearTimeout(r);r=setTimeout(h,p+35)}}function g(C){var F=C.He;if(F==null)return{dom:C,id:C.id};else{C=C.$r;var G=F.j-1+C-(F.h?1:0),B=G>0?G:0,D=F.isFiltered()?F.X:F.dataArray;if(G>0&&D.length>0&&D[0]&&D[0].o!=null)B=G<D.length?D[G-1].o:D[D.length-1].o;return{dom:F.c,grid:F,id:F.c.id,row:C,Ba:B}}}function l(C){var F=a[C];if(pui.Zb(F)){pui.G=pui.Vn;pui.runLogic(F.routine)}else if(F!=
|
|
791
|
+
null&&F!="")try{if(eval(F)==false)return false}catch(G){pui.Ca(G,C+" Error:\n");return false}}var o,n,r=0,p=350,t=p;if(typeof pui["drop scroll wait"]=="number")t=pui["drop scroll wait"];b.onselectstart=function(C){if(y||A){C=wb(C);if(C.tagName=="TEXTAREA"||C.tagName=="INPUT")return true}return false};if(typeof b.style.MozUserSelect!="undefined")b.style.MozUserSelect="none";var s=a["use proxy"]=="true",y=b.grid!=null,A=a["field type"]=="html container";if(y){s=true;setTimeout(function(){var C=b.grid.cells.length-
|
|
791
792
|
1;if(!b.grid.ea()){var F=b.grid.dataArray;if(b.grid.isFiltered())F=b.grid.X;F=F.length-b.grid.j+1;if(C>F)C=F}if((a.cursor==null||a.cursor=="")&&!pui.pa)for(F=b.grid.h?1:0;F<=C;F++)for(var G=b.grid.cells[F],B=0;B<G.length;B++)G[B].style.cursor="move"},1)}if(window.PointerEvent)U(b,"pointerdown",c);else{U(b,"mousedown",c);U(b,"touchstart",c)}};pui.errorScreen={};
|
|
792
793
|
pui.errorScreen.onload=function(){function b(){h=new XMLHttpRequest;h.addEventListener("error",c);h.addEventListener("load",a);h.open("POST",Xb("PUI0009118.pgm"),true);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send("jobinfo="+f)}function a(){if(typeof h.response==="string"&&h.response.length>0)if(h.getResponseHeader("Content-Disposition")==="attachment"){sessionStorage.setItem("joblog",h.response);applyProperty("JobLogDownload","visibility","visible")}else console.log(pui.getLanguageText("runtimeMsg","failed to load x",
|
|
793
794
|
["Job Log"])+"<br>"+h.response);else console.log("Job log download error: Empty Response")}function c(g){console.log("Job log download error:",g)}var e=pui.errorScreen.getConfig();pui.errorScreen.getStack()&&e.type!=="production"&&applyProperty("ErrorStackDownload","visibility","visible");if(window.puiMobileClient==null&&window.device!=null&&window.device.platform=="iOS"||pui.F!=null){applyProperty("btnBack","visibility","hidden");applyProperty("btnBack","field type","graphics button")}var f;if(pui.F!=
|
|
@@ -893,12 +894,12 @@ pui.BasicWidget.prototype.destroy=function(){if(this.dom!=null){this.dom.innerHT
|
|
|
893
894
|
function wd(b,a,c,e){b.Um[a]=c;b.Tm[e]=a}function zd(b,a){var c=b.Tm[a];if(c)return b.Um[c]}pui.BasicWidget.prototype.getPropertyValue=function(b){var a;if(b!=null){var c=this.Um[b];try{a=this.getValue(b);if(typeof a==="number"||typeof a==="boolean")a=String(a);else if(a instanceof Date)a=c!=null&&typeof c.dateFormat==="string"?isNaN(a.getYear())?"":a.format(c.dateFormat):a.toISOString();else if(a==null)a=""}catch(e){console.log(e)}}return a};
|
|
894
895
|
pui.BasicWidget.prototype.evalProperty=function(b){return ac(this.Vq[b],this.$m[b],this.dom)};pui.BasicWidget.prototype.getValue=function(b){return this.evalProperty(b)};pui.BasicWidget.prototype.Nv=function(b){var a=b.propertyName;this.design=b.design;this.Vq=b.properties;this.$m[b.propertyName]=b.originalValue;if(!this.design)if(this.evalProperty(a)!==b.value&&vd(this,a))this.dom.modified=true};
|
|
895
896
|
pui.BasicWidget.prototype.handleEvent=function(b){switch(b.type){case "input":case "change":this.dom.modified=true;break}};function Ad(b){this.onready=this.onfail=this.onsuccess=this.cacheBuster=this.suppressAlert=this.password=this.user=this.async=this.url=this.reqData=this.postData=this.method=null;this.headers={};this.params=null;this.sendAsBinary=true;var a=this.overrideMimeType=null,c=null,e=null,f=null,h=typeof pui!="undefined"&&typeof pui.alert!="undefined"?pui.alert:alert,g=this;if(typeof b=="object")for(var l in b){if(typeof this[l]!="undefined")this[l]=b[l]}else this.url=b;if(window.XMLHttpRequest)a=new XMLHttpRequest;
|
|
896
|
-
else if(window.ActiveXObject)a=new ActiveXObject("Microsoft.XMLHTTP");else{h("Ajax request error: Unsupported browser.");return}this.send=this.send=function(){function o(){if(a.readyState==4){c=a.status===0?
|
|
897
|
+
else if(window.ActiveXObject)a=new ActiveXObject("Microsoft.XMLHTTP");else{h("Ajax request error: Unsupported browser.");return}this.send=this.send=function(){function o(){if(a.readyState==4){c=a.status===0?E?"Request aborted.":"Request failed. Check the browser console for more details.":a.status+" - "+a.statusText;g.onready!=null&&g.onready(g);if(a.status==200){e=true;g.onsuccess!=null&&g.onsuccess(g)}else{e=false;g.suppressAlert!=true&&h(c);g.onfail!=null&&g.onfail(g)}f=false}}var n=null,r=null,
|
|
897
898
|
p=null;if(g.method==null)n="GET";else if(typeof g.method!="string"&&(g.method.toUpperCase()!="GET"||g.method.toUpperCase()!="POST"||g.method.toUpperCase()!="PUT"||g.method.toUpperCase()!="DELETE")){h('Invalid value for property: "method".');return}else n=g.method.toUpperCase();if(n=="POST"||n=="PUT"||n=="DELETE"){if(g.reqData!=null)p=g.reqData;else if(g.postData!=null)p=g.postData;if(p!=null){if(typeof p!="string"){h('Invalid value for property: "postData".');return}}else p=""}if(g.async==null)r=
|
|
898
899
|
true;else if(g.async!=true&&g.async!=false){h('Invalid value for property: "async".');return}else r=g.async;if(typeof g.url!="string")h('Invalid value for property: "url".');else{if(g.user!=null)if(typeof g.user!="string"){h('Invalid value for property: "user".');return}if(g.password!=null)if(typeof g.password!="string"){h('Invalid value for property: "password".');return}if(g.onsuccess!=null)if(typeof g.onsuccess!="function"){h('Invalid value for event: "onsuccess".');return}if(g.onfail!=null)if(typeof g.onfail!=
|
|
899
900
|
"function"){h('Invalid value for event: "onfail".');return}if(g.onready!=null)if(typeof g.onready!="function"){h('Invalid value for event: "onready".');return}var t=true;if(p!=null)for(var s in g.headers)if(s.toUpperCase()=="CONTENT-TYPE")if(g.headers[s].toLowerCase().indexOf("www-form-urlencoded")==-1)t=false;var y=g.url,A=g.params;if(typeof A=="object"){var C="";for(s in A){var F=A[s],G=[];if(typeof F=="object"){if(F.length!=null&&F.length>0)G=F}else G.push(F);for(F=0;F<G.length;F++){if(C!="")C+=
|
|
900
901
|
"&";C+=encodeURIComponent(s)+"="+encodeURIComponent(G[F])}}if(C!="")if(t&&(n=="POST"||n=="PUT"||n=="DELETE")){if(p!=null&&p!="")p+="&";else p="";p+=C}else{t=y.split("?");if(t.length==2&&t[1]!="")y=t[0]+"?"+t[1]+"&"+C;else y+="?"+C}}if(n==="GET"&&(g.cacheBuster===null||g.cacheBuster===true))y=pui.addUrlCacheBuster(y);try{typeof g.user=="string"&&typeof g.password=="string"?a.open(n,y,r,g.user,g.password):a.open(n,y,r);y=false;var B=g.headers;for(s in B){a.setRequestHeader(s,B[s]);if(s.toUpperCase()==
|
|
901
|
-
"CONTENT-TYPE")y=true}if(n=="POST"||n=="PUT"||n=="DELETE")y||a.setRequestHeader("Content-type","application/x-www-form-urlencoded");typeof g.overrideMimeType=="string"&&typeof a.overrideMimeType=="function"&&a.overrideMimeType(g.overrideMimeType)}catch(
|
|
902
|
+
"CONTENT-TYPE")y=true}if(n=="POST"||n=="PUT"||n=="DELETE")y||a.setRequestHeader("Content-type","application/x-www-form-urlencoded");typeof g.overrideMimeType=="string"&&typeof a.overrideMimeType=="function"&&a.overrideMimeType(g.overrideMimeType)}catch(D){h(D);return}f=true;var E=false;if(r==true){a.onload=o;a.onerror=o;a.onabort=function(){E=true;o()}}if(g.sendAsBinary==true)try{a.sendAsBinary(p)}catch(K){a.send(p)}else a.send(p);r!=true&&o()}};this.ok=this.ot=function(){return e!=null?e:false};
|
|
902
903
|
this.getResponseText=this.yc=function(){return a.responseText};this.getResponseXML=this.vs=function(){return a.responseXML};this.getStatus=this.uf=function(){return a.status};this.getStatusText=this.As=function(){return a.statusText};this.getStatusMessage=this.Ni=function(){return c};this.getAllResponseHeaders=this.getAllResponseHeaders=function(){if(e)try{return a.getAllResponseHeaders()}catch(o){h(o)}};this.getResponseHeader=this.getResponseHeader=function(o){if(e)try{return a.getResponseHeader(o)}catch(n){h(n)}};
|
|
903
904
|
this.setRequestHeader=this.setRequestHeader=function(o,n){g.headers[o]=n};this.abort=this.abort=function(){if(f===true)try{a.abort()}catch(o){h(o)}}}
|
|
904
905
|
function Yb(b,a){var c,e,f,h="";if(arguments.length==1&&typeof arguments[0]=="object"){c=arguments[0];c.async=null;c.onsuccess=null;if(typeof c.handler=="function"){e=true;f=c.handler}else e=false}else if(a!=null&&typeof a=="function"){e=true;f=a}else e=false;c=new Ad(arguments[0]);c.async=e;c.onsuccess=function(g){h+=g.yc();e==true&&f(h)};c.send();if(e==false)return h}
|
|
@@ -930,7 +931,7 @@ a=pui.ld(b.properties);if(a!="")l+="&"+a}else l+="&q="+pui.xb.lf(s);l+="&maxcoun
|
|
|
930
931
|
44)+" "+n+C.substr(44);pui.widgets.Mf({dom:b.dom,ih:h,type:e,transparent:b.properties["chart overlay"]!="true",Se:C});C=b.evalProperty("ondbload");if(typeof C!="string"||C=="")C=null;if(C){var G=true;F||(G=false);pui.mf(C,G,b.dom.id)}}};y.send()}}else if(g!="")if(pui["legacy chart data url"]==true){g=g.replace(/&/g,"%26");pui.widgets.Mf({dom:b.dom,ih:h,type:e,transparent:b.properties["chart overlay"]!="true",sq:g})}else Yb({url:g,method:"get",async:true,handler:function(C){pui.widgets.Mf({dom:b.dom,
|
|
931
932
|
ih:h,type:e,transparent:b.properties["chart overlay"]!="true",Se:C})}});else if(l!="")Yb({url:l,method:"get",async:true,handler:function(C){pui.widgets.Mf({dom:b.dom,ih:h,type:e,transparent:b.properties["chart overlay"]!="true",jsonData:C})}});else if(o!=""){l="AUTH="+(pui.ba?pui.ba:pui.appJob.auth);if(typeof pui.vId!=="undefined")l+="&VID="+pui.vId;if(pui.secLevel>0){l+="&q="+encodeURIComponent(pui.Wc(b.dom));a=pui.ld(b.properties);if(a!="")l+="&"+a}else{s=o;if(a!="")s+=" ORDER BY "+a;l+="&q="+pui.xb.lf(s)}l+=
|
|
932
933
|
"&limit="+c;if(pui["read db driven data as ebcdic"]!==true)l+="&UTF8=Y";if(pui.isCloud)l+="&workspace_id="+pui.cloud.ws.id;var A=new pui.Ajax(Xb("PUI0009102.PGM"));A.method="post";A.async=true;A.postData=l;A.suppressAlert=true;A.onsuccess=function(){var C=pui.widgets.ls(n),F=Kb(A,"Custom SQL query");if(!F||F.results==null){C=Ya.pop();if(C!=null&&typeof C=="object")if(F=Db(h))F.innerHTML='<ul style="overflow-y:auto; white-space:normal"><li>Chart operation: '+C.Dl+"<li>Id: "+C.id+"<li>Message: "+C.text+
|
|
933
|
-
"<li>"+C.tm+"</ul>";else console.log(C)}else{for(var G=f?"id":"label",B=0,
|
|
934
|
+
"<li>"+C.tm+"</ul>";else console.log(C)}else{for(var G=f?"id":"label",B=0,D=F.results.length;B<D;B++){var E=Object.keys(F.results[B]).length,K="",S="",P=0;for(var O in F.results[B]){P++;var da=F.results[B][O];if(P<E)K+=" "+da;else S=da}C+="<set "+G+'="'+pui.Wh(Lb(K))+'" value="'+pui.Wh(Lb(S))+'" />'}C+="</chart>";pui.widgets.Mf({dom:b.dom,ih:h,type:e,transparent:b.properties["chart overlay"]!="true",Se:C})}};A.send()}}}}},width:function(b){b.dom.width=b.value;var a=typeof b.properties["map type"]!=
|
|
934
935
|
"undefined";b.design&&pui.widgets.Jj(b.dom,b.properties["chart type"],a)},height:function(b){b.dom.height=b.value;var a=typeof b.properties["map type"]!="undefined";b.design&&pui.widgets.Jj(b.dom,b.properties["chart type"],a)},"chart type":function(b){b.design&&pui.widgets.Jj(b.dom,b.value)},"map type":function(b){b.design&&pui.widgets.Jj(b.dom,b.value,true)},visibility:function(b){if(b.dom.chart)b.dom.chart.style.display=b.value=="hidden"?"none":"inline-block"},onchartclick:function(b){if(pui.Zb(b.newValue))b.dom.Ka=
|
|
935
936
|
b.newValue.routine}}});pui.Hr=function(b){var a=b.target;if(!a.readOnly){var c=a.pui.properties["indeterminate value"]!==undefined;if(a.checked===true)if(a.unchecked!==true||!c){a.unchecked=false;a.indeterminate=false}else{a.checked=false;a.unchecked=false;a.indeterminate=true}else{a.indeterminate=false;a.unchecked=true}}if(a.readOnly){b.preventDefault();return false}};
|
|
936
937
|
pui.widgets.add({name:"checkbox",tag:"input",inputType:"checkbox",Xo:"label",resizable:false,defaults:{label:"Checkbox"},propertySetters:{"field type":function(b){var a=b.evalProperty("value"),c=b.evalProperty("checked value")!==""?b.evalProperty("checked value"):"1";b.dom.checkedValue=c;var e=b.evalProperty("unchecked value");b.dom.uncheckedValue=e;var f=b.properties["indeterminate value"]===undefined?null:b.evalProperty("indeterminate value");if(f==="")f="2";b.dom.indeterminateValue=f;if(!pui.is_quirksmode)if(!pui.is_old_ie)b.dom.style.margin=
|
|
@@ -951,8 +952,8 @@ e.className="combo-option";e.addEventListener("click",this);e.addEventListener("
|
|
|
951
952
|
"above")b.style.top=a-this.u.offsetHeight-b.offsetHeight+"px";else if(this["select box placement"]!=="below"){c=pui.Cs();if(a-c+b.offsetHeight>pui.getWindowSize().height){e=a-b.offsetHeight-this.K.offsetHeight-3;if(e-c>=0)a=e}b.style.top=a+"px"}document.addEventListener("click",this);document.addEventListener("scroll",this,true)};
|
|
952
953
|
pui.Te.prototype.hideChoices=function(){if(this.ic!=null&&this.ic.className.split(" ")[0]=="open")this.ic.className="combo-arrow "+this.K.className.split(" ")[1]+"-combo-arrow";this.vb.innerHTML="";this.vb.style.display="none";Cd(this)};function Cd(b){document.removeEventListener("scroll",b,true);document.removeEventListener("click",b)}
|
|
953
954
|
pui.Te.prototype.handleEvent=function(b){var a=b.target;switch(b.type){case "click":if(a&&a.parentNode==this.vb){if(!this.K.readOnly&&!this.design){this.K.value=a.bh;this.K.modified=true;this.u.modified=true;pui.Re(this.u);if(this.formatName!=null&&pui.jf!=null)pui.jf[this.formatName]=true;if(R=="genie"&&this.K.B!=null&&this.K.B.idx!=null)pui.response[this.K.B.idx]=this.K;var c=this.K.H;if(c!=null){c.hide();c.ja=true;pui.da(this.K,c.qg())}pui.le(this.K)}this.hideChoices();if(!pui.is_touch||pui.is_mouse_capable)this.K.focus();
|
|
954
|
-
this.u.bu!=null&&!this.K.readOnly&&!this.design&&this.u.bu(this.K.value,a.aw,this.u);
|
|
955
|
-
""}break;case "mousedown":
|
|
955
|
+
this.u.bu!=null&&!this.K.readOnly&&!this.design&&this.u.bu(this.K.value,a.aw,this.u);xb(b)}else a!=this.ic&&this.hideChoices();break;case "keyup":b=b.keyCode;if(this.vb.style.display==="none"||this.K.readOnly||this.K.disabled)return;if(b==8||b>=46&&b<=90||b>=96&&b<=111||b>=186&&b<=222||b===32){b=this.K.value.toLowerCase();a=this.vb.getElementsByClassName("combo-option");for(var e=0,f=a.length;e<f&&(c=a[e]);e++)if(b){var h=Oc(c).trim().toLowerCase();c.style.display=h.indexOf(b)>=0?"":"none"}else c.style.display=
|
|
956
|
+
""}break;case "mousedown":xb(b);break;case "mouseup":this.vb.style.display=="none"&&!this.K.disabled?this.showChoices():this.hideChoices();xb(b);break;case "mouseover":a.classList.add("combo-option-select");break;case "mouseout":a.classList.remove("combo-option-select");break;case "scroll":a!=this.vb&&this.hideChoices();break}};pui.Te.prototype.destroy=function(){Cd(this);$b(this)};
|
|
956
957
|
pui.Te.prototype.setProperty=function(b){switch(b.propertyName){case "color":case "font family":case "font size":case "font style":case "font variant":case "font weight":case "letter spacing":case "text align":case "text decoration":case "text transform":case "word spacing":case "background color":var a=b.propertyName;b=b.value;var c=a.split(" ");if(c.length==2)c[1]=c[1].substr(0,1).toUpperCase()+c[1].substr(1);c=c.join("");if(a=="text transform"&&b=="uppercase")this.K.value=pui.Ie(this.K.value,false);
|
|
957
958
|
this.K.style[c]=b;if(pui["add combo style properties to choice list"])this.vb.style[c]=b;break;case "select box placement":if(!b.design)this["select box placement"]=b.value;break}};
|
|
958
959
|
pui.widgets.add({name:"combo box",defaults:{width:"80px","css class":"input","font family":"Trebuchet MS"},propertySetters:{"field type":function(b){if(b.dom.comboBoxWidget==null)b.dom.comboBoxWidget=new pui.Te;b.dom.comboBoxWidget.u=b.dom;b.dom.comboBoxWidget.design=b.design;b.dom.comboBoxWidget.za=b.za;for(var a="",c="";typeof b.properties["css class"+a]=="string";){if(c!="")c+=" ";c+=b.properties["css class"+a];a=a==""?" 2":" "+(parseInt(a,10)+1)}if(c===""&&b.dom.B){a=b.dom.B.attr;c+=" A"+a;if(b.dom.B.bypass)c+=
|
|
@@ -1000,14 +1001,14 @@ value:function(b){b.dom.panel.setText(b.value)},"straight edge":function(b){b.do
|
|
|
1000
1001
|
function Fd(b,a,c){var e,f,h,g=0,l,o="false";if(b.yp!=null&&b.yp==="true")o=b.yp;if(pui.locale&&pui.locales[pui.locale])h=pui.locale;else{if(R=="dspf"&&b.N)h=b.N.locale;else if(R=="genie")h=pui.F.config.locale;if(h=="")h=null}if(h){e=pui.locales[h].monthNames;dayNames=pui.locales[h].shortDayNames;if(o=="true"&&pui.locales[h].weekNumberShort)l=pui.locales[h].weekNumberShort;else if(o=="true")l="Wk";f=[];if(pui.locales[h].weekStart)g=pui.locales[h].weekStart;for(var n=0;n<dayNames.length;n++)f.push(dayNames[n])}else{e=
|
|
1001
1002
|
["January","February","March","April","May","June","July","August","September","October","November","December"];f=["Su","Mo","Tu","We","Th","Fr","Sa"];if(o=="true")l="Wk"}pui.currentDateField=b;n=a==null||a==""?new Date:Gd(a);if(n==null)n=new Date;a=n.getMonth();var r=new Date(n);for(r.setMonth(a-1);r.getMonth()==a;)r.setDate(r.getDate()-1);var p=new Date(n);p.setMonth(a+1);a=a+1;if(a==12)a=0;for(;p.getMonth()!=a;)p.setDate(p.getDate()-1);var t=new Date(n);t.setFullYear(n.getFullYear()-1);var s=new Date(n);
|
|
1002
1003
|
s.setFullYear(n.getFullYear()+1);var y=new Date(n);y.setDate(1);y.setDate(1-(7+y.getDay()-g)%7);(new Date(p)).setDate(0);var A=new Date;a=document.createElement("table");a.className="pui-calendar-outer-table";var C=document.createElement("tbody");a.appendChild(C);var F=document.createElement("tr");C.appendChild(F);C=document.createElement("td");C.className="brndrow1";F.appendChild(C);var G=document.createElement("table");G.className="pui-calendar-inner-table";C.appendChild(G);F=document.createElement("tbody");
|
|
1003
|
-
G.appendChild(F);C=document.createElement("tr");F.appendChild(C);G=document.createElement("td");G.className="brndrow1";G.colSpan="1";var B=document.createElement("span");B.setAttribute("arrow","1");B.className="pui-calendar-arrow-prev-year";var
|
|
1004
|
-
"pui-calendar-arrow-prev-month";var
|
|
1005
|
-
"1");r.className="pui-calendar-arrow-next-month";var K=Hd(p);r.onclick=function(O){Fd(pui.currentDateField,K+document.cal.time.value,c);
|
|
1004
|
+
G.appendChild(F);C=document.createElement("tr");F.appendChild(C);G=document.createElement("td");G.className="brndrow1";G.colSpan="1";var B=document.createElement("span");B.setAttribute("arrow","1");B.className="pui-calendar-arrow-prev-year";var D=Hd(t);B.onclick=function(O){Fd(pui.currentDateField,D+document.cal.time.value,c);xb(O)};G.appendChild(B);C.appendChild(G);t=document.createElement("td");t.className="brndrow1";t.colSpan="1";G=document.createElement("span");G.setAttribute("arrow","1");G.className=
|
|
1005
|
+
"pui-calendar-arrow-prev-month";var E=Hd(r);G.onclick=function(O){Fd(pui.currentDateField,E+document.cal.time.value,c);xb(O)};t.appendChild(G);C.appendChild(t);r=document.createElement("td");r.className="calendar brndrow1 pui-calendar-month-year-header";r.colSpan="3";if(o=="true")r.colSpan="4";r.innerHTML=e[n.getMonth()]+" "+n.getFullYear();C.appendChild(r);e=document.createElement("td");e.className="brndrow1 pui_calendar_brndrow1_right";e.colSpan="1";r=document.createElement("span");r.setAttribute("arrow",
|
|
1006
|
+
"1");r.className="pui-calendar-arrow-next-month";var K=Hd(p);r.onclick=function(O){Fd(pui.currentDateField,K+document.cal.time.value,c);xb(O)};e.appendChild(r);C.appendChild(e);e=document.createElement("td");e.className="brndrow1 pui_calendar_brndrow1_right";e.colSpan="1";p=document.createElement("span");p.setAttribute("arrow","1");p.className="pui-calendar-arrow-next-year";var S=Hd(s);p.onclick=function(O){Fd(pui.currentDateField,S+document.cal.time.value,c);xb(O)};e.appendChild(p);C.appendChild(e);
|
|
1006
1007
|
e=new Date(y);p=document.createElement("tr");if(l){s=document.createElement("td");s.className="calendar brndrow2 pui-calendar-week-number-header";s.innerHTML=l;p.appendChild(s)}for(l=0;l<7;l++){s=document.createElement("td");s.className="calendar brndrow2 pui-calendar-weekday-header";s.innerHTML=f[(g+l)%7];p.appendChild(s)}for(F.appendChild(p);e.getMonth()==n.getMonth()||e.getMonth()==y.getMonth();){var P;if(o=="true"){if(P==null)P=1;f=e;if(f.getDay()==g){P=new Date(f.getTime());P.setHours(0,0,0,
|
|
1007
1008
|
0);if(g==0)P.setDate(P.getDate()+4);else if(g==1)P.setDate(P.getDate()+3);else g==6&&P.setDate(P.getDate()+5);l=new Date(P.getFullYear(),0,4);P=1+Math.round(((P.getTime()-l.getTime())/864E5-3+(l.getDay()+6)%7)/7)}if(typeof pui["week number calculator"]=="function")P=pui["week number calculator"](f)}f=document.createElement("tr");if(o=="true"&&e.getDay()==g){l=document.createElement("td");l.className="calendar pui-calendar-week-number";l.innerHTML=P;f.appendChild(l)}for(l=0;l<7;l++){p=document.createElement("td");
|
|
1008
1009
|
s=e.getDate()==n.getDate()&&e.getMonth()==n.getMonth()?"calendar pui-calendar-selected-date":e.getDay()==0||e.getDay()==6?"calendar pui-calendar-weekend-date":"calendar pui-calendar-workday-date";if(e.getDate()==A.getDate()&&e.getMonth()==A.getMonth()&&e.getYear()==A.getYear())s+=" pui-calendar-current-date";s+=e.getMonth()==n.getMonth()?" pui-calendar-day-active-month":" pui-calendar-day-inactive-month";p.className=s;p.Tx=Id(e,c,b.N);p.onclick=function(O){pui.currentDateField.value=O.currentTarget.Tx;
|
|
1009
|
-
Jd();
|
|
1010
|
-
"auto-select"){var da=Id(A,c,b.N);pui.currentDateField.value=da;Jd()}else Fd(pui.currentDateField,"",c);
|
|
1010
|
+
Jd();xb(O)};p.innerHTML=e.getDate();f.appendChild(p);e.setDate(e.getDate()+1)}F.appendChild(f)}if(b.vj!=null&&(b.vj==="true"||b.vj==="auto-select")){g=document.createElement("tr");F.appendChild(g);P=document.createElement("td");P.className="pui-calendar-today-button-row";P.colSpan="7";if(o=="true")P.colSpan="8";g.appendChild(P);o=document.createElement("span");o.className="pui-calendar-today-button";o.innerHTML=h&&pui.locales[h].today?pui.locales[h].today:"Today";o.onclick=function(O){if(pui.currentDateField.vj===
|
|
1011
|
+
"auto-select"){var da=Id(A,c,b.N);pui.currentDateField.value=da;Jd()}else Fd(pui.currentDateField,"",c);xb(O)};P.appendChild(o)}o=document.createElement("form");o.name="cal";h=document.createElement("input");h.type="hidden";h.name="time";h.value=String(n.getHours()+":"+n.getMinutes()+":"+n.getSeconds());o.appendChild(h);h=document.getElementById("popcal");h.innerHTML="";h.className="pui-calendar";n=Lb(b.className.split(" ")[0]);if(n!="")h.className+=" pui-calendar-"+n;g=b.calimg;h.appendChild(a);
|
|
1011
1012
|
h.appendChild(o);n=pui.Vc(g);a=n[1];n=n[0];o=g.offsetHeight;f=g.offsetWidth;g=h.offsetWidth;P=h.offsetHeight;y=n+o+6;F=a-P/2;switch(b.Rv){case "above-right":y=n+f-6;F=a-P;break;case "below-right":y=n+f-6;F=a+o;break;case "above-left":y=n-g+6;F=a-P;break;case "below-left":y=n-g+6;F=a+o;break;case "left":y=n-g-5;F=a-P/2;break}a=pui.getWindowSize();if(F+P>a.height){F=a.height-P-10;y+=10}if(y+g>a.width)y=a.width-g-10;if(F<window.pageYOffset){F=window.pageYOffset+10;y+=10}if(y<window.pageXOffset)y=window.pageXOffset+
|
|
1012
1013
|
10;h.style.left=y+"px";h.style.top=F+"px";setTimeout(function(){var O=Db("popcal");if(O!=null&&O.style.visibility!=="visible")O.style.visibility="visible"},0)}function Gd(b){b=/^(\d+)\-(\d+)\-(\d+)\s+(\d+)\:(\d+)\:(\d+)$/.exec(b);if(!b)return new Date;return new Date(b[3],b[2]-1,b[1],b[4],b[5],b[6])}function Hd(b){return String(b.getDate()+"-"+(b.getMonth()+1)+"-"+b.getFullYear()+" ")}
|
|
1013
1014
|
function Id(b,a,c){var e=null;if(c!=null){var f;f=pui.locale&&pui.locales[pui.locale]?pui.locale:c.locale;e=c.dateFormat;if(e==null)e=c.customPattern;if((e==""||e==null)&&pui["default date pattern"])e=pui["default date pattern"]}if(e!=null)return b.format(e,f);if(c!=null&&c.dataLength=="8"&&c.decPos=="0"&&(a=="MM/DD/YY"||a=="DD/MM/YY"))a+="YY";if(c!=null&&c.dataLength=="6"&&c.decPos=="0"&&(a=="MM/DD/YYYY"||a=="DD/MM/YYYY"))a=a.substr(0,6);var h;c=String(b.getMonth()+1);f=String(b.getDate());e=String(b.getFullYear());
|
|
@@ -1019,7 +1020,7 @@ null||b.pui.properties.visibility=="")if(R=="genie"&&b.B!=null&&b.B.attr!=null){
|
|
|
1019
1020
|
o.edtWrd!=null){if(n=o.edtWrd!="")b:{n=g;for(r=0;r<n.length;r++){p=n.substr(r,1);if(p<"0"||p>"9"){n=false;break b}}n=true}n=n}n=n}if(n)if(o.edtWrd=="' / / '"&&g.length==6||o.edtWrd=="' / / '"&&g.length==8)g=g.substr(0,2)+"/"+g.substr(2,2)+"/"+g.substr(4);if(o!=null&&o.dataLength=="8"&&o.decPos=="0"&&(l=="MM/DD/YY"||l=="DD/MM/YY"))l+="YY";if(o!=null&&o.dataLength=="6"&&o.decPos=="0"&&(l=="MM/DD/YYYY"||l=="DD/MM/YYYY"))l=l.substr(0,6);n=null;if(o!=null){n=o.dateFormat;if(n==null)n=o.customPattern;
|
|
1020
1021
|
if((n==""||n==null)&&pui["default date pattern"])n=pui["default date pattern"];if(n!=null){locale=pui.locale&&pui.locales[pui.locale]?pui.locale:o.locale;if(o=pui.formatting.Date.parse(g,n,locale)){g=o.format("d-m-Y 00:00:00",locale);break a}}}o="";n=l.indexOf("MM");if(n>=0)o=g.substr(n,2);if(o.substr(0,1)==" ")o="0"+o.substr(1,1);n="";r=l.indexOf("DD");if(r>=0)n=g.substr(r,2);if(n.substr(0,1)==" ")n="0"+n.substr(1,1);r=r="";p=l.indexOf("YY");l=l.indexOf("YYYY");if(l>=0)r=g.substr(l,4);else if(p>=
|
|
1021
1022
|
0){r=g.substr(p,2);g=2E3;if(Number(r)>39)g=1900;r=Number(r)+g}g=n+"-"+o+"-"+r+" 00:00:00"}}h(b,g,a);if(!f)f=window.event;if(f){f.cancelBubble=true;f.returnValue=false;f.preventDefault&&f.preventDefault();f.stopPropagation&&f.stopPropagation()}return false};if(b.db!=null&&b.Va!=null){c.db=b.db;c.Va=b.Va}b.calimg=c;Dd[Ed++]=b;if(b.parentNode==null)b.calimg.kt=true;else{b.parentNode.appendChild(c);pui.tl(b);b.calimg.kt=false;if(document.getElementById("popcal")==null){U(document,"click",function(f){for(f=
|
|
1022
|
-
|
|
1023
|
+
wb(f);f!=null;){if(f.id=="popcal"||f.getAttribute!=null&&f.getAttribute("arrow")=="1")return;f=f.parentNode}Bc()});c=document.createElement("div");c.style.visibility="hidden";c.id="popcal";document.body.appendChild(c)}}}pui.tl=function(b){var a=b.calimg;if(a!=null){a.style.display="none";a.style.left=b.offsetLeft+b.offsetWidth+5+"px";var c=b.offsetTop;c+=parseInt((b.offsetHeight-22)/2);a.style.top=c+"px";a.style.display="block"}};pui.hA=function(){for(var b=0;b<Ed;b++)pui.tl(Dd[b])};
|
|
1023
1024
|
pui.Bp=function(b){var a=b.calimg;if(a){a.parentNode.removeChild(a);b.calimg=null}};
|
|
1024
1025
|
pui.widgets.add({name:"date field",tag:"input",newId:"Date",rp:pui.normalizeURL("/profoundui/proddata/images/cal.gif"),Ks:"pui-cal pui-cal-input pui-calendar-icon",vt:true,defaults:{"css class":"input"},propertySetters:{"field type":function(b){b.dom.value=b.evalProperty("value");b.dom.vj=b.evalProperty("show today option");b.dom.Rv=b.evalProperty("calendar position");if(b.design){b.dom.readOnly=true;b.dom.sizeMe=function(){var c=b.e;c.kh();c.Bg()}}else{if(b.dom.tagName=="INPUT"&&!b.dom.readOnly&&
|
|
1025
1026
|
!b.dom.disabled){var a;if(b.properties["date format"])a=b.properties["date format"];else{if(R=="genie")a=pui.F.config.defaultDateFormat;a||(a=pui.defaultDateFormat?pui.defaultDateFormat:"MM/DD/YY")}setTimeout(function(){if(b.dom.calimg==null)Kd(b.dom,a);else if(R=="genie"){pui.Bp(b.dom);Kd(b.dom,a)}},1);if(b.dom.getAttribute("autocomplete")==null&&(R!="genie"||!pui.F.config.Yg)){b.dom.setAttribute("autocomplete","off");R=="dspf"&&b.dom.setAttribute("name",pui.Rd())}}if(pui.pa&&!pui.xf){U(b.dom,"focus",
|
|
@@ -1065,9 +1066,9 @@ pui.widgets.add({name:"file upload dnd",newId:"FileUploadDND",menuName:"File Upl
|
|
|
1065
1066
|
++a}a=b.dom.fileUpload;if(Array.isArray(e))a.Xf=e;b.dom.fileUpload.render();window.addEventListener("dragover",pui.fileupload.wl,false);window.addEventListener("drop",pui.fileupload.wl,false)},"auto submit":function(b){if(!b.design){var a=b.value;b.dom.fileUpload.Iq=a===true||a==="true"}},"auto upload":function(b){if(!b.design){var a=b.value;b.dom.fileUpload.Jq=a===true||a==="true"}},"show select":function(b){var a=b.dom.fileUpload;a.dn=b.value=="true"||b.value==true;a.Ve.innerHTML="";Ud(a)},"number of files":pui.fileupload.Fe["number of files"],
|
|
1066
1067
|
"size limit":pui.fileupload.Fe["size limit"],"target directory":pui.fileupload.Fe["target directory"],"rename to":pui.fileupload.Fe["rename to"],"overwrite files":pui.fileupload.Fe["overwrite files"],"generate unique names":pui.fileupload.Fe["generate unique names"],onupload:pui.fileupload.Fe.onupload,disabled:pui.fileupload.Fe.disabled},qc:pui.fileupload.qc});
|
|
1067
1068
|
pui.fileupload.wl=function(b){var a=b.dataTransfer.items;if(a!=null)for(var c=0,e=a.length;c<e;c++)if(a[c].kind==="file"){b.preventDefault();return}a=b.dataTransfer.types;if(a!=null){c=0;for(e=a.length;c<e;c++)if(a[c]==="Files"){b.preventDefault();return}}};window.addEventListener("dragover",pui.fileupload.wl,false);window.addEventListener("drop",pui.fileupload.wl,false);pui.Tu=function(){function b(){if(g.getContext!=null){h=g.getContext("2d");if(h!=null){if(f.color!=null)h.strokeStyle=f.color;if(f.backgroundColor!=null){g.style.backgroundColor=f.backgroundColor;h.fillStyle=f.backgroundColor;h.fillRect(0,0,f.b.offsetWidth,f.b.offsetHeight)}h.lineJoin="round";h.lineWidth=5}}}function a(p,t,s,y){if(h!=null){if(s==null&&y==null)h.lineTo(p,t);else{h.moveTo(p,t);h.lineTo(s,y)}h.stroke()}}function c(){f.b.modified=true;pui.Re(f.b)}function e(p){function t(B){if(!(f.readOnly||
|
|
1068
|
-
f.disabled)){if(B!=null&&B.touches!=null)if(B.touches.length!=1)return;var
|
|
1069
|
-
null){if(p.touches.length!=1)return;C=true}o.push([]);l.x=($c(p)-A[0])*y;l.y=(ad(p)-A[1])*y;h.beginPath();a(l.x,l.y,l.x,l.y);var F=o[o.length-1];F.push(l.x);F.push(l.y);c();if(!pui.Be(p)){if(C){U(g,"touchmove",t);U(g,"touchend",s);U(document,"touchend",s)}else{U(g,"mousemove",t);U(g,"mouseup",s);U(document,"mouseup",s)}if(f.designMode&&!f.e.isSelected()){F=f.e.designer;var G=F.selection;G.clear();G.add(f.e);F.nb.refresh()}
|
|
1070
|
-
"pui-signature-pad-canvas";this.designMode=false;this.e=null;this.init=function(){f.b.innerHTML="";f.b.className="pui-signature-pad-container";g=document.createElement("canvas");if(!f.designMode)g.innerHTML="Your browser does not support HTML5 Canvas.<br/>Signature pad widget will not function.";f.b.appendChild(g);n=document.createElement("div");n.className="pui-signature-pad-clear-box";n.innerHTML="Clear";n.onmousedown=function(p){
|
|
1069
|
+
f.disabled)){if(B!=null&&B.touches!=null)if(B.touches.length!=1)return;var D=($c(B)-A[0])*y;B=(ad(B)-A[1])*y;a(D,B);var E=o[o.length-1];E.push(D);E.push(B);l.x=D;l.y=B}}function s(){h.closePath();if(C){bc(g,"touchmove",t);bc(g,"touchend",s);bc(document,"touchend",s)}else{bc(g,"mousemove",t);bc(g,"mouseup",s);bc(document,"mouseup",s)}pui.Re(f.b)}if(!(f.readOnly||f.disabled))if(h!=null){var y=1;if(R=="dspf"&&Ib&&Ib.designer&&Ib.designer.b)y=Ib.Em;var A=pui.Vc(f.b,true),C=false;if(p!=null&&p.touches!=
|
|
1070
|
+
null){if(p.touches.length!=1)return;C=true}o.push([]);l.x=($c(p)-A[0])*y;l.y=(ad(p)-A[1])*y;h.beginPath();a(l.x,l.y,l.x,l.y);var F=o[o.length-1];F.push(l.x);F.push(l.y);c();if(!pui.Be(p)){if(C){U(g,"touchmove",t);U(g,"touchend",s);U(document,"touchend",s)}else{U(g,"mousemove",t);U(g,"mouseup",s);U(document,"mouseup",s)}if(f.designMode&&!f.e.isSelected()){F=f.e.designer;var G=F.selection;G.clear();G.add(f.e);F.nb.refresh()}xb(p);return false}}}var f=this,h,g,l={},o=[],n,r;this.b=null;this.className=
|
|
1071
|
+
"pui-signature-pad-canvas";this.designMode=false;this.e=null;this.init=function(){f.b.innerHTML="";f.b.className="pui-signature-pad-container";g=document.createElement("canvas");if(!f.designMode)g.innerHTML="Your browser does not support HTML5 Canvas.<br/>Signature pad widget will not function.";f.b.appendChild(g);n=document.createElement("div");n.className="pui-signature-pad-clear-box";n.innerHTML="Clear";n.onmousedown=function(p){xb(p);return false};n.onclick=function(){f.clear();c()};f.b.appendChild(n);
|
|
1071
1072
|
if(f.designMode){r=document.createElement("div");r.className="pui-signature-pad-move-box";r.innerHTML="Move";f.b.appendChild(r)}f.resize();g.addEventListener("pointerdown",function(p){p.stopPropagation()});U(g,"mousedown",e);U(g,"touchstart",e);U(f.b,"dblclick",function(p){if(f.designMode){var t=f.e.designer.nb;t.GA("value",null,true,p);t.sz.DA()}});if(f.designMode)if(pui.is_chrome||pui.is_old_ie&&pui.ie_mode<10){g.style.display="none";r.style.display="none"}};this.resize=function(p){g.style.width=
|
|
1072
1073
|
f.b.offsetWidth+"px";g.style.height=f.b.offsetHeight+"px";g.setAttribute("width",f.b.offsetWidth);g.setAttribute("height",f.b.offsetHeight);b();if(p==true)f.It();else o=[]};this.clear=function(){h!=null&&h.clearRect(0,0,f.b.offsetWidth,f.b.offsetHeight);f.resize()};this.zy=function(p){f.color=p;b()};this.uy=function(p){f.backgroundColor=p;b()};this.ku=function(){n.style.visibility=f.readOnly||f.disabled?"hidden":""};this.getValue=function(){for(var p="[",t=0;t<o.length;t++){var s=o[t];if(t>0)p+=",";
|
|
1073
1074
|
p+="[";for(j=0;j<s.length;j++){if(j>0)p+=",";p+=s[j]}p+="]"}p+="]";return p};this.setValue=function(p){f.clear();if(!(p.length<5||p.substr(0,2)!="[["||p.substr(p.length-2,2)!="]]")){try{o=eval("("+p+")")}catch(t){}f.It()}};this.It=function(){if(h!=null){h.beginPath();for(var p=0;p<o.length;p++)for(var t=o[p],s=0;s<t.length;s+=2){if(s+1>t.length)break;var y=s-2;if(y<0)y=0;a(t[y],t[y+1],t[s],t[s+1])}h.closePath()}}};
|
|
@@ -1087,9 +1088,9 @@ pui.Q(p.oa,"paging-link-hover")};p.oa.onmouseout=function(){p.oa.disabled||pui.d
|
|
|
1087
1088
|
o.innerHTML=" ";c.appendChild(o);r=document.createElement("span");r.style.fontFamily="Arial";r.style.fontSize="11px";r.style.fontWeight="bold";r.style.verticalAlign="top";r.className="paging-number";c.appendChild(r);o=document.createElement("span");o.innerHTML=" ";c.appendChild(o);p.na=document.createElement("span");p.na.innerHTML=pui.getLanguageText("runtimeText","next link text");p.na.href="javascript:void(0)";p.na.style.verticalAlign=
|
|
1088
1089
|
"top";p.na.vd="PageDown";p.na.S="0";p.na.Ab=p;p.na.nextPage=true;p.na.onmouseover=function(){p.na.disabled||pui.Q(p.na,"paging-link-hover")};p.na.onmouseout=function(){p.na.disabled||pui.da(p.na,"paging-link-hover")};p.na.onclick=function(){a(true)};p.na.className="paging-link next-paging-link";c.appendChild(p.na);p.ka=document.createElement("div");p.ka.className="next-image-icon";p.ka.style.verticalAlign="top";p.ka.style.display="inline-block";p.ka.style.height="16px";p.ka.style.width="16px";p.ka.vd=
|
|
1089
1090
|
"PageDown";p.ka.S="0";p.ka.Ab=p;p.ka.nextPage=true;p.ka.onmouseover=function(){p.ka.disabled||pui.Q(p.na,"paging-link-hover")};p.ka.onmouseout=function(){p.ka.disabled||pui.da(p.na,"paging-link-hover")};p.ka.onclick=function(){a(true)};c.appendChild(p.ka);if(!p.lj||!p.mj)pui.Cn=true;if(!p.grid.designMode&&pui.runtimeContainer!=null&&c!=null&&c.parentNode!=null){var t=function(s){if(c==null||c.parentNode==null)bc(pui.runtimeContainer,"keydown",t);else{if(!s)s=window.event;s=s.keyCode;s==33&&b();s==
|
|
1090
|
-
34&&a()}};U(pui.runtimeContainer,"keydown",t)}U(c,"mousedown",function(s){function y(
|
|
1091
|
-
null)if(p.grid.c.e.moved){p.grid.c.e.designer.mn();R=="dspf"&&pui.ide.refreshRibbon()}else p.grid.c.e.designer.ca.fy();p.grid.dc();var
|
|
1092
|
-
if(p.Df)designUtils.Ee(s);else{var C=$c(s),F=ad(s);p.grid.Hc(function(
|
|
1091
|
+
34&&a()}};U(pui.runtimeContainer,"keydown",t)}U(c,"mousedown",function(s){function y(D){var E=ad(D)-F,K=$c(D)-C;D=p.grid.c.e;if(D!=null){var S=D.designer.selection;if(S.qu){K+=p.grid.c.gb;E+=p.grid.c.Da;K=S.Rj(K,pui.ul);E=S.Rj(E,pui.vl,R=="genie"?3:0);K-=p.grid.c.gb;E-=p.grid.c.Da}}p.grid.Hc(function(P){P.style.top=P.Da+E+"px";P.style.left=P.gb+K+"px"});if(D!=null)D.moved=true;p.grid.setScrollBar();D=pui.designer.uj;if(D.b==null){D.b=document.body;D.init()}D.set(p.grid.c.e);D.show()}function A(){if(p.grid.c.e!=
|
|
1092
|
+
null)if(p.grid.c.e.moved){p.grid.c.e.designer.mn();R=="dspf"&&pui.ide.refreshRibbon()}else p.grid.c.e.designer.ca.fy();p.grid.dc();var D=pui.designer.uj;D!=null&&D.b!=null&&D.hide();bc(document,"mousemove",y);bc(document,"mouseup",A)}if(p.grid.designMode){p.grid.c.e.designer.Io();p.grid.Le();if(pui.Be(s)){if(p.grid.c.e){p.grid.c.e.designer.Sw.hide();p.grid.c.e.designer.Ly(s)}designUtils.Ee(s);s.stopPropagation&&s.stopPropagation();return false}p.grid.c.e!=null&&p.grid.c.e.designer.Kp!=null&&p.grid.c.e.designer.Kp.hide();
|
|
1093
|
+
if(p.Df)designUtils.Ee(s);else{var C=$c(s),F=ad(s);p.grid.Hc(function(D){D.gb=parseInt(D.style.left);D.Da=parseInt(D.style.top)});U(document,"mousemove",y);U(document,"mouseup",A);xb(s);if(p.grid.designMode&&p.grid.c.e!=null){p.grid.c.e.moved=false;s=p.grid.c.e.designer;var G=s.selection,B="Move Selection";if(G.Sd.length==1)B="Move Grid";s.ca.start(B);s.ca.jp=true;G.pn(["left","top","parent tab panel","parent tab panel"]);s.ca.jp=false}}}})};this.position=function(){if((p.kg||p.Vh||p.wd||p.Oh||p.Ph||
|
|
1093
1094
|
p.mm)&&p.grid.c.style.display!="none"&&p.grid.c.style.visibility!="hidden"){c.style.left=p.x+"px";c.style.top=p.y+"px";c.style.width=p.width+"px";c.style.display="";c.style.zIndex=p.grid.c.style.zIndex}else c.style.display="none"};this.hide=function(){c.style.display="none"};this.destroy=function(){p.Sb.removeEventListener("click",p);c.innerHTML="";c.parentNode!=null&&c.parentNode.removeChild(c);r=n=o=l=g=h=f=e=c=null;$b(p);p=null};this.em=function(t){if(c!=null){if(t==null)t="";t=Lb(t);if(t!=""){t=
|
|
1094
1095
|
t.split(" ").shift();t+="-paging-bar"}t+=" paging-bar";t=Lb(t);if(c.className!=t)c.className=t}};this.z=function(){p.Sb.style.display="none";p.em(p.grid.c.className);if((p.kg||p.Vh||p.wd||p.Oh||p.Ph||p.mm)&&p.grid.c.style.display!="none"&&p.grid.c.style.visibility!="hidden"){p.position();var t=p.kg?"":"none";e.style.display=t;f.style.display=t;t=p.Vh?"":"none";h.style.display=t;g.style.display=t;if(p.Vh&&p.kg){f.innerHTML=pui.getLanguageText("runtimeText","export to x",["Excel CSV"]);g.innerHTML=
|
|
1095
1096
|
pui.getLanguageText("runtimeText","export to x",["Excel XLSX"]);h.style.left="160px";g.style.left="180px";var s=t=g.parentNode.offsetWidth,y=t;if(p.wd){t=p.xa.offsetLeft;y=p.ka.offsetLeft+p.ka.offsetWidth}else if(p.Oh){t=n.offsetLeft;y=n.offsetLeft+n.offsetWidth}else if(p.Ph){t=r.offsetLeft;y=r.offsetLeft+r.offsetWidth}if(g.offsetLeft+g.offsetWidth>t||y>s){f.innerHTML=pui.getLanguageText("runtimeText","export to x",["CSV"]);g.innerHTML=pui.getLanguageText("runtimeText","export to x",["XLSX"]);h.style.left=
|
|
@@ -1098,26 +1099,26 @@ pui.getLanguageText("runtimeText","export to x",["Excel XLSX"]);h.style.left="16
|
|
|
1098
1099
|
"prev-image-icon-disabled")}if(!p.grid.designMode&&p.grid.Tb()&&(p.grid.su&&pui["page down on subfile end"]!=true||p.tt=="false"||!p.lj)){p.ka.disabled=true;p.na.disabled=true;pui.Q(p.na,"paging-link-disabled");pui.Q(p.ka,"next-image-icon-disabled")}else{pui.da(p.na,"paging-link-disabled");pui.da(p.ka,"next-image-icon-disabled")}}}else{p.xa.style.display="none";p.oa.style.display="none";p.ka.style.display="none";p.na.style.display="none"}if(p.Oh){n.style.display="";n.innerHTML=pui.getLanguageText("runtimeText",
|
|
1099
1100
|
"page")+" "+p.Hl}else n.style.display="none";if(p.Ph){t=p.grid;s=t.getRecordCount();if(t.designMode){t.qf=1;t.Ti=t.Bo();s=t.Ti}r.style.display="";r.innerHTML="Showing "+t.qf+"-"+t.Ti+" of "+s}else r.style.display="none"}else c.style.display="none"};this.$g=function(t){p.b=t;c.parentNode.removeChild(c);p.b.appendChild(c)};this.getHeight=function(){return c.offsetHeight};this.Yp=function(t,s){e.style.display="none";f.style.display="none";h.style.display="none";g.style.display="none";p.xa.style.display=
|
|
1100
1101
|
"none";p.oa.style.display="none";p.ka.style.display="none";p.na.style.display="none";n.style.display="none";p.$q=t;p.Zq=s;p.Sb.style.cursor="pointer";p.Sb.style.display="block"};this.Jv=function(t){t(c)}};pui.bi.prototype=Object.create(pui.zd.prototype);function Yd(b,a,c){b=b.Sb.childNodes[0];b.className=c;b.innerHTML=a}function Zd(b,a){b.Sb.childNodes[1].innerHTML=a}pui.bi.prototype.handleEvent=function(b){switch(b.type){case "click":if(b.target==this.Sb||b.target.parentNode==this.Sb)$d(this);break}};
|
|
1101
|
-
function $d(b){b.Sb.style.cursor="";b.Sb.style.opacity="0";Yd(b,"","");b.$q!=null&&Zd(b,b.$q);typeof b.Zq=="function"&&b.Zq();setTimeout(function(){this.z();this.Sb.style.opacity=""}.bind(b),2500)}pui.bi.prototype.gm=function(b){Zd(this,b)};pui.bi.prototype.js=function(){this.z()};pui.Uu=function(){function b(
|
|
1102
|
-
0){T-=0.001;if(T<=0){Z=true;T=0}}else{T+=0.001;if(T>=0){Z=true;T=0}}N=parseInt(t.style.top);var V=N+parseInt(t.style.height)-parseInt(s.style.height);if(V<N)V=N;if(v<N){v=N;Z=true}if(v>V){v=V;Z=true}s.Ag=v;s.style.top=parseInt(v)+"px";v=(v-N)/(V-N);if(isNaN(v))v=0;v=(n.Ra-n.cc)*v;v=Math.round(v)+1;n.doScroll(v);if(Z){s.D=null;pui.animate({element:s,property:"opacity",from:1,to:F,duration:"1s"})}else setTimeout(K,1E3/60)}}if(
|
|
1103
|
-
null||S==null)s.style.opacity=F;else if(!(S>500)){var T=P/S,L=(new Date).getTime();K()}}}function f(
|
|
1104
|
-
y,A=25,C=-1,F=0,G,B,
|
|
1102
|
+
function $d(b){b.Sb.style.cursor="";b.Sb.style.opacity="0";Yd(b,"","");b.$q!=null&&Zd(b,b.$q);typeof b.Zq=="function"&&b.Zq();setTimeout(function(){this.z();this.Sb.style.opacity=""}.bind(b),2500)}pui.bi.prototype.gm=function(b){Zd(this,b)};pui.bi.prototype.js=function(){this.z()};pui.Uu=function(){function b(E,K){if(l){l=false;n.Al(K)}else setTimeout(function(){E==h&&n.Al(K)},n.interval)}function a(){var E=22;if(pui.is_touch&&!pui.is_mouse_capable&&!n.designMode||pui.pa)E=0;y.style.left=n.x-y.offsetWidth+E+"px";y.style.top=n.y-y.offsetHeight-2+"px"}function c(E){setTimeout(function(){if(E==g)y.style.display="none"},800)}function e(E){function K(){if(s.D==null)s.style.opacity=F;else if(!(s.D.startTime>L)){var Z=false,N=(new Date).getTime(),v=O+(da-N)*T;O=v;da=N;T*=0.98;if(T>
|
|
1103
|
+
0){T-=0.001;if(T<=0){Z=true;T=0}}else{T+=0.001;if(T>=0){Z=true;T=0}}N=parseInt(t.style.top);var V=N+parseInt(t.style.height)-parseInt(s.style.height);if(V<N)V=N;if(v<N){v=N;Z=true}if(v>V){v=V;Z=true}s.Ag=v;s.style.top=parseInt(v)+"px";v=(v-N)/(V-N);if(isNaN(v))v=0;v=(n.Ra-n.cc)*v;v=Math.round(v)+1;n.doScroll(v);if(Z){s.D=null;pui.animate({element:s,property:"opacity",from:1,to:F,duration:"1s"})}else setTimeout(K,1E3/60)}}if(E==null)s.style.opacity=F;else{var S=E.duration,P=E.Mk,O=s.Ag,da=E.vh;if(P==
|
|
1104
|
+
null||S==null)s.style.opacity=F;else if(!(S>500)){var T=P/S,L=(new Date).getTime();K()}}}function f(E,K){if(n.ab){if(K)E=-E;if(n.ab&&E<0&&n.ab.grid.Tb()||n.ab&&E>0&&n.ab.grid.Gb())return true}return false}this.y=this.x=0;this.height=300;this.zIndex=100;this.designMode=false;this.b=null;this.cc=10;this.Ra=100;this.la=20;this.borderWidth=1;this.Al=this.onchange=null;this.Qh=true;this.Rh=false;this.interval=250;this.type="sliding";this.Lf=false;this.ab=null;var h=0,g=0,l=true,o=false,n=this,r,p,t,s,
|
|
1105
|
+
y,A=25,C=-1,F=0,G,B,D;this.init=function(E){n.ab=E;r=document.createElement("div");r.style.position="absolute";r.style.width="23px";r.style.overflowY="scroll";r.style.overflowX="hidden";r.style.padding="0px";r.className="pui-scrollbar";if(n.ab.grid&&n.ab.grid.Xc)r.className+=" "+n.ab.grid.Xc+"-pui-scrollbar";p=document.createElement("div");p.style.position="absolute";p.style.left="0px";p.style.top="0px";p.innerHTML=" ";p.fontSize="0px";y=document.createElement("div");y.style.position="absolute";
|
|
1105
1106
|
y.style.border="1px solid #999999";y.style.backgroundColor="#ffffff";y.style.fontFamily="Arial";y.style.fontSize="10px";y.style.fontWeight="bold";y.style.padding="1px";y.style.zIndex=1E3;y.style.filter="alpha(opacity=75)";y.style.opacity=0.75;y.style.display="none";if(R=="dspf"&&pui.is_touch&&!pui.is_mouse_capable&&!n.designMode||pui.pa){t=document.createElement("div");t.style.position="absolute";t.style.width="3px";t.style.backgroundColor="transparent";s=document.createElement("div");s.style.position=
|
|
1106
1107
|
"absolute";s.style.width="3px";s.style.height="25px";s.style.top="0px";s.style.backgroundColor="#999999";if(!pui.is_android)s.style.borderRadius="2px";r.style.visibility="hidden";r.style.display="none";s.style.opacity=F;if(pui.pa){var K=function(da){function T(N){s.style.opacity=1;var v=ad(N);N=(new Date).getTime();s.D.duration=N-s.D.vh;s.D.vh=N;var V=n.Ra/n.cc/6;if(V<1)V=1;if(V>40)V=40;s.D.Mk=(v-s.D.Ui)/V;s.D.Ui=v;N=s.D.Da;v=v-s.D.startY;if(s.D.reverse)v=-v;v/=V;N+=v;v=parseInt(t.style.top);V=v+
|
|
1107
|
-
parseInt(t.style.height)-parseInt(s.style.height);if(V<v)V=v;if(N<v)N=v;if(N>V)N=V;s.Ag=N;s.style.top=parseInt(N)+"px";N=(N-v)/(V-v);if(isNaN(N))N=0;N=(n.Ra-n.cc)*N;N=Math.round(N)+1;n.doScroll(N)}function L(){bc(document,"mousemove",T);bc(document,"mouseup",L);e(s.D)}var Z=
|
|
1108
|
-
Z.tagName=="SELECT"||Z.tagName=="TEXTAREA")){s.D={};s.D.reverse=Z!=s;s.D.startY=ad(da);s.D.Ui=s.D.startY;s.D.startTime=(new Date).getTime();s.D.vh=(new Date).getTime();s.D.Mk=null;s.D.duration=null;s.D.Da=s.Ag!=null?s.Ag:parseInt(s.style.top);U(document,"mousemove",T);U(document,"mouseup",L);
|
|
1109
|
-
T.parentNode!=null&&T.parentNode.parentNode!=null&&T.parentNode.parentNode.row===0)if(
|
|
1108
|
+
parseInt(t.style.height)-parseInt(s.style.height);if(V<v)V=v;if(N<v)N=v;if(N>V)N=V;s.Ag=N;s.style.top=parseInt(N)+"px";N=(N-v)/(V-v);if(isNaN(N))N=0;N=(n.Ra-n.cc)*N;N=Math.round(N)+1;n.doScroll(N)}function L(){bc(document,"mousemove",T);bc(document,"mouseup",L);e(s.D)}var Z=wb(da);if(Z!=null&&Z.row===0||Z!=null&&Z.parentNode!=null&&Z.parentNode.row===0||Z!=null&&Z.parentNode!=null&&Z.parentNode.parentNode!=null&&Z.parentNode.parentNode.row===0)if(E.grid.h)return;if(!(Z!=null&&Z.tagName=="INPUT"||
|
|
1109
|
+
Z.tagName=="SELECT"||Z.tagName=="TEXTAREA")){s.D={};s.D.reverse=Z!=s;s.D.startY=ad(da);s.D.Ui=s.D.startY;s.D.startTime=(new Date).getTime();s.D.vh=(new Date).getTime();s.D.Mk=null;s.D.duration=null;s.D.Da=s.Ag!=null?s.Ag:parseInt(s.style.top);U(document,"mousemove",T);U(document,"mouseup",L);xb(da)}};U(s,"mousedown",K);U(E,"mousedown",K)}if(!pui.pa){var S,P,O;K=function(da){if(da.touches.length==1){var T=da.target;if(T!=null&&T.row===0||T!=null&&T.parentNode!=null&&T.parentNode.row===0||T!=null&&
|
|
1110
|
+
T.parentNode!=null&&T.parentNode.parentNode!=null&&T.parentNode.parentNode.row===0)if(E.grid.h)return;if(!(T!=null&&T.tagName=="INPUT"||T.tagName=="SELECT"||T.tagName=="TEXTAREA")){da=da.touches[0];s.D={};s.D.reverse=T!=s;n.yu=T;s.D.startY=da.pageY;s.D.Ui=s.D.startY;s.D.startTime=(new Date).getTime();s.D.vh=(new Date).getTime();s.D.Mk=null;s.D.duration=null;s.D.Da=s.Ag!=null?s.Ag:parseInt(s.style.top);S=da.pageX;P=da.pageY;O=null}}};U(s,"touchstart",K);U(E,"touchstart",K);K=function(da){if(da.touches.length==
|
|
1110
1111
|
1)if(s.D!=null){s.style.opacity=1;var T=da.touches[0],L=T.pageY,Z=T.pageX-S,N=T.pageY-P;S=T.pageX;P=T.pageY;if(O==null)O=Math.abs(Z)-Math.abs(N)>0;Z=T=false;if(n.ab){T=n.ab.grid.Ml;if(n.ab.grid.io)Z=true}if(!O||T||Z){N=(new Date).getTime();s.D.duration=N-s.D.vh;s.D.vh=N;N=n.Ra/n.cc/6;if(N<1)N=1;if(N>40)N=40;s.D.Mk=(L-s.D.Ui)/N;s.D.Ui=L;var v=s.D.Da;L=L-s.D.startY;if(s.D.reverse)L=-L;L/=N;v+=L;N=parseInt(t.style.top);var V=N+parseInt(t.style.height)-parseInt(s.style.height);if(V<N)V=N;if(v<N)v=N;if(v>
|
|
1111
|
-
V)v=V;s.Ag=v;s.style.top=parseInt(v)+"px";v=(v-N)/(V-N);if(isNaN(v))v=0;v=(n.Ra-n.cc)*v;v=Math.round(v)+1;n.doScroll(v);v=true;if(T)v=false;else if(f(L,s.D.reverse)){v=false;s.style.top=L>0?V+"px":N+"px"}if(Z&&!T)v=true;if(v)da.preventDefault();else O=true}}};U(s,"touchmove",K);U(
|
|
1112
|
-
r.onmouseup=function(){c(g)};r.appendChild(p);n.b.appendChild(r);t!=null&&n.b.appendChild(t);s!=null&&n.b.appendChild(s);n.b.appendChild(y)};this.xn=function(){U(r,"scroll",n.doScroll)};this.doScroll=function(
|
|
1113
|
-
"row")+" "+K;a();n.onchange!=null&&n.onchange(K);if(n.Al!=null){h+=1;if(h>1E4)h=10;b(h,K)}C=K;S=n.ab;if(S!=null){S=S.grid.po.onscroll;if(S!=null&&S!=""&&!n.designMode)try{eval("row = "+K);eval(S)}catch(P){pui.Ca(P,"onscroll Error:\n");return false}}if(typeof
|
|
1114
|
-
S=parseInt((P-S)*((
|
|
1112
|
+
V)v=V;s.Ag=v;s.style.top=parseInt(v)+"px";v=(v-N)/(V-N);if(isNaN(v))v=0;v=(n.Ra-n.cc)*v;v=Math.round(v)+1;n.doScroll(v);v=true;if(T)v=false;else if(f(L,s.D.reverse)){v=false;s.style.top=L>0?V+"px":N+"px"}if(Z&&!T)v=true;if(v)da.preventDefault();else O=true}}};U(s,"touchmove",K);U(E,"touchmove",K);U(E,"touchend",function(){n.yu=null;e(s.D)})}}if(R=="genie"&&!pui.fa)r.onscroll=n.doScroll;r.onmousedown=function(da){if(n.Qh||n.Rh){if(y.innerHTML!="")y.style.display="";a()}n.designMode&&designUtils.Ee(da)};
|
|
1113
|
+
r.onmouseup=function(){c(g)};r.appendChild(p);n.b.appendChild(r);t!=null&&n.b.appendChild(t);s!=null&&n.b.appendChild(s);n.b.appendChild(y)};this.xn=function(){U(r,"scroll",n.doScroll)};this.doScroll=function(E){if(n.Lf){var K=Math.round(r.scrollTop/A)+1;if(n.qm>0&&(E==null||E.target!=null))K=n.qm;if(G!=null&&B!=null&&E==null&&C>0)E=C;if(E!=null&&typeof E=="number")K=E;if(K!=C){var S=K+n.cc-1;if(n.Rh)y.innerHTML=pui.getLanguageText("runtimeText","rows")+" "+K+" - "+S;if(n.Qh)y.innerHTML=pui.getLanguageText("runtimeText",
|
|
1114
|
+
"row")+" "+K;a();n.onchange!=null&&n.onchange(K);if(n.Al!=null){h+=1;if(h>1E4)h=10;b(h,K)}C=K;S=n.ab;if(S!=null){S=S.grid.po.onscroll;if(S!=null&&S!=""&&!n.designMode)try{eval("row = "+K);eval(S)}catch(P){pui.Ca(P,"onscroll Error:\n");return false}}if(typeof E!=="undefined"&&(n.Qh||n.Rh)&&n.Ra>1){y.style.display="";g+=1;if(g>1E4)g=0;a();c(g)}else y.style.display="none"}}};this.td=function(E,K){if(s!=null){var S=parseInt(t.style.top),P=S+parseInt(t.style.height)-parseInt(s.style.height);if(P<S)P=S;
|
|
1115
|
+
S=parseInt((P-S)*((E-1)/(n.Ra-n.cc)))+S;s.style.top=S+"px";C=E;return s.style.top!=S+"px"}else{if(K)C=E;else n.qm=E;S=r.scrollTop;r.scrollTop=(E-1)*A;if(S!=r.scrollTop)return true;n.qm=null;return false}};this.ph=function(){clearTimeout(n.Cw);n.Cw=setTimeout(function(){n.qm=null},n.interval)};this.z=function(E){if(pui.is_old_ie){A=25;if(n.Ra>1E3)A=50}else A=19;if(s!=null&&t!=null){t.style.left=n.x-5+"px";t.style.top=n.y+"px";t.style.zIndex=n.zIndex;s.style.left=n.x-5+"px";if(C==-1)s.style.top=n.y+
|
|
1115
1116
|
"px";s.style.zIndex=n.zIndex;r.style.visibility="hidden";r.style.display="none";t.style.display="";s.style.display=""}else{r.style.zIndex=n.zIndex;r.style.visibility="";r.style.display="";r.style.left=n.x+"px";r.style.top=n.y+"px"}var K=n.cc*n.la-n.borderWidth;if(t!=null){t.style.height=K-2+"px";var S=(K-2)*(n.Ra<=0?1:n.cc/n.Ra);S=parseInt(S);if(S<25&&K>27)S=25;if(S>K-2)S=K-2;s.style.height=S+"px"}else{r.style.height=K+"px";S=(n.Ra-n.cc)*A+K;var P=9999990;if(pui.is_old_ie)P=1342177;else if(pui.is_ie)P=
|
|
1116
|
-
1533917;for(;S>P&&A>1;){A-=1;S=(n.Ra-n.cc)*A+K}if(S<0)S=0;if(S>5&&S==K)S-=5;p.style.height=S+"px"}a();t==null&&!
|
|
1117
|
+
1533917;for(;S>P&&A>1;){A-=1;S=(n.Ra-n.cc)*A+K}if(S<0)S=0;if(S>5&&S==K)S-=5;p.style.height=S+"px"}a();t==null&&!E&&n.doScroll();if(!n.designMode&&n.Lf&&n.cc==1){D=p.style.height;p.style.height="0px";r.style.overflow="hidden";r.style.overflowX="hidden";r.style.overflowY="hidden";if(G==null&&B==null&&n.Ra>1){G=document.createElement("img");G.style.position="absolute";G.style.top="0px";G.style.right="0px";G.style.cursor="pointer";G.src=pui.normalizeURL("/profoundui/proddata/images/up.gif");G.onclick=
|
|
1117
1118
|
function(){if(pui.Bc!=null)pui.Bc.style.display="none";var O=C-1;if(O<1)O=1;if(O>n.Ra)O=n.Ra;n.doScroll(O)};B=document.createElement("img");B.style.position="absolute";B.style.bottom="0px";B.style.right="0px";B.style.cursor="pointer";B.src=pui.normalizeURL("/profoundui/proddata/images/down.gif");B.onclick=function(){if(pui.Bc!=null)pui.Bc.style.display="none";if(C==-1)C=1;var O=C+1;if(O<1)O=1;if(O>n.Ra)O=n.Ra;n.doScroll(O)};r.appendChild(G);r.appendChild(B)}}if(!n.designMode&&n.Lf&&n.cc>1&&G!=null&&
|
|
1118
|
-
B!=null&&n.Ra>1){r.removeChild(G);r.removeChild(B);B=G=null;p.style.height=
|
|
1119
|
-
"hidden";if(s!=null&&t!=null){t.style.display="none";s.style.display="none"}};this.destroy=function(){r.parentNode!=null&&r.parentNode.removeChild(r);p.parentNode!=null&&p.parentNode.removeChild(p);y.parentNode!=null&&y.parentNode.removeChild(y)};this.Ci=function(
|
|
1120
|
-
da*A;var L=false;if(T.preventDefault)L=true;if(n.ab&&(n.ab.grid.Ml||f(da)||T.shiftKey))L=false;if(L){T.preventDefault();T.returnValue=false}}if(!o){o=true;if(typeof WheelEvent=="function"){
|
|
1119
|
+
B!=null&&n.Ra>1){r.removeChild(G);r.removeChild(B);B=G=null;p.style.height=D;r.style.overflow="";r.style.overflowX="hidden";r.style.overflowY="scroll"}};this.al=function(E){if(t!=null)t.style.height=parseInt(r.style.height)+E-2+"px";else r.style.height=parseInt(r.style.height)+E+"px"};this.em=function(E){r.className="pui-scrollbar";if(n.ab.grid&&E)r.className+=" "+E+"-pui-scrollbar"};this.hide=function(){r.style.visibility="hidden";r.style.display="none";y.style.display="none";y.style.visibility=
|
|
1120
|
+
"hidden";if(s!=null&&t!=null){t.style.display="none";s.style.display="none"}};this.destroy=function(){r.parentNode!=null&&r.parentNode.removeChild(r);p.parentNode!=null&&p.parentNode.removeChild(p);y.parentNode!=null&&y.parentNode.removeChild(y)};this.Ci=function(E){function K(da){var T=0;if(!da)da=window.event;if(da.wheelDelta){T=da.wheelDelta/120;if(window.opera)T=-T}else if(da.detail)T=-da.detail/3;P(T,da)}function S(da){P(pui.mt(da)*-1,da)}function P(da,T){if(da&&!T.shiftKey)if(s==null)r.scrollTop-=
|
|
1121
|
+
da*A;var L=false;if(T.preventDefault)L=true;if(n.ab&&(n.ab.grid.Ml||f(da)||T.shiftKey))L=false;if(L){T.preventDefault();T.returnValue=false}}if(!o){o=true;if(typeof WheelEvent=="function"){E.addEventListener("wheel",S,false);for(var O=0;O<E.grid.n.length;O++)E.grid.n[O].addEventListener("wheel",S,false);for(O=0;O<E.grid.k.length;O++)E.grid.k[O].addEventListener("wheel",S,false)}else{E.addEventListener&&E.addEventListener("DOMMouseScroll",K,false);E.onmousewheel=K}}};this.$g=function(E){n.b=E;r.parentNode.removeChild(r);
|
|
1121
1122
|
n.b.appendChild(r)}};pui.Su=function(){function b(t){var s=0;if(!t)t=window.event;if(t.wheelDelta){s=t.wheelDelta/120;if(window.opera)s=-s}else if(t.detail)s=-t.detail/3;c(s,t)}function a(t){c(pui.mt(t)*-1,t)}function c(t,s){if(t&&!s.shiftKey)if(document.getElementById(f))document.getElementById(f).scrollTop-=t*p;else n.scrollTop-=t*p;var y=false;if(s.preventDefault)y=true;var A;if(A=e.grid){if(!(A=e.grid.Ml)){a:{if(e.ab)if(e.ab&&t<0&&e.ab.grid.Tb()||e.ab&&t>0&&e.ab.grid.Gb()){A=true;break a}A=false}A=A||s.shiftKey}A=
|
|
1122
1123
|
A}if(A)y=false;if(y){s.preventDefault();s.returnValue=false}}this.y=this.x=0;this.height=300;this.zIndex=100;this.designMode=this.Tb=this.Gb=false;this.fj=this.gj=this.b=null;this.type="paging";this.Lf=false;var e=this,f,h=false,g=false,l=false,o=0,n,r,p=25;this.init=function(){n=document.createElement("div");f=typeof e.grid!=="undefined"&&typeof e.grid.Wa==="string"&&e.grid.Wa.length>0?e.grid.Wa+"scrollbar":"scrollbar"+Math.floor(Math.random()*1E6).toString();n.id=f;n.style.position="absolute";n.style.width=
|
|
1123
1124
|
"23px";n.style.overflowY="scroll";n.style.overflowX="hidden";n.style.padding="0px";r=document.createElement("div");r.style.position="absolute";r.style.left="0px";r.style.top="0px";r.innerHTML=" ";r.fontSize="0px";n.onmousedown=function(t){e.designMode&&designUtils.Ee(t)};n.onscroll=function(){var t=parseInt(e.height/2);if(e.designMode||e.Gb&&e.Tb)n.scrollTop=t;else if(h)h=false;else if(l){h=true;n.scrollTop=e.height*2}else if(g){h=true;n.scrollTop=0}else if(e.Tb&&!e.Gb){if(e.gj!=null){t=e.gj();
|
|
@@ -1126,16 +1127,16 @@ if(t==false){e.z();return}}h=g=true;n.scrollTop=0}else if(e.Gb&&!e.Tb){if(e.fj!=
|
|
|
1126
1127
|
a,false);else{t.addEventListener&&t.addEventListener("DOMMouseScroll",b,false);t.onmousewheel=b}}}};pui.Mu=function(){function b(){for(;e.rows.length>0;)e.deleteRow(e.rows.length-1);f&&f.parentNode.removeChild(f);var g="";if(Ba=="ON")g="https://"+HTTP_HOST;g+="/profoundui/proddata/images/";var l=[],o=[],n=[],r=[];if(a.grid.sortable){if(a.Rc.nm!=null){l.push(pui.getLanguageText("runtimeText","sort ascending text"));n.push("icons/sort_ascending.png");r.push(function(){a.Rc.ra=true;if(a.grid.c.Jh!=null)a.grid.Nf="A";a.Rc.nm()});l.push(pui.getLanguageText("runtimeText","sort descending text"));n.push("icons/sort_descending.png");
|
|
1127
1128
|
r.push(function(){a.Rc.ra=false;if(a.grid.c.Jh!=null)a.grid.Nf="D";a.Rc.nm()})}l.push(pui.getLanguageText("runtimeText","sort..."));n.push("icons/grid.png");r.push(a.grid.ju)}if(l.length>0&&(a.grid.so||a.grid.Gi)){l.push("-");n.push(null);r.push(null)}if(a.grid.so){l.push(pui.getLanguageText("runtimeText","find text")+"...");n.push("icons/search.png");r.push(function(){a.grid.startFind(a.Rc)})}if(a.grid.Gi&&(!a.grid.Zj()||a.grid.rs()<a.grid.se)){l.push(pui.getLanguageText("runtimeText","filter text")+
|
|
1128
1129
|
"...");n.push("icons/filter.png");r.push(function(){a.grid.startFilter(a.Rc)});if(!pui.is_ie&&R!="genie"){l.push(pui.getLanguageText("runtimeText","multi filter text"));n.push("icons/filter_multi.png");r.push(function(){a.grid.Ny(a.Rc)})}}if(a.grid.Gi&&a.Rc.nc!=null){l.push(pui.getLanguageText("runtimeText","remove filter"));n.push("icons/remove_filter.png");r.push(function(){a.grid.removeFilter(a.Rc)})}if(a.grid.Gi&&a.grid.rs()>1){l.push(pui.getLanguageText("runtimeText","remove filters text"));
|
|
1129
|
-
n.push("icons/remove_filter.png");r.push(function(){a.grid.removeAllFilters()})}if(a.grid.Ot){l.push(pui.getLanguageText("runtimeText","reset data"));n.push("icons/default.png");r.push(function(){var
|
|
1130
|
-
S[P];O.col!=O.w&&a.grid.moveColumn(O.col,O.w)}a.grid.Pf(
|
|
1131
|
-
K){var S=
|
|
1130
|
+
n.push("icons/remove_filter.png");r.push(function(){a.grid.removeAllFilters()})}if(a.grid.Ot){l.push(pui.getLanguageText("runtimeText","reset data"));n.push("icons/default.png");r.push(function(){var E=a.grid.cells[0][0].parentNode.pui.properties;a.grid.alignColumnTotals();if(a.grid.ma){var K=E["column headings"].split(","),S=a.grid.ga.map(function(da){da.showing||a.grid.Jo(da,true)});if(a.grid.ga.yi)a.grid.ga.yi=null;for(;K.length<S.length;)K.push("")}S=a.grid.cells[0];for(var P=0;P<S.length;P++){var O=
|
|
1131
|
+
S[P];O.col!=O.w&&a.grid.moveColumn(O.col,O.w)}a.grid.Pf(E["column widths"]);a.grid.La();a.grid.fc=null;if(E["expand to layout"]=="true"||E["expand to layout"]==true)a.grid.Wb();a.grid.it([]);if(K)a.columnHeadings=K;a.grid.ec();a.grid.removeAllFilters();a.grid.clearState()})}if(a.grid.ma){n.push("icons/grid.png");l.push(pui.getLanguageText("runtimeText","displayed columns"));var p=a.grid.ga;if(a.grid.sl&&p.yi){var t=[];p.filter(function(E){if(E.currentColumn==-1&&!E.showing){t.push(E);return false}return true}).sort(function(E,
|
|
1132
|
+
K){var S=E.currentColumn,P=K.currentColumn,O=false,da=false;if(S==-1){O=true;S=a.grid.ms(E.columnId)}if(P==-1){da=true;P=a.grid.ms(K.columnId)}if(S==P)return O&&!da?1:-1;return S>P?1:-1}).forEach(function(E){o.push(E)});t.forEach(function(E){o.push(E)})}else p.forEach(function(E){o.push(E)});r.push(function(E){a.grid.alignColumnTotals();return a.grid.Jo(E)})}if(a.grid.qo==true||a.grid.qo==null&&a.grid.i!=null&&a.grid.i.kg){if(l.length>0&&l[l.length-1]!="-"){l.push("-");n.push(null);r.push(null)}l.push(pui.getLanguageText("runtimeText",
|
|
1132
1133
|
"export to x",["Excel (CSV)"])+"...");n.push("grids/excel.gif");r.push(function(){a.grid.exportCSV()});l.push(pui.getLanguageText("runtimeText","export to x",["Excel (XLSX)"])+"...");n.push("grids/excel.gif");r.push(function(){a.grid.exportCSV(null,true)})}for(p=0;p<l.length;p++){var s=e.insertRow(p);s.style.color="#333333";if(l[p]=="-"){s=s.insertCell(0);s.colSpan=2;var y=document.createElement("div");y.style.backgroundColor="#e0e0e0";y.style.borderBottomColor="#ffffff";y.style.borderBottomWidth=
|
|
1133
|
-
"1px";y.style.borderBottomStyle="solid";y.style.height="1px";y.style.lineHeight="1px";y.style.fontSize="1px";y.style.paddingTop="0px";y.style.paddingBottom="0px";y.style.width="100%";s.appendChild(y)}else{s.style.cursor="pointer";s.style.padding="3px";s.Fl=r[p];if(l[p]!=pui.getLanguageText("runtimeText","displayed columns")){s.onclick=function(
|
|
1134
|
-
|
|
1134
|
+
"1px";y.style.borderBottomStyle="solid";y.style.height="1px";y.style.lineHeight="1px";y.style.fontSize="1px";y.style.paddingTop="0px";y.style.paddingBottom="0px";y.style.width="100%";s.appendChild(y)}else{s.style.cursor="pointer";s.style.padding="3px";s.Fl=r[p];if(l[p]!=pui.getLanguageText("runtimeText","displayed columns")){s.onclick=function(E){wb(E).parentNode.Fl();a.hide()};s.Qo=false}s.onmouseover=function(E){E=wb(E).parentNode;if(E.tagName=="TD")E=E.parentNode;E.style.backgroundColor="#3399ff";
|
|
1135
|
+
E.style.color="#ffffff";a.grid.ma&&this.Qo&&a.lu()};s.onmouseout=function(E){if(a.grid.ma&&this.Qo)if(E){var K=E.relatedTarget||E.PA;if(K&&K==c)return;a.Ko()}E=wb(E).parentNode;if(E.tagName=="TD")E=E.parentNode;E.style.backgroundColor="";E.style.color="#333333"};y=s.insertCell(0);y.style.width="20px";var A=n[p];if(A!=null){y.style.backgroundImage="url('"+g+A+"')";y.style.backgroundPosition="center";y.style.backgroundRepeat="no-repeat"}y.style.padding="3px";y=s.insertCell(1);if(l[p]==pui.getLanguageText("runtimeText",
|
|
1135
1136
|
"displayed columns")){A=document.createElement("div");var C=document.createElement("table");C.border=0;C.cellPadding=3;C.cellSpacing=0;y.innerHTML=l[p];var F=document.createElement("img");F.src=pui.normalizeURL("/profoundui/proddata/images/menus/submenu-arrow.gif");F.style.position="absolute";F.style.right="3px";F.style.paddingTop="3px";F.Vo=true;y.appendChild(F);for(F=0;F<o.length;F++){var G=o[F],B=C.insertRow(F);B.style.color="#333333";B.style.padding="3px";B.style.cursor="pointer";B.onmouseover=
|
|
1136
|
-
function(
|
|
1137
|
-
"3px 6px 3px 3px";
|
|
1138
|
-
"Sans-serif";y.style.fontSize="12px";y.style.padding="3px";y.style.whiteSpace="normal"}}return l.length}var a=this,c,e,f,h=false;this.Rc=this.clickEvent=this.grid=null;this.init=function(){U(document,"mousedown",function(g){if(a!=null){for(g=
|
|
1137
|
+
function(E){E=wb(E).parentNode;if(E.tagName=="TD")E=E.parentNode;E.style.backgroundColor="#3399ff";E.style.color="#ffffff"};B.onmouseout=function(E){E=wb(E).parentNode;if(E.tagName=="TD")E=E.parentNode;E.style.backgroundColor="";E.style.color="#333333"};B.Fl=s.Fl;B.col=G;B.insertCell(0).innerHTML='<input type="checkbox" style="transform:scale(1.25); cursor:pointer;"'+(G.showing?"checked":"")+"/>";var D=B.insertCell(1);D.innerHTML=G.name;D.style.fontFamily="Sans-serif";D.style.fontSize="12px";D.style.padding=
|
|
1138
|
+
"3px 6px 3px 3px";D.style.whiteSpace="normal";B.style.top=(F+1)*25+"px";B.onmousedown=function(E){h=true;E=wb(E);var K=this.getElementsByTagName("input")[0],S=this.Fl(this.col);if(E.tagName!="INPUT"&&S)K.checked=K.checked?false:true}}s.onclick=function(){this.classList.add("active-item")};s.Qo=true;A.row=s;A.appendChild(C);A.className="pui-hide-show-columns-list";A.onmouseover=function(){h=true;a.lu()};A.onmouseout=function(){h=false};if(a.grid.c)A.ft=(F+1)*25;f=A;a.Ko()}else y.innerHTML=l[p];y.style.fontFamily=
|
|
1139
|
+
"Sans-serif";y.style.fontSize="12px";y.style.padding="3px";y.style.whiteSpace="normal"}}return l.length}var a=this,c,e,f,h=false;this.Rc=this.clickEvent=this.grid=null;this.init=function(){U(document,"mousedown",function(g){if(a!=null){for(g=wb(g);g!=null;){if(g==c)return;if(g==a.Rc)return;if(h)return;g=g.parentNode}a.hide()}});c=document.createElement("div");c.style.position="absolute";c.style.border="1px solid #718bb7";c.style.backgroundColor="#f0f0f0";c.style.zIndex=a.grid.Nr;c.onselectstart=pa(false);
|
|
1139
1140
|
c.oncontextmenu=pa(false);if(typeof c.style.MozUserSelect!="undefined")c.style.MozUserSelect="none";e=document.createElement("table");e.border=0;e.cellPadding=3;e.cellSpacing=0;e.style.width="175px";a.hide();c.appendChild(e);a.grid.b.appendChild(c)};this.show=function(){if(b()==0)a.hide();else{var g=0,l=0;if(a.toolbar!=null){g=a.toolbar.u.offsetLeft+119;l=a.toolbar.u.offsetTop+47;if(a.toolbar.u.offsetTop>a.sx.length*22-45)l=l-a.sx.length*22+1}if(a.clickEvent!=null){g=pui.zo(a.clickEvent);l=pui.ts(a.clickEvent);
|
|
1140
1141
|
var o=document.body.scrollWidth-185,n={x:0,y:0},r=a.grid.c.parentNode;if(R=="dspf")if(r.getAttribute("container")=="true"){n=pui.layout.tf(r);n.x+=pui.runtimeContainer.offsetLeft;n.y+=pui.runtimeContainer.offsetTop;var p=r.offsetLeft+r.offsetWidth;if(p>0&&(r.style.overflowX=="hidden"||r.style.overflow=="hidden")){o=p-185;p=r.parentNode;if(p!=null){if(p.scrollLeft>0)o+=p.scrollLeft;if(p.style.overflowY=="scroll"||p.style.overflowY=="auto")o-=10}}p=pui.getActiveContainer();if(p!=null&&p.Ac===true){n.x+=
|
|
1141
1142
|
p.offsetLeft;n.y+=p.offsetTop}if(f){r=r.getBoundingClientRect().height;f.Eo=r}}else{r=pui.Vc(r);n.x=r[0];n.y=r[1];if(f)f.Eo=window.innerHeight}else{r=pui.Vc(r);n.x=r[0];n.y=r[1]}l-=n.y;g-=n.x;if(g>o)g=o}c.style.left=g+"px";c.style.top=l+"px";c.style.display="";if(f){a.grid.b.appendChild(f);f.style.display="";f.style.top=l+f.row.offsetTop+"px";if(f.Eo&&f.ft){l=f.Eo;if(f.ft>l/2){f.style.height=l/2+"px";f.style.overflowY="scroll"}else{f.style.overflowY="initial";f.style.height="auto"}}if(c.offsetLeft===
|
|
@@ -1143,7 +1144,7 @@ o||g+c.offsetWidth>o){g=f.offsetWidth;f.style.left=c.offsetLeft-f.offsetWidth+"p
|
|
|
1143
1144
|
c=null;a.clickEvent=null;a=a.grid=null}}};pui.Km=function(b,a){this.wb=a;this.Zf=this.ar=null;if(b==null)b=document.body;this.$u=b;this.J=document.createElement("div");this.J.className="pui-find-filter";this.J.style.display="none";this.Dc=document.createElement("div");this.Dc.className="pui-find-filter-content";this.vc=document.createElement("input");this.vc.className="pui-find-filter-box";this.vc.addEventListener("input",this);this.vc.addEventListener("keydown",this);this.vc.addEventListener("blur",this);this.Dc.appendChild(this.vc);this.J.appendChild(this.Dc);
|
|
1144
1145
|
this.$u.appendChild(this.J);this.type=null;this.interval=100;this.Jf=null};
|
|
1145
1146
|
pui.Km.prototype.handleEvent=function(b){var a;this.Zf=b.target&&b.target.className==="qf"&&b.target.tagName==="INPUT"?b.target:null;switch(b.type){case "input":if(this.type=="pgfilter")return;if(typeof this.Jf==="function"){clearTimeout(this.ar);this.ar=setTimeout(this.jv,this.interval,this)}break;case "keydown":a=b.keyCode;if(a==13){if(this.type=="find"){if(typeof this.Jf==="function"){a=this.Zf?this.Zf.value:this.vc.value;this.Jf(a,true)}}else if(this.type=="filter"){this.wb.Y.text="";this.wb.getData();
|
|
1146
|
-
this.hide()}else if(this.type=="pgfilter")if(typeof this.Jf==="function"){a=this.Zf?this.Zf.value:this.vc.value;this.Jf(a)}
|
|
1147
|
+
this.hide()}else if(this.type=="pgfilter")if(typeof this.Jf==="function"){a=this.Zf?this.Zf.value:this.vc.value;this.Jf(a)}xb(b)}else if(a==27){this.wb.Y.text="";this.wb.getData();this.hide();xb(b)}break;case "blur":if(this.wb){if(this.wb.Y)this.wb.Y.text="";this.wb.getData&&this.wb.getData()}this.hide();break;case "focus":b.stopPropagation();b.preventDefault();b.target.className==="qf"&&this.wb.startFilter(b.target.parentNode);break}};wa=pui.Km.prototype;wa.show=function(){this.J.style.display=""};
|
|
1147
1148
|
wa.hide=function(){this.J.style.display="none"};function ae(b,a){var c=a.parentNode;if(c!=null){var e=c.parentNode;if(e!=null){var f,h;f=c.offsetLeft+a.offsetLeft;c=c.offsetTop-40;h=a.offsetWidth;var g=pui.getActiveContainer();if(g!=null&&g.Ac===true){f+=g.offsetLeft;c+=g.offsetTop}if(e.getAttribute("container")=="true"){e=pui.layout.tf(e);c+=e.y;f+=e.x}b.setPosition(f,c,h)}}}
|
|
1148
1149
|
wa.setPosition=function(b,a,c){if(c==null)c=200;var e=c-15;if(e<20)e=20;this.J.style.left=b+"px";this.J.style.top=a+"px";this.J.style.width=c+"px";this.vc.style.width=e+"px"};wa.focus=function(){this.vc.focus()};wa.clear=function(){this.vc.value=""};wa.setText=function(b){this.vc.value=b};wa.jv=function(b){if(b.wb&&b.wb.d&&b.wb.d.type=="sliding")b.wb.d.Lf=false;b.Jf(b.Zf?b.Zf.value:b.vc.value);if(b.wb&&b.wb.d&&b.wb.d.type=="sliding")b.wb.d.Lf=true};pui.Yh=function(){this.dataArray=[];this.X=[];this.aa=[];this.kd=false};pui.Yh.prototype=Object.create(pui.zd.prototype);function be(b,a,c,e){b=String(e);if(a.properties[c]!=b){if(pui.p(a.properties[c])){if(c=="top"||c=="left")a.properties[c].designValue=b}else a.properties[c]=b;a.ob[c]=true;a.hd=true;return a.designer.jd[a.designer.Ma.tb]=true}return false}
|
|
1149
1150
|
pui.ck=function(){function b(k,m){var q=d.dataArray;if(m&&d.isFiltered())q=d.X;var u=q[k-1];if(typeof d.gc!="undefined"&&d.gc===true||d.isFiltered()){u=null;for(var z=0;z<q.length;z++)if(q[z].o==k){u=q[z];break}}return u}function a(k){for(var m=null,q=0;q<d.aa.length;q++)if(k==d.aa[q]){m=q;break}return m}function c(k){var m=document.createElement("div");m.style.position="absolute";m.style.border="1px solid #0000ff";if(pui.is_old_ie&&pui.is_quirksmode){m.style.height="6px";m.style.width="6px";m.style.padding=
|
|
@@ -1159,11 +1160,11 @@ q},function(){return m})}function p(k){var m=null;if(d.Bi.length==0)return false
|
|
|
1159
1160
|
pc)}catch(z){if(z){console.log("Sort function error: ");console.error(z)}}if(d.c.eh==null&&d.c.ng==null){if(k!=null)Kc=k.w;pui.Ud={};if(!d.gc)for(var w=0;w<d.dataArray.length;w++)d.dataArray[w].o=w+1;for(w=0;w<d.dataArray.length;w++)d.dataArray[w].Dn=w;d.gc=true;K();var I="",H=null,J={},M=null,Y=function(Q){if(typeof Q.fieldName==="string")I=Q.fieldName.toUpperCase();if(Q.dateFormat)H=Q.dateFormat;if(Q.fs)J=Q.fs};if(k!=null)Y(k);else if(pc!==undefined||typeof pui.gridSort=="function"){M=[];for(w=
|
|
1160
1161
|
0;w<Sa.length;w++){Y(Sa[w]);M.push({fieldName:I,fieldDateFormat:H,fieldFormat:J})}}w=function(Q,X){function W(Ha,Ma,ya){ca=Q[Ha];ba=X[Ha];if(Ma=="zoned"||Ma=="floating"){ca=Number(ca);ba=Number(ba)}else if(Ma=="reference"){Ha=d.ref[ya];if(Ha!=null)if(Ha.dataType==7||Ha.dataType==9||Ha.dataType==10){ca=Number(ca);ba=Number(ba)}}else if(Ma=="graphic"){ca=pui.formatting.fh(ca);ba=pui.formatting.fh(ba)}}var ca,ba;if(k!=null)W(k.Tj,k.dataType,k.fieldName);else{for(var ha=false,va,Ia,ja=0;ja<Sa.length;ja++){var oa=
|
|
1161
1162
|
Sa[ja];W(oa.Tj,oa.dataType,oa.fieldName);if(pc!==undefined||typeof pui.gridSort=="function"){M[ja].value1=ca;M[ja].value2=ba}if(!ha&&ca!=ba){q=!oa.ra;va=ca;Ia=ba;ha=true}}if(q==null)q=true;if(va!=null)ca=va;if(Ia!=null)ba=Ia}return typeof u=="function"?ea(u,ca,ba,I,q,H,J,M):typeof pui.gridSort=="function"?ea(pui.gridSort,ca,ba,I,q,H,J,M):q&&ca<ba||!q&&ca>ba?-1:ca==ba?q&&Q.o<X.o||!q&&Q.o>X.o?-1:1:1};var ea=function(Q,X,W,ca,ba,ha,va,Ia){Q=Q(X,W,ca,ba,ha,va,Ia);if(typeof Q!="number")Q=0;if(Q>0)return ba?
|
|
1162
|
-
-1:1;if(Q<0)return ba?1:-1;return 0};d.dataArray.sort(w);d.isFiltered()&&d.X.sort(w);y();d.j=1;if(d.lm>0&&m)for(w=0;w<d.dataArray.length;w++)if(d.dataArray[w].o==d.lm){d.j=w+1;if(d.zt)d.qj=d.j;d.At||d.Du(d.j);break}d.d!=null&&d.d.type=="sliding"&&d.d.td(d.j);hd==false&&d.getData()}if(k!=null){q=!q;k.ra=q;G(k,q)}else{F();
|
|
1163
|
-
"sort")}}}function y(){for(var k=[],m=0;m<d.dataArray.length;m++)k[d.dataArray[m].Dn]=m;m=pui.Hb(d.Wa)+".";for(var q in pui.O)if(q.substr(0,m.length)==m)if(q.substr(m.length).split(".").length==2){var u=pui.O[q][0];u.Ub=k[u.Ub]}}function A(){function k(m,q){return m.o>q.o?1:-1}F();
|
|
1164
|
-
null&&d.Xb.hide();if(!(k==null&&Sa.length<1)){if(k!=null){var u=ab(k.w);Kc=k.w+u;q=k.ra;t(false);if(q==null)q=k.ra;q=!q;r(k.w,q);d.Cb=k.w+1+u+(q?" DESC":"")}else for(var z=d.Cb="",w=0;w<Sa.length;w++){q=Sa[w].ra;if(q==null)q=p(k.w);u=ab(Sa[w].w);d.Cb+=z+(Sa[w].w+1+u)+(q?" DESC":"");z=", "}d.gc=true;if(!m){d.d!=null&&d.d.type=="sliding"&&d.d.td(1);d.j=1;d.mask();d.Ib();d.getData()}if(k!=null){k.ra=q;G(k,q)}else{F();
|
|
1165
|
-
0){I={};I.multiSort=[];for(w=0;w<Sa.length;w++)I.multiSort.push({columnId:Sa[w].w,descending:Sa[w].ra})}P(I,"sort")}}}function F(){d.fc!=null&&d.fc.parentNode!=null&&d.fc.parentNode.removeChild(d.fc)}function G(k,m){
|
|
1166
|
-
"DIV")q=q.firstChild;q.appendChild(m)}function
|
|
1163
|
+
-1:1;if(Q<0)return ba?1:-1;return 0};d.dataArray.sort(w);d.isFiltered()&&d.X.sort(w);y();d.j=1;if(d.lm>0&&m)for(w=0;w<d.dataArray.length;w++)if(d.dataArray[w].o==d.lm){d.j=w+1;if(d.zt)d.qj=d.j;d.At||d.Du(d.j);break}d.d!=null&&d.d.type=="sliding"&&d.d.td(d.j);hd==false&&d.getData()}if(k!=null){q=!q;k.ra=q;G(k,q)}else{F();E()}if(Pa&&!m){Y={};if(k!=null){Y.columnId=k.w;Y.descending=k.ra}else if(Sa.length>0){Y.multiSort=[];for(w=0;w<Sa.length;w++)Y.multiSort.push({columnId:Sa[w].w,descending:Sa[w].ra})}P(Y,
|
|
1164
|
+
"sort")}}}function y(){for(var k=[],m=0;m<d.dataArray.length;m++)k[d.dataArray[m].Dn]=m;m=pui.Hb(d.Wa)+".";for(var q in pui.O)if(q.substr(0,m.length)==m)if(q.substr(m.length).split(".").length==2){var u=pui.O[q][0];u.Ub=k[u.Ub]}}function A(){function k(m,q){return m.o>q.o?1:-1}F();D();d.j=1;if(d.ea()&&d.wa==false){d.Cb="";d.mask();d.Ib()}else{d.dataArray.sort(k);d.isFiltered()&&d.X.sort(k);y()}d.d!=null&&d.d.type=="sliding"&&d.d.td(d.j);d.getData();d.clearState("sort")}function C(k,m){var q;d.Xb!=
|
|
1165
|
+
null&&d.Xb.hide();if(!(k==null&&Sa.length<1)){if(k!=null){var u=ab(k.w);Kc=k.w+u;q=k.ra;t(false);if(q==null)q=k.ra;q=!q;r(k.w,q);d.Cb=k.w+1+u+(q?" DESC":"")}else for(var z=d.Cb="",w=0;w<Sa.length;w++){q=Sa[w].ra;if(q==null)q=p(k.w);u=ab(Sa[w].w);d.Cb+=z+(Sa[w].w+1+u)+(q?" DESC":"");z=", "}d.gc=true;if(!m){d.d!=null&&d.d.type=="sliding"&&d.d.td(1);d.j=1;d.mask();d.Ib();d.getData()}if(k!=null){k.ra=q;G(k,q)}else{F();E()}if(Pa&&!m){if(k!=null){var I={};I.columnId=k.w;I.descending=k.ra}else if(Sa.length>
|
|
1166
|
+
0){I={};I.multiSort=[];for(w=0;w<Sa.length;w++)I.multiSort.push({columnId:Sa[w].w,descending:Sa[w].ra})}P(I,"sort")}}}function F(){d.fc!=null&&d.fc.parentNode!=null&&d.fc.parentNode.removeChild(d.fc)}function G(k,m){D();k.setAttribute("sortorder",0);if(d.fc==null)d.fc=document.createElement("div");else d.fc.parentNode!=null&&d.fc.parentNode.removeChild(d.fc);d.fc.className=m?"grid-sort-arrow-descending":"grid-sort-arrow-ascending";B(k,d.fc)}function B(k,m){var q=k;if(q.firstChild!=null&&q.firstChild.tagName==
|
|
1167
|
+
"DIV")q=q.firstChild;q.appendChild(m)}function D(){for(var k=0;k<d.cells[0].length;k++){var m=d.cells[0][k];m.removeAttribute("sortorder");if(m.Zc!=null)m.Zc.style.display="none"}}function E(){D();for(var k=0;k<Sa.length;k++){var m=Sa[k];m.setAttribute("sortorder",k);if(m.Zc==null){m.Zc=document.createElement("div");m.Zc.onclick=function(q){if(!pui.Be(q)){xb(q);d.ju()}};B(m,m.Zc)}m.Zc.className=m.ra===true?"grid-sort-arrow-descending":"grid-sort-arrow-ascending";m.Zc.style.display=""}}function K(){for(var k=
|
|
1167
1168
|
{},m=0;m<d.aa.length;m++)k[d.aa[m]]=m;var q=pui.Hb(d.Wa)+".";for(var u in pui.O)if(u.substr(0,q.length)==q){var z=u.substr(q.length).split(".");if(z.length==2){z=k[z[0]];if(z!=null){var w=pui.O[u][0];if(w!=null&&w.o!=null){var I;if(!d.gc&&w.Ub!=null)if(d.dataArray[w.Ub]&&d.dataArray[w.Ub].o!=undefined&&d.dataArray[w.Ub].o!==w.Ub)for(m=0;m<d.dataArray.length;m++){if(d.dataArray[m].o===w.o){I=d.dataArray[m];break}}else I=d.dataArray[w.Ub];else for(m=0;m<d.dataArray.length;m++)if(d.dataArray[m].o===
|
|
1168
1169
|
w.o){I=d.dataArray[m];break}if(I!=null){m=w.value;if(w.comboBoxWidget!=null)m=w.comboBoxWidget.getValue();if(w.l!=null)m=w.l.getValue();if(w.M!=null){m="";if(w.M.Kd&&w.M.Bh!=null)m=w.M.Bh;else if(!w.M.Kd&&w.M.Ah!=null)m=w.M.Ah}if(w.tagName=="INPUT"&&w.type=="checkbox")m=w.checked?w.checkedValue!=null&&w.checkedValue!=""?w.checkedValue:"1":w.uncheckedValue!=null&&w.uncheckedValue!=""?w.uncheckedValue:" ";if((w.isLoading==null||w.isLoading===false)&&w.modified===true){var H=w.N.value,J=w.N.revert;w.N.value=
|
|
1169
1170
|
m;w.N.revert=true;m=pui.tc.format(w.N);w.N.value=H;w.N.revert=J;if(typeof m=="object")m="";I[z]=m}}}}}}}function S(){var k=null;if(pui.zg()&&localStorage[d.Nb]!=null||pui.To()&&sessionStorage[d.Nb]!=null||lb&&pui.sj[d.Nb]!=null)try{k=kb==true?JSON.parse(sessionStorage[d.Nb]):lb==true?JSON.parse(pui.sj[d.Nb]):JSON.parse(localStorage[d.Nb])}catch(m){}if(d.Yd!=null&&d.Yd!="")try{k=JSON.parse(d.Yd)}catch(q){console.warn("Error parsing stored state: "+q)}else if(k!=null&&k!="")d.Yd=JSON.stringify(k);return k}
|
|
@@ -1173,32 +1174,32 @@ if(m!=null){d.h||(m-=1);pui.temporary_property=d.cells[m];eval("var rowCells = p
|
|
|
1173
1174
|
"16px";q.style.height="18px";q.style.fontSize="0px";q.style.overflow="hidden";q.style.backgroundImage="url('"+pui.normalizeURL("/profoundui/proddata/images/icons/")+k+".gif')";q.style.backgroundRepeat="no-repeat";q.style.cursor="pointer";q.style.zIndex=d.bx;q.title=m;q.style.color="white";q.style.padding="0px";q.onmousedown=function(u){designUtils.Ee(u)};d.b.appendChild(q);return q}function T(){if(d.designMode)if(fb!=null)if(aa!=null){var k=0,m=0;k=d.k.length;if(k>0){m=parseInt(d.k[k-1].style.left);
|
|
1174
1175
|
k=parseInt(d.k[k-1].style.top)-20}else{m=d.pc("left");k=d.pc("top")-20}fb.style.left=m+"px";fb.style.top=k+"px";k-=14;aa.style.left=m+"px";aa.style.top=k+"px";k=d.n.length;if(k>0){m=parseInt(d.n[k-1].style.left)-20;k=parseInt(d.n[k-1].style.top)+5}else{m=d.pc("left")-20;k=d.pc("top")+5}ga.style.left=m+"px";ga.style.top=k+"px";m-=14;qa.style.left=m+"px";qa.style.top=k+"px";m=d.pc("left")-2;k=d.pc("top")-2;xa.style.left=m+"px";xa.style.top=k+"px";m+=d.pc("width")-2;Oa.style.left=m+"px";Oa.style.top=
|
|
1175
1176
|
k+"px";k+=d.pc("height")+1;if(d.i.kg||d.i.wd||d.i.Oh||d.i.Ph||d.i.mm)k+=25;fa.style.left=m+"px";fa.style.top=k+"px";m=d.pc("left")-2;db.style.left=m+"px";db.style.top=k+"px"}}function L(k){if(k==null)return false;var m=false;if(k.selected==null)if(d.Bb!=null){if(d.$l==null)for(var q=0;q<d.aa.length;q++)if(pui.L(d.Bb.fieldName)==d.aa[q]){d.$l=q;break}if(d.$l!=null)if(k[d.$l]==d.Lh)k.selected=true}if(k.selected==true)m=true;return m}function Z(k,m,q){if(!(!d.designMode&&m!=true)){if(!d.designMode&&
|
|
1176
|
-
m==true)d.c.parentNode.onselectstart=N;if(q!=true&&k.style.cursor!="pointer")k.style.cursor="default";U(k,"mousedown",v)}}function N(k){if(d&&d.dragging){
|
|
1177
|
-
Sb.style.borderColor="transparent";u.parentNode.parentNode.appendChild(Sb);Sb.appendChild(
|
|
1177
|
+
m==true)d.c.parentNode.onselectstart=N;if(q!=true&&k.style.cursor!="pointer")k.style.cursor="default";U(k,"mousedown",v)}}function N(k){if(d&&d.dragging){xb(k);return false}}function v(k){function m(Q){Q=pui.rg(Q);var X=Q.y-H,W=Q.x-I;if(R=="dspf"&&d.designMode){X=Math.round(X*Ib.Em);W=Math.round(W*Ib.Em)}if(d.h&&u.row==0){if(vb==null){vb=u.cloneNode(true);vb.style.position="absolute";vb.style.border="1px solid #999999";vb.style.zIndex=d.ht;Sb=document.createElement("div");Sb.className=d.c.className;
|
|
1178
|
+
Sb.style.borderColor="transparent";u.parentNode.parentNode.appendChild(Sb);Sb.appendChild(vb);vb.style.display="none";setTimeout(function(){if(vb!=null)vb.style.display=""},150)}vb.style.top=d.c.Da+X+"px";var ca=parseInt(u.style.left);if(isNaN(ca))ca=u.getBoundingClientRect().left;vb.style.left=d.c.gb+ca+W+"px";var ba=null;if(X>-25&&X<parseInt(d.c.style.height))for(ca=0;ca<d.n.length;ca++){var ha=d.n[ca],va=parseInt(ha.style.left),Ia=Q.x;if(d.designMode&&R=="dspf")va=Math.round(va*Ib.Xh);Ia-=J.x;
|
|
1178
1179
|
if(Math.abs(va-Ia)<15){if(Va!=null&&Va.parentNode!=ha.parentNode){Va.parentNode.removeChild(Va);Va=null}if(Va==null){Va=document.createElement("img");Va.src=pui.normalizeURL("/profoundui/proddata/images/grids/column-pointer.gif");Va.style.position="absolute";Va.style.zIndex=d.ht+1;d.designMode?Ib.designer.b.appendChild(Va):document.body.appendChild(Va)}Q=parseInt(ha.style.top)-10;ha=parseInt(ha.style.left)-4;Q+=ea.y;ha+=ea.x;Va.style.display="";Va.style.top=Q+"px";Va.style.left=ha+"px";ba=ca;Va.pl=
|
|
1179
|
-
ba;break}}if(ba==null&&Va!=null){Va.style.display="none";Va.pl=null}}else{ca=d.c.e;if(ca!=null){pui.designer.NA(Q.x,Q.y,ca.designer);Q=ca.designer.selection;if(Q.qu){W+=d.c.gb;X+=d.c.Da;W=Q.Rj(W,pui.ul);X=Q.Rj(X,pui.vl,R=="genie"?3:0);W-=d.c.gb;X-=d.c.Da}}d.Hc(function(ja){ja.style.top=ja.Da+X+"px";ja.style.left=ja.gb+W+"px"});if(ca!=null)ca.moved=true;d.setScrollBar();Q=pui.designer.uj;if(Q.b==null){Q.b=document.body;Q.init()}Q.set(d.c.e);Q.show()}}function q(){d.dragging=false;if(
|
|
1180
|
-
Sb.parentNode.removeChild(Sb);Sb=
|
|
1180
|
+
ba;break}}if(ba==null&&Va!=null){Va.style.display="none";Va.pl=null}}else{ca=d.c.e;if(ca!=null){pui.designer.NA(Q.x,Q.y,ca.designer);Q=ca.designer.selection;if(Q.qu){W+=d.c.gb;X+=d.c.Da;W=Q.Rj(W,pui.ul);X=Q.Rj(X,pui.vl,R=="genie"?3:0);W-=d.c.gb;X-=d.c.Da}}d.Hc(function(ja){ja.style.top=ja.Da+X+"px";ja.style.left=ja.gb+W+"px"});if(ca!=null)ca.moved=true;d.setScrollBar();Q=pui.designer.uj;if(Q.b==null){Q.b=document.body;Q.init()}Q.set(d.c.e);Q.show()}}function q(){d.dragging=false;if(vb!=null){vb.parentNode.removeChild(vb);
|
|
1181
|
+
Sb.parentNode.removeChild(Sb);Sb=vb=null}var Q=false;if(Va!=null){Va.style.display="none";if(Va.pl!=null){var X=d.c.e;X!=null&&X.designer.ca.nn("Move Column",X.designer);d.moveColumn(u.col,Va.pl);if(d.ma){var W=d.ga.map(function(ha){if(ha.showing){var va=Da(ha.columnId);ha.currentColumn=va;ha.savedColumn=va}else ha.currentColumn=-1;return ha}),ca=[];d.cells[0].forEach(function(ha){ca.push(ha.w)});W.yi=ca;d.ga=W}Q=true;Va.pl=null;if(Pa){if(!ca){ca=[];for(X=0;X<d.cells[0].length;X++)ca.push(d.cells[0][X].w)}P(ca,
|
|
1181
1182
|
"colSequence");if(d.ma){if(X=g())if(X=X.hidableColState){X.cols=W;X.headings=d.columnHeadings}else X={cols:W,headings:d.columnHeadings};else X={cols:W,headings:d.columnHeadings};var ba=d.sf().split(",").map(function(ha){return Number(ha)});P(X,"hidableColState");P(ba,"colWidths");d.ga=W}}}}if(d.designMode){X=d.c.e;if(X!=null)if(X.moved){Q=X.designer;if(Q.Zr!=null)d.vx();else{z&&Q.Ge.style.display==""&&d.wx();Q.mn();d.Wb();R=="dspf"&&pui.ide.refreshRibbon()}}else Q||d.c.e.designer.ca.fy();d.dc();Q=
|
|
1182
1183
|
pui.designer.uj;Q!=null&&Q.b!=null&&Q.hide();designUtils.mA(d.c.e.designer)}bc(document,"mousemove",m);bc(document,"mouseup",q)}for(var u=k.target;u!=null&&u.row==null;)u=u.parentNode;if(u==null||u.row==null)return false;var z=R=="dspf"&&d.c.parentNode.getAttribute("container")=="true",w=pui.rg(k),I=w.x,H=w.y;if(d.designMode){d.c.e.designer.Io();R=="dspf"&&Ext.menu.MenuMgr.hideAll();d.Le();if(pui.Be(k)){if(d.c.e){d.c.e.designer.Sw.hide();d.c.e.designer.Ly(k)}designUtils.Ee(k);k.stopPropagation&&k.stopPropagation();
|
|
1183
1184
|
return false}d.c.e!=null&&d.c.e.designer.Kp!=null&&d.c.e.designer.Kp.hide();if(d.Df){designUtils.Ee(k);return}d.c.e.Uy.left=d.c.style.left;d.c.e.Uy.top=d.c.style.top;designUtils.nA(d.c.e.designer,false,z,false,true,I,H,d.c.e)}else d.Xb!=null&&!pui.Be(k)&&d.Xb.hide();d.dragging=true;d.Hc(function(Q){Q.gb=pui.Vd(Q.style.left);Q.Da=pui.Vd(Q.style.top)});var J={x:0,y:0};if(d.designMode){w=pui.Vc(d.c.e.designer.b,true);J.x+=w[0]}else{w=pui.runtimeContainer.getBoundingClientRect();if(typeof window.pageXOffset==
|
|
1184
1185
|
"number"){J.x=w.left+window.pageXOffset;J.y=w.top+window.pageYOffset}else{J.x=w.left+document.documentElement.scrollLeft;J.y=w.top+document.documentElement.scrollTop}w=d.c.parentNode;var M=pui.getActiveContainer();if(w.Ac==true){J.x+=parseInt(w.style.left);J.y+=parseInt(w.style.top)}else if(M!=null&&M.Ac===true){J.x+=M.offsetLeft;J.y+=M.offsetTop}}if(z){var Y=pui.layout.tf(d.c.parentNode);J.x+=Y.x;J.y+=Y.y}var ea={x:0,y:0};if(d.designMode){if(z)ea=Y}else{ea.y=J.y;ea.x=J.x}U(document,"mousemove",m);
|
|
1185
|
-
U(document,"mouseup",q);
|
|
1186
|
+
U(document,"mouseup",q);xb(k);if(d.designMode&&d.c.e!=null){d.c.e.moved=false;k=d.c.e.designer;Y=k.selection;w="Move Selection";if(Y.Sd.length==1)w="Move Grid";if(!(d.h&&u.row==0)){k.ca.start(w);k.ca.jp=true;Y.pn(["left","top","parent tab panel","parent tab panel"]);k.ca.jp=false}}}function V(k,m){for(var q=[],u=k.firstChild;u!=null;){u.style.position=="absolute"&&!u.Uo&&q.push(u);u=u.nextSibling}m.innerHTML="";for(var z=0;z<q.length;z++){u=q[z];u.parentNode.removeChild(u);m.appendChild(u)}}function La(k,
|
|
1186
1187
|
m,q,u){if(d.designMode||u){var z=k[m];if(d.borderWidth!==null&&d.borderWidth<ma){z.style.borderWidth="2px";if(!q)z.style.width=parseInt(z.style.width)+2+"px"}if(!q)z.style.borderTopStyle=sa;if(q)z.style.borderRightStyle=sa;if(q)z.style.cursor="w-resize";if(!q)k[m].style.cursor="n-resize";d.Le();U(z,"mousedown",function(w){function I(W){var ca=pui.rg(W);W=ca.y-Y;ca=ca.x-M;if(R=="dspf"&&d.designMode){W=Math.round(W*Ib.Em);ca=Math.round(ca*Ib.Em)}ra(ca,W,m,q,Q,ea);if(!q&&m==k.length-1&&k.length>2&&d.d!=
|
|
1187
1188
|
null&&d.d.type=="sliding"){W=W;if(W<-d.la+5)W=-d.la+5;typeof d.d.al=="function"&&d.d.al(W)}d.designMode?J.set(d.c.e):d.alignColumnTotals()}function H(){z.dragging=false;d.dragging=false;var W=d.borderWidth;if(W===null||W<ma)W=ma;z.style.borderWidth=W+"px";z.style.borderColor=d.borderColor;if(!q)z.style.borderTopStyle=sa;if(q)z.style.borderRightStyle=sa;if(!q&&m==k.length-1&&(m>=2||d.h&&m==1)){W=parseInt(z.style.top);if(d.cells.length>(d.h?2:1)){d.yj();if(W>parseInt(k[k.length-1].style.top)+d.la-3){for(var ca=
|
|
1188
1189
|
false;parseInt(k[k.length-1].style.top)<W;){d.af();ca=true}ca&&d.zh()}}else d.la=parseInt(k[k.length-1].style.top)-parseInt(k[k.length-2].style.top)}if(d.designMode){d.Wb();d.dc();J.hide()}else{d.alignColumnTotals();if(q&&Pa){if(d.ma)W=d.sf().split(",").map(function(ha){return Number(ha)});else{W=Array(d.cells[0].length);for(ca=0;ca<d.cells[0].length;ca++){var ba=d.cells[0][ca];W[ba.w]=ba.clientWidth}}P(W,"colWidths")}}bc(document,"mousemove",I);bc(document,"mouseup",H)}if(d.designMode){var J=pui.designer.uj;
|
|
1189
1190
|
if(J.b==null){J.b=document.body;J.init()}J.set(d.c.e);if(m==0||m==k.length-1)J.show()}if(d.designMode){d.c.e.designer.Io();if(d.Df){designUtils.Ee(w);return}}else d.Xb!=null&&d.Xb.hide();z.dragging=true;d.dragging=true;var M=$c(w),Y=ad(w),ea=parseInt(z.style.left),Q=parseInt(z.style.top);d.Le();var X=3;if(d.borderWidth>3)X=d.borderWidth;z.style.borderWidth=X+"px";z.style.borderColor="#333333";if(!q)z.style.borderTopStyle="solid";if(q)z.style.borderRightStyle="solid";U(document,"mousemove",I);U(document,
|
|
1190
|
-
"mouseup",H);
|
|
1191
|
+
"mouseup",H);xb(w);if(d.designMode){w=d.c.e.designer;q&&w.ca.start("Size Grid Column");q||w.ca.start("Size Grid Rows");w.selection.pn(["left","top","number of rows","row height","header height","column widths"])}});U(z,"mouseover",function(){if(!d.dragging){var w=3;if(d.borderWidth>3)w=d.borderWidth;z.style.borderWidth=w+"px";z.style.borderColor="#333333";if(!q)z.style.borderTopStyle="solid";if(q)z.style.borderRightStyle="solid"}});U(z,"mouseout",function(){if(!z.dragging){var w=d.borderWidth;if(w===
|
|
1191
1192
|
null||w<ma)w=ma;z.style.borderWidth=w+"px";z.style.borderColor=d.borderColor;if(!q)z.style.borderTopStyle=sa;if(q)z.style.borderRightStyle=sa}})}}function ra(k,m,q,u,z,w){var I=pui["grid column resize style"]!=="simple";if(d.kd)I=false;var H;H=u?d.n:d.k;var J=H[q];if(u)m=0;u||(k=0);m=z+m;k=w+k;if(u){if(q>0&&k<parseInt(H[q-1].style.left)+5)k=parseInt(H[q-1].style.left)+5;if(q<H.length-1&&k>parseInt(H[q+1].style.left)-5)k=parseInt(H[q+1].style.left)-5}if(!u){if(q>0&&m<parseInt(H[q-1].style.top)+5)m=
|
|
1192
1193
|
parseInt(H[q-1].style.top)+5;if(q<H.length-1&&m>parseInt(H[q+1].style.top)-6)m=parseInt(H[q+1].style.top)-6}if(!u)J.style.top=m+"px";if(u){if(I&&q!=0){z=k-J.offsetLeft;for(w=q+1;w<H.length;w++){var M=H[w];M.style.left=M.offsetLeft+z+"px"}}J.style.left=k+"px"}if(!u&&(q!=0||!d.h)&&q!=H.length-1){d.la=q<H.length-1?parseInt(H[q+1].style.top)-parseInt(H[q].style.top):parseInt(H[q].style.top)-parseInt(H[q-1].style.top);J=m;for(w=q+1;w<H.length;w++){J+=d.la;H[w].style.top=J+"px"}J=m;m=0;if(d.h)m=1;for(w=
|
|
1193
1194
|
q-1;w>=m;w-=1){J-=d.la;H[w].style.top=J+"px"}if(d.h)H[0].style.top=parseInt(H[1].style.top)-d.bb+"px"}if(!u&&q==0&&d.h&&H.length>1)d.bb=parseInt(H[1].style.top)-parseInt(H[0].style.top);if(!u&&q==1&&!d.h&&H.length==2)d.la=parseInt(H[q].style.top)-parseInt(H[q-1].style.top);if(q==0&&u){d.c.style.left=k+"px";for(J=0;J<d.k.length;J++)d.k[J].style.left=d.c.style.left}if(u&&(H.length-1==q||q==0))Ga();else I&&u&&Ga();if(!u){ua();Fa()}if(u&&d.h)d.ma?d.ec(d.ss(d.ga)):d.ec();d.La();T();d.setScrollBar()}function ua(){d.c.style.top=
|
|
1194
1195
|
d.k[0].style.top;for(var k=0;k<d.n.length;k++)d.n[k].style.top=d.c.style.top}function Ga(){var k=0;if(d.n.length>0){k=d.borderWidth;if(k===null||k<ma&&d.designMode)k=ma;k=parseInt(d.n[d.n.length-1].style.left)-d.pc("left")+k}for(var m=0;m<d.k.length;m++)d.k[m].style.width=k+"px";d.c.style.width=k+"px";if(Pa&&d.ea()&&d.dataProps["load all rows"]=="true"&&jb.style.display=="block"){d.mask();d.Ib()}}function Fa(){var k=0;if(d.k.length>0)k=parseInt(d.k[d.k.length-1].style.top)-d.pc("top");for(var m=0;m<
|
|
1195
1196
|
d.n.length;m++)d.n[m].style.height=k+"px";d.c.style.height=k+"px"}function bb(k,m){var q=document.createElement("div");d.c.appendChild(q);if(!pui.pa&&d.Cr!="default")q.style.cursor=d.Cr;if(k>0||!d.h)q.style.iz="rgba(0,0,0,0)";var u=k==0&&d.h,z=k%2==1;if(d.h)z=!z;if(u)if(m<d.columnHeadings.length)q.innerHTML="<div"+(d.Oc?' class="qf"':"")+' style="'+e()+'">'+d.columnHeadings[m]+"</div>";d.designMode&&hb(q,u,z,m);q.onmouseover=function(w){if(!d.dragging){d.h||O("onrowmouseover",k+1,null,w,m);d.h&&k!=
|
|
1196
1197
|
0&&O("onrowmouseover",k,null,w,m);if(d.Mo)if(!(pui.is_touch&&!pui.is_mouse_capable&&!d.designMode||pui.pa))if(!(k==0&&d.h)){w=d.cells[k];var I=ee(d,k);d.$c(k,true,I);if(d.ou&&!d.expanded&&(k>0||!d.h)){w=w[0];if(d.Eb==null){d.Eb=document.createElement("img");d.Eb.setAttribute("isZoomIcon","true");d.Eb.src=pui.normalizeURL("/profoundui/proddata/images/icons/zoom_in.png");d.Eb.style.position="absolute";d.Eb.style.top="6px";d.Eb.style.left="3px";if(!pui.pa)d.Eb.style.cursor="pointer"}if(d.Eb.parentNode!=
|
|
1197
|
-
w){d.Eb.parentNode!=null&&d.Eb.parentNode.removeChild(d.Eb);w.appendChild(d.Eb)}d.Eb.style.display="";d.Eb.onclick=function(H){d.rowZoom(d.cells[k]);
|
|
1198
|
+
w){d.Eb.parentNode!=null&&d.Eb.parentNode.removeChild(d.Eb);w.appendChild(d.Eb)}d.Eb.style.display="";d.Eb.onclick=function(H){d.rowZoom(d.cells[k]);xb(H)}}}}};q.onmouseout=function(w){d.h||O("onrowmouseout",k+1,null,w,m);d.h&&k!=0&&O("onrowmouseout",k,null,w,m);if(!(k==0&&d.h)){w=ee(d,k);d.$c(k,false,w)}};q.onmousedown=function(w){if(pui.Be(w))if(!d.designMode){var I=function(W){if(!W)W=window.event;W.preventDefault&&W.preventDefault();W.stopPropagation&&W.stopPropagation();W.cancelBubble=true;W.returnValue=
|
|
1198
1199
|
false;document.body.oncontextmenu=null;return false};if(d.h&&k==0){if(d.Xb==null){d.Xb=new pui.Mu;d.Xb.grid=d;d.Xb.init()}d.Xb.Rc=q;d.Xb.clickEvent=w?w:window.event;d.Xb.show();document.body.oncontextmenu=I}else{var H;if(d.Fd)H=Db(d.Fd);if(H!=null){H.Qj=true;document.body.oncontextmenu=I;q.onclick(w);if(w.Lw&&w.Lw()||w.cancelBubble){H.Qj=false;d.Oi()}else{I=pui.zo(w);var J=pui.ts(w),M={x:0,y:0},Y=pui.Vc(pui.runtimeContainer);if(R=="genie")Y=pui.Vc(pui.getActiveContainer());var ea=H.parentNode;if(ea!=
|
|
1199
1200
|
null&&ea.tagName=="FORM")ea=ea.parentNode;if(ea!=null){if(R=="dspf"&&ea.getAttribute("container")=="true"){var Q=pui.Vc(ea);M.x=Q[0];M.y=Q[1]}else if(ea.Ac){M.x=ea.offsetLeft;M.y=ea.offsetTop}M.x+=Y[0];M.y+=Y[1];I-=M.x;J-=M.y}if(pui.is_touch&&!pui.is_mouse_capable){I-=H.clientWidth/2;H.onselectstart=pa(false);if(typeof H.style.MozUserSelect!="undefined")H.style.MozUserSelect="none";if(typeof H.style.webkitUserSelect!="undefined")H.style.webkitUserSelect="none"}H.style.zIndex=d.Nr;if(typeof H.onoptiondisplay==
|
|
1200
1201
|
"function"){M=k;d.h||(M+=1);if(d.j!=null&&!isNaN(d.j)&&d.j>0){M=M;M+=d.j-1;Q=M;var X=d.dataArray;if(d.isFiltered())X=d.X;if(X[M-1]!=null&&X[M-1].o!=null)M=X[M-1].o;H.onoptiondisplay(M,M,Q,m,d);H.v.z()}}H.style.visibility="";H.style.display="";Q=document.documentElement;M=document.documentElement.clientWidth+((window.pageXOffset||Q.scrollLeft)-(Q.clientLeft||0))-H.clientWidth-10-Y[0];Y=document.documentElement.clientHeight+((window.pageYOffset||Q.scrollTop)-(Q.clientTop||0))-H.clientHeight-10-Y[1];
|
|
1201
|
-
if(ea!=null&&R=="dspf"&&ea.getAttribute("container")=="true"){M=ea.offsetWidth-H.clientWidth;Y=ea.offsetHeight-H.clientHeight}if(I>M)I=M;if(J>Y)J=Y;if(I<0)I=0;if(J<0)J=0;H.style.left=I+"px";H.style.top=J+"px";
|
|
1202
|
+
if(ea!=null&&R=="dspf"&&ea.getAttribute("container")=="true"){M=ea.offsetWidth-H.clientWidth;Y=ea.offsetHeight-H.clientHeight}if(I>M)I=M;if(J>Y)J=Y;if(I<0)I=0;if(J<0)J=0;H.style.left=I+"px";H.style.top=J+"px";xb(w);w!=null&&w.stopPropagation!=null&&w.stopPropagation();setTimeout(function(){H.Qj=false},250);return false}}}}};pui.Zy(q,function(w){w.button=3;q.onmousedown(w)});q.onclick=function(w){var I=wb(w);if(!I.cw){d.Np=k;d.Pn=m;d["row clicked"]=d.Np;d["column clicked"]=d.Pn;var H=pui.Be(w);if(I.tagName!=
|
|
1202
1203
|
"INPUT"&&I.tagName!="SELECT"&&I.tagName!="OPTION"&&I.tagName!="BUTTON"){d.h||O("onrowclick",k+1,H,w,m);d.h&&k!=0&&O("onrowclick",k,H,w,m)}if(!d.designMode){d.fm(k);var J=(I.tagName=="INPUT"||I.tagName=="SELECT"||I.tagName=="BUTTON")&&!I.disabled&&!I.readOnly,M=d.h?1:0;if(d.Wd&&!J&&(k>0||!d.h))if(d.j!=null&&!isNaN(d.j)&&d.j>0){var Y=d.k.length-1;if(d.singleSelection||d.Di&&!w.ctrlKey&&!w.shiftKey&&!w.metaKey){var ea=k+d.j-(d.h?1:0);for(J=0;J<d.dataArray.length;J++){var Q=J-d.j+1+M,X=ea<=d.dataArray.length&&
|
|
1203
1204
|
d.dataArray[ea-1].selected;if(d.isFiltered())X=ea<=d.X.length&&d.X[ea-1].selected;if(!H||!X)if(!w.ctrlKey&&!w.metaKey||Q!=k)d.dataArray[J].selected==true&&Ca(d.dataArray[J],false,J);Q>=M&&Q<Y&&d.Lb==0&&d.$c(Q)}if(d.isFiltered()||d.Lb>0)fe(d)}ea=d.isFiltered()?d.X:d.dataArray;var W=k+d.j-1+(d.h?0:1);d.Lb>0&&d.j>0&&ge(d,null,k,function(ha){W=ha+1});if(d.Di&&w.shiftKey){if(d.Kh==null)d.Kh=W;H=d.Kh;var ca=W;if(H>ca){J=H;H=ca;ca=J}for(J=0;J<ea.length;J++){Q=J-d.j+1;if(J+1>=H&&J+1<=ca)ea[J].selected!=true&&
|
|
1204
1205
|
Ca(ea[J],true,J);else ea[J].selected==true&&Ca(ea[J],false,J);Q>=M&&Q<Y&&d.Lb==0&&d.$c(Q)}d.Lb>0&&fe(d)}else if(ea[W-1]!=null&&ea[W-1].length>0){ea[W-1].selected==true&&!H?Ca(ea[W-1],false,W-1,true):Ca(ea[W-1],true,W-1,true);if(d.Lb>0)ca=ee(d,k);d.$c(k,true,ca)}d.Kh=W}if(d.C.length>0&&d.C[0].id=="_msgsfltext"){M=d.cells[k][0];var ba;if(M!=null)ba=M.firstChild;ba!=null&&I!=ba&&ba.onclick!=null&&typeof ba.onclick=="function"&&ba.onclick()}M=I;if((J=I.parentNode)&&J.row&&J.col)M=J;if(M.row!=null&&M.col!=
|
|
@@ -1213,22 +1214,22 @@ else if(d.gf[z]!=null)w=d.gf[z]}try{k.style[q]=w}catch(H){}}}function hb(k,m,q,u
|
|
|
1213
1214
|
"text transform");na(k,u,"wordSpacing","word spacing");var z=d.designMode&&d.I["row font color"]!=null&&d.I["row font color"]!=""&&!pui.p(d.I["row font color"]),w=d.designMode&&d.I["row background"]!=null&&d.I["row background"]!=""&&!pui.p(d.I["row background"]);na(k,u,"color",m?"header font color":z?"row font color":q?"even row font color":"odd row font color");na(k,u,"backgroundColor",m?"header background":w?"row background":q?"even row background":"odd row background");u="";if(m){m=d.I["header image"];
|
|
1214
1215
|
if(m!=null&&m!=""){k.style.backgroundImage="url('"+pui.normalizeURL(m,true)+"')";k.style.backgroundRepeat="repeat-x"}else{k.style.backgroundImage="";k.style.backgroundRepeat=""}u="cell header-cell"}else{k.style.backgroundImage="";k.style.backgroundRepeat="";u="cell";u+=q?" even":" odd"}k.className=u}function ta(k,m){var q=d.cells[k],u=false;if(d.n.length-2==m)u=true;if(k==0&&d.h)u=false;q=q[m];q.style.top=parseInt(d.k[k].style.top)-d.pc("top")+"px";q.style.left=parseInt(d.n[m].style.left)-d.pc("left")+
|
|
1215
1216
|
"px";q.style.height=parseInt(d.k[k+1].style.top)-parseInt(d.k[k].style.top)+"px";var z=parseInt(d.n[m+1].style.left)-parseInt(d.n[m].style.left);if(u&&(d.Kf||d.Cc))pui.is_touch&&!pui.is_mouse_capable&&!d.designMode||pui.pa||d.h&&d.cells.length==2||!d.h&&d.cells.length==1||(z-=16);if(z<0)z=0;q.style.width=z+"px"}function Ua(k,m,q,u,z,w,I){if(m==null)m=99;if(q==null)q=1;var H=null;if(pui.secLevel>0){H=pui.ld(d.dataProps);d.Lc="";if(d.isFiltered()&&d.dataProps["load all rows"]!="true")for(var J=d.cells[0],
|
|
1216
|
-
M=0,Y=0;Y<J.length;Y++){var ea=J[Y];if(ea.w>=0&&ea.sa!=null){var Q=
|
|
1217
|
-
|
|
1218
|
-
"&order=
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
m.push(z.toUpperCase())}}return m}pui.Yh.call(this);if(pui.designer.Ku!=null){this.mg=new pui.designer.Ku;this.mg.Ew=true}else{this.mg={};this.mg.Ew=true;this.mg.mz=la();this.mg.xA=la();this.mg.uA=la();this.mg.wA=la()}this.xi=true;this.C=[];this.wa=false;this.ref={};this.Wa="";this.n=[];this.k=[];this.c=null;this.Xc="";this.cells=[];this.b=null;this.borderColor="";this.borderWidth=null;this.Cr="default";this.Qp="row number";this.Vr=75;this.la=
|
|
1225
|
-
false;this.Cb=null;this.Lb=0;this.Mo=false;if(R=="dspf"||pui.fa)this.Mo=true;this.Kf=true;this.Cc=false;if(R=="dspf"||pui.fa){this.Kf=false;this.Cc=true}this.yh=100;this.Pn=this.Np=0;this.Pe=this.su=false;this.i=new pui.bi;this.visibility="";this.columnHeadings=[];this.ga=[];this.oq={};this.EA=null;this.I={};this.I["font family"]="Verdana";this.I["font size"]="13px";this.I["text align"]="center";this.I["header font color"]="#ffffff";this.I["header background"]=
|
|
1226
|
-
this.I["header font weight"]="bold";this.I["header font style"]="normal";this.I["row font color"]="";this.I["row background"]="";this.I["odd row font color"]="#555555";if(R=="genie")this.I["odd row font color"]="";this.I["odd row background"]="#efefef";this.I["even row font color"]="#555555";if(R=="genie")this.I["even row font color"]="";this.I["even row background"]="#fcfcfc";this.I["hover font color"]="#555555";this.I["hover background"]="#dfe8f6";this.I["hover image"]=
|
|
1227
|
-
"#ffffff";this.I["selection background"]="#6699cc";this.I["selection image"]="";this.gf={};for(var tb in this.I)this.gf[tb]=this.I[tb];this.dataProps={};this.kj={};this.po={};this.io=this.dragging=this.Df=this.designMode=false;this.Uw=96;this.sy=this.hz=97;this.bx=99;this.Nr=100;this.qy=701;this.ht=702;this.cs=this.totalRecs=this.d=null;this.Ot=this.ma=this.sl=this.zw=this.Gi=this.so=this.nf=this.Pk=false;this.qo=null;this.Di=this.singleSelection=this.Wd=this.fo=
|
|
1228
|
-
null;this.ug=this.Cu=false;this.Qe=this.Sf=null;this.vm="_____puiButtonToggleTreeLevel";this.$l=this.Wk=this.kl=null;this.Lh="1";this.Kh=null;this.pf=20;this.se=3;this.Aj=this.zj=this.Cj=this.Bj=this.og=null;this.expanded=true;this.cl=this.bl=null;this.oc=1;this.ou=false;this.qj=this.ro=null;this.Bi=[];this.yg=this.Pi=this.Nf=this.Ei=this.On=this.Qi=this.zf=null;this.Qs=[];this.Fd=null;this.Tr=false;this.No=1;this.$a=new pui.Km(pui.runtimeContainer,this);this.Qk=
|
|
1229
|
-
false;this.ms=Da;this.Zt=false;this.Yd=this.Nb=null;this.qv=ua;this.pv=Fa;this.lv=T;this.sc=this.At=this.zt=this.Vs=false;var d=this,fb,aa,ga,qa,xa,Oa,db,fa,ma=1,sa="solid",Pa=false,kb=false,lb=false,Qa=false,ld=false,Jc,Kc,pc,
|
|
1230
|
-
for(k=0;k<d.cells.length;k++)for(var m=0;m<d.cells[k].length;m++)Z(d.cells[k][m]);if(fb==null){fb=da("plus","Add New Row");fb.onclick=function(){var q=d.c.e;q.designer.ca.start("Add Grid Row");q.designer.ca.add(q,"number of rows");d.af();d.zh();d.Wb();d.Le()}}if(aa==null){aa=da("minus","Remove Row");aa.onclick=function(){if(d.cells.length>(d.h?2:1)){var q=d.c.e;q.designer.ca.start("Remove Grid Row");q.designer.ca.add(q,"number of rows");d.yj();d.Wb();d.Le()}}}if(ga==
|
|
1231
|
-
ga.onclick=function(){var q=d.c.e;if(q.properties["number of columns"]>d.yh)pui.alert("Maximum number of columns reached.");else{q.designer.ca.start("Add Grid Column");q.designer.ca.add(q,"column widths");q.designer.ca.add(q,"number of columns");d.ln();d.La();d.Wb();d.Le()}}}if(qa==null){qa=da("minus","Remove Column");qa.onclick=function(){var q=d.n.length-2;if(!(q<1))if(d.Ho(q)){q=d.zx(q);q!=null&&pui.alert("The column cannot be removed because it contains other elements that must be removed first.\n\nTo remove column elements, go to the Elements tab. Then, search the element list for the ID(s) listed below:\n"+
|
|
1217
|
+
M=0,Y=0;Y<J.length;Y++){var ea=J[Y];if(ea.w>=0&&ea.sa!=null){var Q=ab(ea.w);d.Lc+="&fltrcol"+String(M)+"="+(ea.w+1+Q);d.Lc+=d.Ct(String(M),ea.sa);H+=d.Lc;M++}}if(rc!=null&&sc!=null){H+="&findcol="+rc;H+="&findval="+encodeURIComponent(sc)}if(d.dataProps["data url"]!=null&&d.dataProps["data url"]!=""&&d.Cb!=null)H+="&order="+d.Cb}if(I){if(pui.Oa==null)pui.Oa={};if(pui.Oa[q]==null)pui.Oa[q]={};if(pui.Oa[q].sql===k&&pui.Oa[q].Sx===H&&pui.Oa[q].ml===m&&pui.Oa[q].hw===w){d.unMask();if(u!=null){u(pui.Oa[q].results,
|
|
1218
|
+
pui.Oa[q].totalRecs,pui.Oa[q].matchRow);return}else return pui.Oa.results}}var X=null;J=Xb("PUI0009102.PGM");if(w)J=pui.df(w);J=new pui.Ajax(J);J.method="post";J.async=true;if(u==null)J.async=false;if(pui.ba)J.postData="AUTH="+pui.ba;else{J.postData="AUTH="+pui.appJob.auth;if(typeof pui.vId!=="undefined")J.postData+="&VID="+pui.vId}if(pui.secLevel>0){J.postData+="&q="+encodeURIComponent(pui.Wc(d.c));M=d.dataProps["order by"];if(d.Cb!=null)M=d.Cb;if(M&&M!="")J.postData+="&order="+M;else if(Mb()=="mssql")J.postData+=
|
|
1219
|
+
"&order=(select null)";if(H!="")J.postData+="&"+H}else J.postData+="&q="+pui.xb.lf(k);J.postData+="&limit="+m+"&start="+q;if(z!=null&&z==true)J.postData+="&getTotal=1";if(pui["read db driven data as ebcdic"]!==true)J.postData+="&UTF8=Y";z=d.dataProps["allow any select statement"];if(z!=null&&(z=="true"||z==true))J.postData+="&FetchCounter=Y";if(pui.isCloud)J.postData+="&workspace_id="+pui.cloud.ws.id;J.onready=function(W){d.dataProps["load fields into widgets"]!="true"&&d.unMask();var ca,ba=false;
|
|
1220
|
+
if(d.dataProps["data transform function"]&&W.uf()==200)try{ca=eval("window."+d.dataProps["data transform function"])(W.yc())}catch(ha){pui.bp(ha)}else ca=Kb(W,"Run SQL SELECT Query");if(ca){if(I){if(pui.Oa[q]==null)pui.Oa[q]={};pui.Oa[q].sql=k;pui.Oa[q].ml=m;pui.Oa[q].start=q;pui.Oa[q].hw=w;pui.Oa[q].results=ca.results;pui.Oa[q].totalRecs=ca.totalRecs;pui.Oa[q].Sx=H;pui.Oa[q].matchRow=ca.matchRow}if(u!=null)u(ca.results,ca.totalRecs,ca.matchRow);else X=ca.results;ba=true}kd&&pui.mf(kd,ba,d.c.id);
|
|
1221
|
+
d.sc=false};d.sc=true;J.send();if(u==null)return X}function Da(k){var m=-1;if(d.cells!=null&&d.cells[0]!=null)for(var q=0;q<d.cells[0].length;q++)if(d.cells[0][q]!=null&&d.cells[0][q].w==k){m=d.cells[0][q].col;break}return m}function gb(k){for(var m=[],q=0;q<d.aa.length;q++){var u=k[d.aa[q]];u||(u="");m.push(u)}return m}function $a(k,m){function q(Y){var ea=String(Y.w+1);if(ea.length>3)ea="000";else for(;ea.length<3;)ea="0"+ea;Y=Y.sa.substring(0,d.pf);if(Y.length<d.pf)Y+=" ".repeat(d.pf-Y.length);
|
|
1222
|
+
z+=ea;w+=Y;I++}var u=d.cells[0];if(!(typeof k.col!="number"||k.col<0||k.col>=u.length)){if(typeof m!="string")m="";var z="",w="",I=0;k.sa=m;m.length>0&&q(k);for(var H=0;H<u.length&&I<d.se;H++){var J=u[H].w,M=u[H].sa;typeof J=="number"&&J>=0&&J!=k.w&&typeof M=="string"&&M.length>0&&q(u[H])}qb(z,w)}}function qb(k,m){if(k.length<3*d.se)k+=" ".repeat(3*d.se-k.length);d.og=k+m;pui.Rk=d;pui.bc();pui.Rk=null}function sb(k){if(k==null||k=="")if(d.og!=null&&d.og!="")k=d.og;else return;var m=d.cells[0];d.og=
|
|
1223
|
+
k;for(var q=0;q<d.se;q++){var u=k.substring(q*3,q*3+3);u=parseInt(u,10);var z=q*d.pf+3*d.se;z=k.substring(z,z+d.pf);z=Qb(z);if(!isNaN(u)&&u>0&&z!=""){u-=1;for(var w=0;w<m.length;w++)if(m[w].w==u){m[w].sa=z;d.hm(m[w]);break}}else break}}function mb(){for(var k=d.cells.length,m=d.cells[0].length,q=0;q<k;q++)for(var u=0;u<m;u++)d.c.appendChild(d.cells[q][u])}function Mb(){var k=pui.getDatabaseConnections();if(k)for(var m=Lb(d.dataProps["database connection"]||""),q=0;q<k.length;q++){var u=k[q];if(m===
|
|
1224
|
+
""&&u["default"]===true||m===u.name)return u.driver}else if(typeof pui.dbDriver!=="undefined")return pui.dbDriver}function ab(k){var m=0;if(d.dataProps["custom sql"]!=null&&d.dataProps["custom sql"]!=""){userDefinedDataFields=ub(d.C);if(userDefinedDataFields.length==0)return m;if(d.C[k]&&d.C[k].value&&d.C[k].value.fieldName&&d.saveFieldNames){var q=d.saveFieldNames.indexOf(d.C[k].value.fieldName);if(q!=-1)m=q-k}}return m}function ub(k){for(var m=[],q=0;q<k.length;q++){var u=k[q];for(tb in u)if(tb.substr(0,
|
|
1225
|
+
17)==="user defined data"){var z=u[tb].fieldName;z!=null&&m.push(z.toUpperCase())}}return m}pui.Yh.call(this);if(pui.designer.Ku!=null){this.mg=new pui.designer.Ku;this.mg.Ew=true}else{this.mg={};this.mg.Ew=true;this.mg.mz=la();this.mg.xA=la();this.mg.uA=la();this.mg.wA=la()}this.xi=true;this.C=[];this.wa=false;this.ref={};this.Wa="";this.n=[];this.k=[];this.c=null;this.Xc="";this.cells=[];this.b=null;this.borderColor="";this.borderWidth=null;this.Cr="default";this.Qp="row number";this.Vr=75;this.la=
|
|
1226
|
+
26;this.bb=30;this.h=true;this.gc=this.sortable=this.Oc=false;this.Cb=null;this.Lb=0;this.Mo=false;if(R=="dspf"||pui.fa)this.Mo=true;this.Kf=true;this.Cc=false;if(R=="dspf"||pui.fa){this.Kf=false;this.Cc=true}this.yh=100;this.Pn=this.Np=0;this.Pe=this.su=false;this.i=new pui.bi;this.visibility="";this.columnHeadings=[];this.ga=[];this.oq={};this.EA=null;this.I={};this.I["font family"]="Verdana";this.I["font size"]="13px";this.I["text align"]="center";this.I["header font color"]="#ffffff";this.I["header background"]=
|
|
1227
|
+
"#6699ff";this.I["header image"]="";this.I["header font weight"]="bold";this.I["header font style"]="normal";this.I["row font color"]="";this.I["row background"]="";this.I["odd row font color"]="#555555";if(R=="genie")this.I["odd row font color"]="";this.I["odd row background"]="#efefef";this.I["even row font color"]="#555555";if(R=="genie")this.I["even row font color"]="";this.I["even row background"]="#fcfcfc";this.I["hover font color"]="#555555";this.I["hover background"]="#dfe8f6";this.I["hover image"]=
|
|
1228
|
+
"";this.I["selection font color"]="#ffffff";this.I["selection background"]="#6699cc";this.I["selection image"]="";this.gf={};for(var tb in this.I)this.gf[tb]=this.I[tb];this.dataProps={};this.kj={};this.po={};this.io=this.dragging=this.Df=this.designMode=false;this.Uw=96;this.sy=this.hz=97;this.bx=99;this.Nr=100;this.qy=701;this.ht=702;this.cs=this.totalRecs=this.d=null;this.Ot=this.ma=this.sl=this.zw=this.Gi=this.so=this.nf=this.Pk=false;this.qo=null;this.Di=this.singleSelection=this.Wd=this.fo=
|
|
1229
|
+
false;this.xe=this.Ob=this.ye=this.Bb=null;this.ug=this.Cu=false;this.Qe=this.Sf=null;this.vm="_____puiButtonToggleTreeLevel";this.$l=this.Wk=this.kl=null;this.Lh="1";this.Kh=null;this.pf=20;this.se=3;this.Aj=this.zj=this.Cj=this.Bj=this.og=null;this.expanded=true;this.cl=this.bl=null;this.oc=1;this.ou=false;this.qj=this.ro=null;this.Bi=[];this.yg=this.Pi=this.Nf=this.Ei=this.On=this.Qi=this.zf=null;this.Qs=[];this.Fd=null;this.Tr=false;this.No=1;this.$a=new pui.Km(pui.runtimeContainer,this);this.Qk=
|
|
1230
|
+
null;this.Y={w:0,col:0,text:""};this.Ml=false;this.ms=Da;this.Zt=false;this.Yd=this.Nb=null;this.qv=ua;this.pv=Fa;this.lv=T;this.sc=this.At=this.zt=this.Vs=false;var d=this,fb,aa,ga,qa,xa,Oa,db,fa,ma=1,sa="solid",Pa=false,kb=false,lb=false,Qa=false,ld=false,Jc,Kc,pc,vb,Sb,Va,Ab=null,jb=null,Ob=null,ce=false,hd=false,de=false,sc,rc,tc,kd=null,Sa=[],Wa=null,Xa=null;this.mo=function(){var k;d.designMode=true;d.c.destroy=d.destroy;if(d.d!=null)d.d.designMode=true;for(k=0;k<d.n.length;k++)La(d.n,k,true);
|
|
1231
|
+
for(k=0;k<d.k.length;k++)La(d.k,k,false);for(k=0;k<d.cells.length;k++)for(var m=0;m<d.cells[k].length;m++)Z(d.cells[k][m]);if(fb==null){fb=da("plus","Add New Row");fb.onclick=function(){var q=d.c.e;q.designer.ca.start("Add Grid Row");q.designer.ca.add(q,"number of rows");d.af();d.zh();d.Wb();d.Le()}}if(aa==null){aa=da("minus","Remove Row");aa.onclick=function(){if(d.cells.length>(d.h?2:1)){var q=d.c.e;q.designer.ca.start("Remove Grid Row");q.designer.ca.add(q,"number of rows");d.yj();d.Wb();d.Le()}}}if(ga==
|
|
1232
|
+
null){ga=da("plus","Add New Column");ga.onclick=function(){var q=d.c.e;if(q.properties["number of columns"]>d.yh)pui.alert("Maximum number of columns reached.");else{q.designer.ca.start("Add Grid Column");q.designer.ca.add(q,"column widths");q.designer.ca.add(q,"number of columns");d.ln();d.La();d.Wb();d.Le()}}}if(qa==null){qa=da("minus","Remove Column");qa.onclick=function(){var q=d.n.length-2;if(!(q<1))if(d.Ho(q)){q=d.zx(q);q!=null&&pui.alert("The column cannot be removed because it contains other elements that must be removed first.\n\nTo remove column elements, go to the Elements tab. Then, search the element list for the ID(s) listed below:\n"+
|
|
1232
1233
|
q.join("\n")+"\n\nSelect each element and click the Remove Element icon.")}else{q=d.c.e;q.designer.ca.start("Remove Grid Column");q.designer.ca.add(q,"column widths");q.designer.ca.add(q,"number of columns");q.designer.ca.add(q,"column headings");d.Dp();d.Wb();d.Le()}}}if(xa==null)xa=c("nw");if(Oa==null)Oa=c("ne");if(db==null)db=c("sw");if(fa==null)fa=c("se");d.c.yz=function(){if(d.designMode){if(xa!=null)xa.style.visibility="";if(Oa!=null)Oa.style.visibility="";if(db!=null)db.style.visibility="";
|
|
1233
1234
|
if(fa!=null)fa.style.visibility=""}};d.c.Sr=function(){if(xa!=null)xa.style.visibility="hidden";if(Oa!=null)Oa.style.visibility="hidden";if(db!=null)db.style.visibility="hidden";if(fa!=null)fa.style.visibility="hidden"};d.clearData();d.visibility=="hidden"&&d.Hc(function(q){q.style.visibility=""});if(R=="genie"&&d.Fd!=null)if(k=Db(d.Fd)){k.style.visibility="";k.style.display=""}T();d.setScrollBar();d.i.Jv(Z);d.dc()};this.Wb=function(k){var m;if(!k)if(d.designMode&&Ib.xh)return;if(d.kd){m=d.c.parentNode;
|
|
1234
1235
|
if(m.getAttribute("container")=="true"){k=m.offsetHeight;var q=m.offsetWidth;if(k===0&&q===0&&m.parentNode&&m.parentNode.classList.contains("pui-tablayout-body")){k=m.parentNode.offsetHeight-2;q=m.parentNode.offsetWidth-2}var u=d.sf().split(","),z=0;for(m=0;m<u.length;m++){var w=u[m];w=Number(w);u[m]=w;z+=w}q=(q-z)/u.length;q=parseInt(q);for(m=0;m<u.length;m++)u[m]+=q;d.Pf(u);if(d.h)k-=d.bb;if(d.i)k-=d.i.getHeight();k=k/d.la;if(d.h)k+=1;k=parseInt(k);if(k<1)k=1;d.fo=true;d.setNumberOfRows(k);d.fo=
|
|
@@ -1246,17 +1247,17 @@ true;va[q]=J;if(J.dataType=="graphic")ba[q]=true;if(m)if(ya["field type"]=="imag
|
|
|
1246
1247
|
[];I=[];H=function(Bb){return Bb.columnId==u};q=0;for(Y=oa.length;q<Y;q++){u=oa[q];w="";M=100;if(u>=0)if(ya=d.ga.find(H)){w=ya.blankHeader?"":ya.name;M=pui.Vd(ya.orginalWidth)}I[q]=w;ea[q]=M}}oa="";var Ra,Jb,Na;q=false;if(m){Ra=new pui.Dm(Ma);Jb=new pui.Cm(Ra);Ra.Yn=d.la;Na=[];if(!d.ma||d.nf)ea=d.sf().split(",");for(H=0;H<W.length&&H<ea.length;H++)W[H]>-1&&Na.push(Number(ea[H]));Ra.Pf(Na);Na=new pui.rq;for(H=Ma=0;H<W.length;H++)if(W[H]>-1){nc(Ra,va[H],Ma);Ma++}}ea=0;if(d.h&&d.Pk){m&&mc(Ra);for(H=
|
|
1247
1248
|
0;H<W.length;H++){J=W[H];if(J>-1){w="";w=d.ma&&!d.nf?I[H]:Oc(d.cells[0][H]);w=w.replace(/<br>/g," ");m&&oc(Ra,Qb(w),ea++);w=w.replace(/"/g,'""');w=w.replace("\n","");w=w.replace("\r","");if(oa!="")oa+=Q;oa+=X+w+X}}if(m)Ra.rh=d.bb}oa="\ufeff"+oa;I=d.dataArray;if(d.isFiltered())I=d.X;H=0;for(Y=I.length;H<Y;H++){Ma="";ya=I[H];if(!(ya.rc!=null&&ya.rc==true)){z={};if(ya==null||ya.length==0)z.empty=true;else for(w=0;w<d.aa.length;w++)z[d.aa[w]]=ya[w];m&&mc(Ra);w=ea=0;for(M=W.length;w<M;w++){J=W[w];if(J>
|
|
1248
1249
|
-1){J=ya[J];if(ja[w]!=null&&ja[w].value!=null)J=ja[w].value;if(ba[w]&&(d.dataProps==null||d.dataProps["load fields into widgets"]!=="true"))J=pui.formatting.fh(J);if(!m&&ca[w]&&pui.appJob!=null&&(pui.appJob.decimalFormat=="I"||pui.appJob.decimalFormat=="J")){if(typeof J!=="string")J=String(J);J=J.replace(".",",")}Aa=va[w];if(typeof Aa==="object"&&Aa!==null){var cb=Aa.formatting;if(cb==="Date"||cb==="Time"||cb==="Time Stamp")J=pui.R(Aa,z,d.ref)}if(ha[w]!==false)if(pui.R(ha[w],z,d.ref)=="hidden")J=
|
|
1249
|
-
"";if(typeof pui["process export value"]==="function"){Aa=pui["process export value"]({value:J,"bound value formatting":Aa,"item properties":Ha[w],"grid properties":d.c.pui.properties,"record number":H+1});if(Aa!=null)J=Aa}Aa=J;if(typeof J==="string")J=J.replace(/"/g,'""');if(Ma!="")Ma+=Q;Ma+=X+Qb(J)+X;if(m){if(typeof Ia[w]=="object"&&Ia[w]!=null){q=true;oc(Ra,"",ea);typeof Aa==="string"&&Aa.length>0&&zc(Na,Ra.nd,ea,Aa,Ia[w])}else{J=
|
|
1250
|
-
ja[w].link;else if(ja[w].bt!=null)J=ya[ja[w].bt];oc(Ra,Qb(Aa),ea,J)}ea++}}}if(oa!="")oa+="\n";oa+=Ma}}if(m){if(q&&d.i.Ju){Ra.Fu=true;Jb.Uc=Na;Jb.Jc=d.i;Zd(d.i,pui.getLanguageText("runtimeMsg","downloading x",["..."]));d.i.Yp()}hc(Jb,k)}else pui.Nk("text/csv",k+".csv",oa)}}};this.xw=function(k){function m(H){var J=new XMLHttpRequest;J.open("POST",z,true);J.setRequestHeader("Content-type","application/x-www-form-urlencoded");var M={data:{}};
|
|
1251
|
-
function(){var X="",W="";for(var ca in M.data){X+=W+ca+"="+M.data[ca];W="&"}return X};if(pui.ba)M.append("AUTH",pui.ba);else{M.append("AUTH",pui.appJob.auth);typeof pui.vId!=="undefined"&&M.append("VID",pui.vId)}M.append("q",encodeURIComponent(pui.Wc(d.c)));pui.ld(d.dataProps,null,M);M.append("limit",u);M.append("start","1");typeof d.Lc==="string"&&d.Lc.length>0&&d.Lc.substring(1).split("&").forEach(function(X){X=X.split("=");M.append(X[0],
|
|
1252
|
-
true&&M.append("UTF8","Y");var Y=d.dataProps["order by"];if(d.Cb!=null)Y=d.Cb;if(Y&&Y!="")M.append("order",Y);else Mb()=="mssql"&&M.append("order","(select null)");Y=d.dataProps["allow any select statement"];if(Y!=null&&(Y=="true"||Y==true))M.append("FetchCounter","Y");pui.isCloud&&M.append("workspace_id",pui.cloud.ws.id);Yd(d.i,"cancel","cancel");Zd(d.i,pui.getLanguageText("runtimeMsg","downloading x",["..."]));d.i.Yp(pui.getLanguageText("runtimeMsg",
|
|
1253
|
-
J.onreadystatechange=function(){if(!(J.readyState!=4||J.status==0))try{if(J.status!=200)throw"XMLHTTPRequest status: "+J.status;var X=eval("("+J.responseText+")");if(!X)throw"Failed";if(X.success!=true){if(X.errorText)throw"Failed: "+X.errorText;throw"Failed";}var W=X.response;if(W==null||W.results==null)throw"Invalid Response";if(d.dataProps["data transform function"])try{W=eval("window."+d.dataProps["data transform function"])(J.responseText)}catch(ca){pui.bp(ca)}if(H!=
|
|
1254
|
-
0)q(W);else{Yd(d.i,"","");Zd(d.i,pui.getLanguageText("runtimeMsg","no data"));d.i.Yp();$d(d.i)}d.unMask()}catch(ba){X=pui.getLanguageText("runtimeText","excel export text");console.warn(X,ba);pui.alert(X+":\n"+ba.toString());d.unMask();d.i.z()}};var ea=0,Q=0;J.addEventListener("progress",function(X){var W=pui.uo(X.loaded,1),ca=X.timeStamp-ea;if(ea==0)ea=X.timeStamp;else if(ca>0){var ba=X.loaded/ca*1E3;ca=Math.round(ca/1E3);W+=" ("+pui.uo(ba,0)+"/s; "+ca+"s)";if(X.timeStamp-
|
|
1255
|
-
"downloading x",[W]));Q=X.timeStamp});J.send(M.get());d.mask();d.Ib()}function q(H){function J(ja){return ja.field==M}var M,Y,ea,Q,X,W=[];if((d.sl||d.ma)&&Array.isArray(d.ga)&&d.ga.length>0){var ca=d.ga.filter(function(ja){return ja.showing||d.nf!=true});ca.sort(function(ja,oa){var Ha=ja.currentColumn;if(Ha<0)Ha=999+ja.columnId;var Ma=oa.currentColumn;if(Ma<0)Ma=999+oa.columnId;return Ha-Ma});Y=0;for(X=ca.length;Y<X;Y++){Q=ca[Y];if(Q.field)W.push({fieldName:Q.field,
|
|
1256
|
-
else if(!Q.field){
|
|
1257
|
-
{dataType:"char"},oa)});if(d.h&&d.Pk){Y=0;mc(ba);if(d.ma){if(Array.isArray(d.ga)&&d.ga.length>0)for(X=W.length;Y<X&&(Q=W[Y]);Y++){M=Q.fieldName;ea=(ea=d.ga.find(J))?ea.name:"";oc(ba,ea,Y)}}else if(d.cells[0]instanceof Array&&d.cells[0].length>0)for(Q=W.length;Y<Q;Y++){ea=d.cells[0][Y]?Qb(Oc(d.cells[0][Y])):"";if(d.nf)d.cells[0][Y]!==undefined&&oc(ba,ea,Y);else oc(ba,ea,Y)}ba.rh=d.bb}X=0;for(Q=H.results.length;X<Q;X++){mc(ba);ea=H.results[X];for(var ha=Y=0,va=W.length;ha<va;ha++){
|
|
1258
|
-
|
|
1259
|
-
|
|
1250
|
+
"";if(typeof pui["process export value"]==="function"){Aa=pui["process export value"]({value:J,"bound value formatting":Aa,"item properties":Ha[w],"grid properties":d.c.pui.properties,"record number":H+1});if(Aa!=null)J=Aa}Aa=J;Aa=JSON.stringify(Aa).replace(/\\u[0-9a-zA-Z]{4}\b/g," ");Aa=JSON.parse(Aa);if(typeof J==="string")J=J.replace(/"/g,'""');if(Ma!="")Ma+=Q;Ma+=X+Qb(J)+X;if(m){if(typeof Ia[w]=="object"&&Ia[w]!=null){q=true;oc(Ra,"",ea);typeof Aa==="string"&&Aa.length>0&&zc(Na,Ra.nd,ea,Aa,Ia[w])}else{J=
|
|
1251
|
+
null;if(typeof ja[w]=="object"&&ja[w]!=null)if(ja[w].link!=null)J=ja[w].link;else if(ja[w].bt!=null)J=ya[ja[w].bt];oc(Ra,Qb(Aa),ea,J)}ea++}}}if(oa!="")oa+="\n";oa+=Ma}}if(m){if(q&&d.i.Ju){Ra.Fu=true;Jb.Uc=Na;Jb.Jc=d.i;Zd(d.i,pui.getLanguageText("runtimeMsg","downloading x",["..."]));d.i.Yp()}hc(Jb,k)}else pui.Nk("text/csv",k+".csv",oa)}}};this.xw=function(k){function m(H){var J=new XMLHttpRequest;J.open("POST",z,true);J.setRequestHeader("Content-type","application/x-www-form-urlencoded");var M={data:{}};
|
|
1252
|
+
M.append=function(X,W){M.data[X]=encodeURIComponent(W)};M.get=function(){var X="",W="";for(var ca in M.data){X+=W+ca+"="+M.data[ca];W="&"}return X};if(pui.ba)M.append("AUTH",pui.ba);else{M.append("AUTH",pui.appJob.auth);typeof pui.vId!=="undefined"&&M.append("VID",pui.vId)}M.append("q",encodeURIComponent(pui.Wc(d.c)));pui.ld(d.dataProps,null,M);M.append("limit",u);M.append("start","1");typeof d.Lc==="string"&&d.Lc.length>0&&d.Lc.substring(1).split("&").forEach(function(X){X=X.split("=");M.append(X[0],
|
|
1253
|
+
decodeURIComponent(X[1]))});pui["read db driven data as ebcdic"]!==true&&M.append("UTF8","Y");var Y=d.dataProps["order by"];if(d.Cb!=null)Y=d.Cb;if(Y&&Y!="")M.append("order",Y);else Mb()=="mssql"&&M.append("order","(select null)");Y=d.dataProps["allow any select statement"];if(Y!=null&&(Y=="true"||Y==true))M.append("FetchCounter","Y");pui.isCloud&&M.append("workspace_id",pui.cloud.ws.id);Yd(d.i,"cancel","cancel");Zd(d.i,pui.getLanguageText("runtimeMsg","downloading x",["..."]));d.i.Yp(pui.getLanguageText("runtimeMsg",
|
|
1254
|
+
"cancelled"),function(){J.abort();d.unMask()});J.onreadystatechange=function(){if(!(J.readyState!=4||J.status==0))try{if(J.status!=200)throw"XMLHTTPRequest status: "+J.status;var X=eval("("+J.responseText+")");if(!X)throw"Failed";if(X.success!=true){if(X.errorText)throw"Failed: "+X.errorText;throw"Failed";}var W=X.response;if(W==null||W.results==null)throw"Invalid Response";if(d.dataProps["data transform function"])try{W=eval("window."+d.dataProps["data transform function"])(J.responseText)}catch(ca){pui.bp(ca)}if(H!=
|
|
1255
|
+
null)W.fields=H;if(W.results.length>0)q(W);else{Yd(d.i,"","");Zd(d.i,pui.getLanguageText("runtimeMsg","no data"));d.i.Yp();$d(d.i)}d.unMask()}catch(ba){X=pui.getLanguageText("runtimeText","excel export text");console.warn(X,ba);pui.alert(X+":\n"+ba.toString());d.unMask();d.i.z()}};var ea=0,Q=0;J.addEventListener("progress",function(X){var W=pui.uo(X.loaded,1),ca=X.timeStamp-ea;if(ea==0)ea=X.timeStamp;else if(ca>0){var ba=X.loaded/ca*1E3;ca=Math.round(ca/1E3);W+=" ("+pui.uo(ba,0)+"/s; "+ca+"s)";if(X.timeStamp-
|
|
1256
|
+
Q<250)return}Zd(d.i,pui.getLanguageText("runtimeMsg","downloading x",[W]));Q=X.timeStamp});J.send(M.get());d.mask();d.Ib()}function q(H){function J(ja){return ja.field==M}var M,Y,ea,Q,X,W=[];if((d.sl||d.ma)&&Array.isArray(d.ga)&&d.ga.length>0){var ca=d.ga.filter(function(ja){return ja.showing||d.nf!=true});ca.sort(function(ja,oa){var Ha=ja.currentColumn;if(Ha<0)Ha=999+ja.columnId;var Ma=oa.currentColumn;if(Ma<0)Ma=999+oa.columnId;return Ha-Ma});Y=0;for(X=ca.length;Y<X;Y++){Q=ca[Y];if(Q.field)W.push({fieldName:Q.field,
|
|
1257
|
+
name:Q.blankHeader?"":Q.name});else if(!Q.field){Q.field=d.C[Y].value.fieldName;W.push({fieldName:Q.field,name:Q.blankHeader?"":Q.name})}}}else for(M in H.results[0])W.push({fieldName:M,Fz:M});Y=0;if(H.colWidths!=null){Y=H.colWidths.length;ca=ub(d.C);Y-=ca.length}else Y=Object.keys(H.results[0]).length;if(W.length>0&&W.length<Y)Y=W.length;var ba=new pui.Dm(Y);ca=new pui.Cm(ba);ca.Jc=d.i;H.fields!=null&&W.forEach(function(ja,oa){M=ja.fieldName;var Ha=H.fields.find(J);nc(ba,Ha?{dataType:Ha.type,decPos:Ha.decPos}:
|
|
1258
|
+
{dataType:"char"},oa)});if(d.h&&d.Pk){Y=0;mc(ba);if(d.ma){if(Array.isArray(d.ga)&&d.ga.length>0)for(X=W.length;Y<X&&(Q=W[Y]);Y++){M=Q.fieldName;ea=(ea=d.ga.find(J))?ea.name:"";oc(ba,ea,Y)}}else if(d.cells[0]instanceof Array&&d.cells[0].length>0)for(Q=W.length;Y<Q;Y++){ea=d.cells[0][Y]?Qb(Oc(d.cells[0][Y])):"";if(d.nf)d.cells[0][Y]!==undefined&&oc(ba,ea,Y);else oc(ba,ea,Y)}ba.rh=d.bb}X=0;for(Q=H.results.length;X<Q;X++){mc(ba);ea=H.results[X];for(var ha=Y=0,va=W.length;ha<va;ha++){M=W[ha];if(M!=null){var Ia=
|
|
1259
|
+
ea[M.fieldName];if(Ia==null&&M.fieldName)Ia=ea[M.fieldName.toUpperCase()];if(d.nf)d.cells[0][Y]!==undefined&&oc(ba,Ia,Y,null,H.fields==null);else oc(ba,Ia,Y,null,H.fields==null);Y++}}}hc(ca,k)}if(pui.secLevel<=0)console.log("Export not implemented for low security level.");else{var u=d.totalRecs;if(u==null)u=9999;var z=Xb("PUI0009102.PGM"),w=d.dataProps["data url"];if(w=="")w=null;if(w){z=pui.df(w);if(typeof pui.vId!=="undefined")z+="&VID="+pui.vId;m()}else if(d.dataProps["database file"]&&d.dataProps["database file"].length>
|
|
1260
|
+
0){w="";var I=d.dataProps["database file"].split("/");if(I.length>1){w=I[0];I=I[1]}else I=I[0];dc({url:Xb("PUI0009101.pgm"),method:"post",params:{context:"genie",file:I,library:w,AUTH:pui.ba?pui.ba:pui.appJob.auth,workspace_id:pui.isCloud&&pui.cloud.ws.id?pui.cloud.ws.id:"",q:encodeURIComponent(pui.Wc(d.c))},async:true,handler:function(H){var J=null;if(H!=null&&H.fields!=null)J=H.fields;m(J)},suppressAlert:true,onfail:function(){console.log("Failed to fetch column data types for formatting. All cells in the XLSX file will contain character data.");
|
|
1260
1261
|
m()}});d.mask();d.Ib()}else m()}};this.Ho=function(k){if(R=="genie"&&!pui.fa)return false;var m=k,q=k;if(k==null){m=0;q=d.n.length-2}k=0;if(d.h)k=1;if(q<0)return false;for(m=m;m<=q;m++)for(var u=d.cells[k][m].firstChild;u!=null;){if(u.style.position=="absolute"&&!u.Uo)return true;u=u.nextSibling}return false};this.zx=function(k){var m=[],q=k,u=k;if(k==null){q=0;u=d.n.length-2}k=0;if(d.h)k=1;for(q=q;q<=u;q++)for(var z=d.cells[k][q],w=0;w<z.children.length;w++){var I=z.children[w].id;if(!(I==""||I==
|
|
1261
1262
|
null)){I=" "+I;m.push(I)}}return m};this.Gw=function(){for(var k=[],m=d.c.e.designer.items,q=0;q<m.length;q++){var u=m[q];u.Rz()==d&&k.push(u)}return k};this.Bo=function(){var k=d.k.length-1;if(d.h)k-=1;return k};this.Bg=function(k){if(!(R=="genie"&&!pui.fa))if(d.designMode){var m,q,u=document.createElement("span");if(d.h){q=d.cells[1][k];m=2}else{q=d.cells[0][k];m=1}for(q=q.firstChild;q!=null;){if(q.style.position=="absolute"&&!q.Uo&&!q.aA&&!q.cA){var z=q.cloneNode(true);z.id="";z.by!=null&&z.by(z);
|
|
1262
1263
|
u.appendChild(z)}q=q.nextSibling}for(m=m;m<d.cells.length;m++){d.cells[m][k].innerHTML="";d.cells[m][k].appendChild(u.cloneNode(true))}}};this.zh=function(){if(!(R=="genie"&&!pui.fa))for(var k=d.n.length-1,m=0;m<k;m++)d.Bg(m)};this.getCellValue=function(k,m){var q=k,u=1;if(R=="dspf"||d.ea()||pui.fa)u=d.j;q-=u;d.h&&q++;q=d.cells[q];if(q==null)return null;q=q[Da(m)];if(q==null)return null;return Oc(q)};this.getDataValue=function(k,m){if(typeof k!="number")return null;if(typeof m!="string")return null;
|
|
@@ -1269,48 +1270,48 @@ d.dataArray;if(d.isFiltered())m=d.X;return m.length<=k}};this.np=function(){if(O
|
|
|
1269
1270
|
setTimeout(function(){d.unMask();if(typeof pui.r.Od=="undefined"||pui.r.Od==false){var q=0;d.h&&q++;var u=d.cells[q];setTimeout(function(){ia(u)},100)}},1)}};this.getRecNum=function(){return d.j};this.unMask=function(){if(Ab!=null)Ab.style.display="none";if(Ob!=null)Ob.style.display="none";if(jb!=null)jb.style.display="none"};this.Ib=function(){if(!d.designMode){var k=d.c;if(k.style.visibility!="hidden")if(d.c.parentNode!=null){var m=parseInt(k.style.left),q=parseInt(k.style.top),u=parseInt(k.style.width)-
|
|
1270
1271
|
2;k=parseInt(k.style.height);if(Ab==null)Ab=document.createElement("div");Ab.style.display="block";if(d.h){q+=d.bb;k-=d.bb}Ab.style.left=m+"px";Ab.style.top=q+"px";Ab.style.width=u+"px";Ab.style.height=k+"px";Ab.className="pui-grid-loading";d.c.parentNode.appendChild(Ab);d.My()}}};this.mask=function(){if(!d.designMode){var k=d.c;if(k.style.visibility!="hidden")if(d.c.parentNode!=null){var m=parseInt(k.style.left),q=parseInt(k.style.top),u=parseInt(k.style.width)-2;k=parseInt(k.style.height);if(jb==
|
|
1271
1272
|
null)jb=document.createElement("div");jb.style.display="block";if(d.h){q+=d.bb;k-=d.bb}jb.style.position="absolute";jb.style.left=m+"px";jb.style.top=q+"px";jb.style.width=u+"px";jb.style.height=k+"px";jb.className="grid-mask";d.c.parentNode.appendChild(jb)}}};this.My=function(){if(!(d.designMode||jb==null||jb.style.display=="none"))if(d.c.style.visibility!="hidden")if(d.c.parentNode!=null){var k=parseInt(Ab.style.width)-2,m=parseInt(Ab.style.height)-5;if(Ob==null)Ob=document.createElement("div");
|
|
1272
|
-
Ob.style.display="block";if(d.h)m-=d.bb;if(m>100){m=100;if(k<100)m=k-5}if(m<35)m=35;Ob.style.width=m+"px";Ob.style.height=m+"px";Ob.className="pui-animation pui-grid-animation";Ab.appendChild(Ob)}};this.getData=function(k){function m(ja,oa,Ha){if(!(d==null||d.cells==null)){if(oa!=null)d.totalRecs=oa;d.aa=[];d.X=[];d.clear(false);d.gc=false;d.dataProps["load all rows"]=="true"&&t(false);if(ja.length>=1){for(var Ma in ja[0])d.aa.push(pui.L(Ma));for(oa=0;oa<
|
|
1273
|
-
[];var ya=ja[oa],Aa=0;for(Ma in ya){var Ra=ya[Ma];d.dataArray[oa][Aa]=Ra;d.X[oa][Aa]=Ra;Aa++}}}d.wa=true;d.getData();if(d.dataProps["load all rows"]=="true"&&d.isFiltered()&&Pa){ja=g();Ma=ja.filters;if(Ma!=null){d.sc=false;for(oa=0;oa<Ma.length;oa++){ya=ja.filters[oa].column;Aa=ja.filters[oa].text;Aa==null||Aa==""?d.removeFilter(ya):d.setFilter(ya,Aa)}d.sc=true}}if(d.dataProps["load all rows"]=="true"&&d.h&&d.cells.length>0){ja=d.cells[0];for(oa=0;oa<ja.length;oa++)if(ja[oa].Tj)ja[oa].Tj=
|
|
1274
|
-
if(d.dataProps["load all rows"]!="true")d.wa=false;if(d.d!=null)if(d.d.type=="paging")setTimeout(function(){d.d.destroy();d.d=null;d.setScrollBar()},250);else if(d.d.type=="sliding")if(d.totalRecs!=null){d.d.Ra=d.totalRecs;Ha>0&&d.d.td(d.j,true)}if(d.c.style.visibility!="hidden"&&d.d!=null){d.d.z();typeof d.d.ph=="function"&&d.d.ph()}d.xi=false}}function q(ja,oa,Ha){function Ma(Gb){return Gb.columnId===Ra}if(!(d==null||d.cells==null)){if(oa!=null)d.totalRecs=oa;if(Ha>0){d.j=
|
|
1275
|
-
for(var ya=Array(d.cells[0].length),Aa=0;Aa<d.cells[0].length;Aa++)ya[d.cells[0][Aa].w]=Aa;if((d.sl||d.ma)&&ja.length>0&&d.ga.length){var Ra=0;for(var Jb in ja[0]){if(Aa=d.ga.find(Ma))Aa.field=Jb;Ra++}}for(Aa=d.qf=0;Aa<ja.length;Aa++){if(d.qf==0)d.qf=Aa+1+(d.j-1);d.Ti=Aa+1+(d.j-1);var Na=ja[Aa],cb=0,Bb=d.cells[Aa+(d.h?1:0)];if(Bb!=null)for(Jb in Na){var Ta=Bb.length;if(d.ma&&d.ga.length)Ta=d.ga.length;if(cb<Ta){Ta=Na[Jb];var cc="";Ra=pui.secLevel>0?ya[cb]:cb;if(d.ma){if(Ra==
|
|
1276
|
-
d.I["text align"].split(",");if(Tb[cb])cc=" text-align:"+Tb[cb]}}else if(Bb[Ra].style.textAlign!=null&&Bb[Ra].style.textAlign!="")cc=" text-align:"+Bb[Ra].style.textAlign;if(pui.appJob.decimalFormat=="J"&&Ta.charAt(0)==","&&Ta.length>1&&!Number.isNaN(Number.parseInt(Ta.substring(1))))Ta="0"+Ta;Bb[Ra].innerHTML='<div style="'+oa+cc+'" class="dbd">'+Ta+"</div>";if(d.Y!=null&&d.Y.text!=""&&(Ra===d.Y.col||d.Y.col==="*all"))if(Bb[Ra].tagName=="DIV"){pui.Xk(Bb[Ra],
|
|
1277
|
-
if(d.h)ja-=1;if(d.d!=null)if(d.d.type=="paging")setTimeout(function(){d.d.destroy();d.d=null;d.setScrollBar()},250);else if(d.d.type=="sliding")if(d.totalRecs!=null){d.d.Ra=d.totalRecs;Ha>0&&d.d.td(d.j,true)}if(d.c.style.visibility!="hidden"&&d.d!=null){d.d.z();typeof d.d.ph=="function"&&d.d.ph()}if(d.i!=null){d.i.Hl=parseInt((d.j+ja*2-2)/ja)+d.No-1;d.i.z()}d.xi=false}}function u(){var ja=null;if(d.ug&&d.Sf!==null){if(d.Ob)if(d.Ob.length<1&&d.kd)d.Ob=
|
|
1278
|
-
{iq:d.getDataValue(ja+1,d.Sf),Bu:false};d.Ob.push(oa)}d.xe=new pui.uq;d.xe.load(d.Ob)}if(!d.Cu){d.Cu=true;d.Rr=null;ja=d.Qw();for(oa=0;oa<d.C.length;oa++)if(d.C[oa].columnId==ja){ja=d.C[oa].left;if(ja===undefined)ja="10px";ja=ja.substring(0,ja.indexOf("px"));ja=parseInt(ja);d.Rr=ja;break}}ja=d.c.id;ja={id:ja+d.vm,"field type":"graphic button",left:"10px",top:"0px","css class":"pui-button-tree-level","icon position":"left",onclick:'myFunction = function (event, elem) {\n getObj("'+
|
|
1279
|
-
grid:ja,visibility:"visible"};ja.columnId=d.Qe;ja.column=ja.columnId.toString()}return ja}function z(ja){var oa=Ia-1;ja.icon="fontAwesome-solid:minus-square-tree-level";ja.visibility="visible";if(d.Ob[oa].Bu)ja.icon="fontAwesome-solid:plus-square-tree-level";for(var Ha=d.Ob[oa].iq,Ma=0;Ma<d.C.length;Ma++)if(d.C[Ma].columnId==ja.columnId){ja.column=d.C[Ma].column;var ya=d.Rr+(Ha-1)*10;ja.left=ya+"px";d.C[Ma].left=ya+20+"px";break}if(oa+1>=d.Ob.length||d.Ob[oa+
|
|
1280
|
-
if(d.c.disabled!=true)if(!d.designMode){var w=d.cells.length;if(d.h)w-=1;if(!(w<1)){if(d.wa==false){if(d.ea()){if(!ce){hd=ce=true;h(true);hd=false}if(!de){o();de=true}}var I=d.dataProps["custom sql"],H="";if(I==null||I==""){var J=d.dataProps["database file"],M=d.dataProps["database fields"],Y=d.dataProps["selection criteria"];H=d.dataProps["order by"];if(d.Cb!=null)H=d.Cb;if(M!=null&&M!=""&&J!=null&&J!=""){I="SELECT "+M+" FROM "+J;if(Y&&Y!="")I+=" WHERE "+Y;
|
|
1281
|
-
null)I+=" ORDER BY "+d.Cb}J=d.dataProps["data url"];if(J=="")J=null;if(I==null)I="";if(d.wa==false&&(I!=""||J!=null))if(k!=null){if(!(I==null||I=="")){var ea=",";w=".";var Q='"';if(pui.appJob!=null&&(pui.appJob.decimalFormat=="I"||pui.appJob.decimalFormat=="J")){ea=";";w=","}if(typeof pui["csv separator"]=="string")ea=pui["csv separator"];if(typeof pui["csv string delimiter"]=="string")Q=pui["csv string delimiter"];var X=document.createElement("form");
|
|
1282
|
-
var W=function(ja,oa){var Ha=Zb("input",ja);Ha.type="hidden";Ha.value=oa;X.appendChild(Ha)};pui.isCloud&&W("workspace_id",pui.cloud.ws.id);W("delimiter",ea);W("stringDelimiter",Q===""?"*NONE":Q);pui["read db driven data as ebcdic"]!==true&&W("UTF8","Y");W("decType",w);W("fileName",k+".csv");if(pui.secLevel>0){W("q",encodeURIComponent(pui.Wc(d.c)));w={};pui.ld(d.dataProps,w);for(var ca in w)W(ca,encodeURIComponent(w[ca]));if(H&&H!="")W("order",H);else Mb()==
|
|
1283
|
-
pui.xb.lf(I));W("AUTH",pui.ba?pui.ba:pui.appJob.auth);pui.ba||typeof pui.vId!=="undefined"&&W("VID",pui.vId);if(d.h&&d.Pk){if(d.ma){var ba="";d.ga.forEach(function(ja){var oa=ja.name;if(ja.blankHeader)oa="";oa=oa.replace(/"/g,'""');if(ba)ba+=ea;ba+=Q+oa+Q})}else{ba="";for(H=0;H<d.cells[0].length;H++){w=Oc(d.cells[0][H]);w=w.replace(/"/g,'""');if(ba!="")ba+=ea;ba+=Q+w+Q}}W("headings",ba)}typeof d.Lc==="string"&&d.Lc.length>0&&d.Lc.substring(1).split("&").forEach(function(ja){ja=
|
|
1284
|
-
decodeURIComponent(ja[1]))});document.body.appendChild(X);pui.skipConfirm=true;X.submit();setTimeout(function(){X.parentNode.removeChild(X);pui.skipConfirm=false},0)}}else{if(d.d!=null){if(d.d.type=="paging")d.d.Gb=d.j==1;d.c.style.visibility!="hidden"&&d.d.z()}var ha=d.j;if(sc!=null&&rc!=null&&tc>0)ha=tc;else d.clearData();var va=q;w=w;if(jb==null||jb.style.display=="none"){d.mask();d.Ib()}if(d.dataProps["load fields into widgets"]=="true"){va=m;if(d.dataProps["load all rows"]==
|
|
1285
|
-
Ua(I,w,ha,va,d.totalRecs==null,J,false):Ua(I,w,ha,va,d.totalRecs==null,J,true)}else if(R=="dspf"||pui.fa){I=d.dataArray;if(d.isFiltered())I=d.X;d.c.zi=0;H=d.j;if(I[d.j-1]&&I[d.j-1].o!=null)H=I[d.j-1].o;d.c.Vt=H;if(d.ro!=null&&!d.Vs)pui.um["toprrn."+d.ro]=H;d.clearData();ca=d.h?1:0;k=d.j+w-1;if(d.wa==false&&I.length<k&&(d.isFiltered()||d.d!=null)){d.j=d.j-k+I.length;if(d.j<1)d.j=1;k=I.length}d.$w();H=d.j;if(d.wa==true&&d.dataProps["load all rows"]!="true"){H=1;k=w}J=u();d.qf=
|
|
1286
|
-
k;H++){if(d.Es)ha=d.Es[H-1];ha||(ha={});M={};va=I[H-1];if(va==null||va.length==0)M.empty=true;else for(Y=0;Y<d.aa.length;Y++)M[d.aa[Y]]=va[Y];if(d.dataProps["load fields into widgets"]=="true"){M.__pui_show=true;M.__pui_skipdecode=true}va=d.Wd||d.Bj!=null||d.zj!=null;if(M.empty!=true){var Ia=I[H-1].o;if(Ia==null)Ia=H;va&&d.$c(ca,false,H-1);J!==null&&z(J);if(d.qf==0)d.qf=Ia;d.Ti=Ia;pui.Fp({designMode:false,name:pui.Hb(d.Wa),metaData:{items:d.C},data:M,Ds:ha,ref:d.ref,errors:d.errors,
|
|
1287
|
-
1,Y:d.Y,jq:J});if(d.Wd&&d.Bb!=null){M=pui.Hb(d.Wa)+"."+pui.L(d.Bb.fieldName)+"."+Ia;if(pui.O[M]==null){I[H-1].selection={modified:false,type:"grid selection",value:d.Bb.dataType=="indicator"?"0":" ",o:Ia,N:d.Bb};pui.O[M]=[];pui.O[M].push(I[H-1].selection)}}if(d.ye!=null){M=pui.Hb(d.Wa)+"."+pui.L(d.ye.fieldName)+"."+Ia;if(pui.O[M]==null){I[H-1].ze={modified:false,type:"grid hidden field",value:"0",o:Ia,N:d.ye};pui.O[M]=[];pui.O[M].push(I[H-1].ze)}}}else va&&d.$c(ca);ca++}if(va&&k<w)for(ha=
|
|
1288
|
-
w;ha++)d.$c(ha);if(d.ug&&d.Sf!==null&&d.kl!==null){ha=Db(d.c.id+d.vm+"."+d.kl);ha!==null&&ha.focus()}if(d.ea()&&d.dataProps["load all rows"]!="true"){d.qf+=d.j-1;d.Ti+=d.j-1}if(d.d!=null&&d.d.type=="sliding")d.d.Ra=d.wa&&d.dataProps["load all rows"]!="true"?d.totalRecs:I.length;if(d.c.style.visibility!="hidden"&&d.d!=null){d.d.z();typeof d.d.ph=="function"&&d.d.ph()}if(d.i!=null){d.i.Hl=parseInt((d.j+w*2-2)/w)+d.No-1;d.i.z()}d.xi=false;d.unMask()}}}};this.clearData=function(){if(!d.xi){var k;
|
|
1289
|
-
null)k=d.d.yu;for(var m=d.h?1:0;m<d.cells.length;m++)for(var q=0;q<d.cells[m].length;q++)for(var u=d.cells[m][q],z=u.firstChild;z;){if(z==k){z.style.display="none";z.Hh=true;d.c.appendChild(z)}else u.removeChild(z);z=u.firstChild}d.xi=true}};this.$w=function(){for(var k in d.oq)d.oq[k].Zw()};this.destroy=function(){d.Fd&&bc(document,"click",d.Oi);for(var k=d.n.length-1;k>=0;k-=1)d.n[k].parentNode!=null&&d.n[k].parentNode.removeChild(d.n[k]);for(k=d.k.length-1;k>=0;k-=1)d.k[k].parentNode!=
|
|
1290
|
-
d.d!=null&&d.d.destroy();d.i!=null&&d.i.destroy();d.Xb!=null&&d.Xb.destroy();xa!=null&&xa.parentNode.removeChild(xa);Oa!=null&&Oa.parentNode.removeChild(Oa);db!=null&&db.parentNode.removeChild(db);fa!=null&&fa.parentNode.removeChild(fa);fb!=null&&fb.parentNode.removeChild(fb);aa!=null&&aa.parentNode.removeChild(aa);ga!=null&&ga.parentNode.removeChild(ga);qa!=null&&qa.parentNode.removeChild(qa);Va!=null&&Va.parentNode.removeChild(Va);Xa=Wa=Sa=Va=null;try{$b(this);
|
|
1291
|
-
"",m=1;m<d.n.length;m++){var q=parseInt(d.n[m].style.left)-parseInt(d.n[m-1].style.left);k+=k==""?String(q):","+String(q)}return k};this.Pf=function(k){if(typeof k=="string")k=k.split(",");if(!(d.n.length<=0)){for(var m=parseInt(d.n[0].style.left),q=1;q<d.n.length;q++){var u=d.Vr,z=q-1;if(z<k.length)u=pui.Vd(k[z],50);m+=u;d.n[q].style.left=m+"px"}Ga();d.designMode&&d.La();T();d.setScrollBar();d.ec();d.dc(true)}};this.Le=function(){if(!d.fo)if(d.designMode){var k=
|
|
1292
|
-
var m=k.designer.selection;if(m.Sd.length==1&&m.Sd[0].e==k)d.dc();else{m.clear();m.add(k);d.dc(true)}}}};this.dc=function(k){if(d.designMode)if(!Ib.xh){var m=d.c.e;if(m!=null){var q=m.properties.height==="#subfileHeight"?"#subfileHeight":d.c.style.height,u;if(m.properties["number of rows"]!=="#rowsPerPageRDF"){u=d.k.length-1;if(u<0)u=0;u=String(u)}else u=m.properties["number of rows"];var z=d.n.length-1;if(z<0)z=0;z=String(z);var w=false;w=be(d,m,"number of rows",
|
|
1293
|
-
z)||w;w=be(d,m,"row height",d.la)||w;w=be(d,m,"header height",d.bb)||w;w=be(d,m,"column widths",d.sf())||w;w=be(d,m,"left",d.c.style.left)||w;w=be(d,m,"top",d.c.style.top)||w;w=be(d,m,"height",q)||w;if(w=be(d,m,"width",d.c.style.width)||w){m.designer.cp();R==="dspf"&&pui.ide.refreshRibbon()}if(w||k)m.designer.nb.refresh()}}};this.ec=function(k){if(d.h)if(!(d.cells.length<=0))for(var m=e(),q=d.cells[0],u=0,z=q.length;u<z;u++){var w=q[u],I=false,H=null;if(d.designMode==
|
|
1294
|
-
d.xj(w)}if(w.Zc!=null){H=w.Zc;H.parentNode!=null&&H.parentNode.removeChild(H)}}if(d.columnHeadings.length<=u)w.innerHTML="";else{var J="";if(w.style.textAlign!=null&&w.style.textAlign!="")J=" text-align:"+w.style.textAlign;var M="<div";if(d.Oc)M+=' class="qf"';M+=' style="'+m+J+'">';if(d.ma&&k&&k[u])M+=k[u];else if(d.columnHeadings[u])M+=d.columnHeadings[u];w.innerHTML=M+"</div>"}I&&d.hm(w);I=false;if(d.designMode==false&&d.sortable==true)if(H!=null)B(w,H);else if(d.fc!=
|
|
1295
|
-
null&&d.zf==w.w)I=true;else if(d.c.ng!=null&&typeof d.Qi==="string"&&d.Qi.toUpperCase()==d.xo(w.col,parseInt(d.c.dx)))I=true;if(I){F();B(w,d.fc)}}if(d.Oc){H=document.createElement("input");H.type="text";H.className="qf";H.placeholder=pui.getLanguageText("runtimeText","filter text")+"...";if(d.designMode)H.disabled=true;else{H.addEventListener("mousedown",d.Xq);H.addEventListener("click",d.Xq);H.addEventListener("focus",d.$a);H.addEventListener("input",d.$a);
|
|
1296
|
-
d.$a)}w.appendChild(H);w=w.sa;if(typeof w==="string"&&w.length>0)H.value=w}}};this.bw=function(){if(d.h)if(!(d.cells.length<=0))for(var k=0;k<d.cells[0].length;k++)d.cells[0][k].innerHTML=""};this.ol=function(k){function m(J){function M(){if(d.c.eh!=null){d.On=String(J.w);pui.ne=d;pui.bc();pui.ne=null}else if(d.c.ng!=null){d.Ei=d.xo(J.col,parseInt(d.c.gs));if(d.Ei==null)d.Nf=null;else{pui.qe=d;pui.bc();pui.qe=null}}else s(J)}U(J,"click",
|
|
1297
|
-
0)){var q=d.cells[0];if(d.dataProps["database file"]!=null&&d.dataProps["database file"]!=""&&(d.dataProps["custom sql"]==null||d.dataProps["custom sql"]=="")&&(d.dataProps["data url"]==null||d.dataProps["data url"]=="")&&d.dataProps["database fields"]!=null&&d.dataProps["database fields"]!=""&&d.dataProps["load all rows"]!="true"){k=pui.oh(d.dataProps["database fields"]);for(var u=0;u<k.length;u++)if(q[u]){q[u].fieldName=
|
|
1298
|
-
""||d.dataProps["data url"]!=null&&d.dataProps["data url"]!="")&&d.dataProps["load all rows"]!="true"){k=d.n.length-1;for(u=0;u<k;u++)f(q[u])}else if(!(d.dataProps["load all rows"]=="true"&&d.wa==false)){for(u=0;u<d.C.length;u++){var z=d.C[u],w=Number(z.column),I=z.value;if(z["field type"]=="html container")I=z.html;if(pui.p(I)&&!isNaN(w)&&w>=0&&w<q.length&&q[w]&&q[w].Tj==null){z=pui.L(I.fieldName);for(var H=0;H<d.aa.length;H++)if(z==
|
|
1299
|
-
I;if(I.dateFormat)q[w].dateFormat=I.dateFormat;if(!pui.pa)q[w].style.cursor="pointer";m(q[w]);break}}}k||h()}}};this.my=function(){var k=g();if(k!=null){if(ld&&!d.ma){var m=k.colWidths;if(m!=null){d.Pf(m);d.La();d.ec()}}if(Qa&&!d.ma){var q=k.colSequence;if(q!=null){var u=Array(q.length);for(m=0;m<u.length;m++)u[m]=d.cells[0][q[m]];for(m=0;m<u.length;m++)d.moveColumn(u[m].col,m)}}if(d.ma){q=k.hidableColState;if(m=k.colWidths)m=m.filter(ka());
|
|
1300
|
-
H){return I.savedColumn>H.savedColumn?1:-1}).forEach(function(I){var H=I.columnId;if(H!==undefined){d.ga.every(function(M){if(M.columnId===H){I.blankHeader=M.blankHeader;I.name=M.name;I.field=M.field;return false}return true});if(I.showing){if(Qa){var J=Da(H);J>=0&&J!=I.savedColumn&&d.moveColumn(J,I.savedColumn)}}else d.Lp(H)}});if(q)u.yi=q;d.ga=u;d.ga.sort(function(I,H){var J=null,M=null;z.every(function(Y,ea){if(I.columnId===
|
|
1301
|
-
return true});return J>M?1:-1})}}if(m){d.Pf(m);d.La()}d.kd&&d.Wb();d.ec(d.ss(d.ga))}l(k,true,s);q=k.filters;if(q!=null&&!d.ea())for(m=0;m<q.length;m++){u=k.filters[m].column;var w=k.filters[m].text;w==null||w==""?d.removeFilter(u):d.setFilter(u,w)}}};this.it=function(k){Kc=null;Sa=[];if(k instanceof Array){t(true);var m="",q="",u="",z="";n(k,function(J,M){return J.Jr===M.w},function(J,M){q+=z+J.Jr;if(d.c.ng!=null)u+=
|
|
1302
|
-
M){return J.columnId>M.columnId?J:M}).columnId;for(var w=0;w<=k;w++){for(var I=false,H=0;H<d.cells[0].length;H++)if(d.cells[0][H].w===w){m+=z+(d.cells[0][H].ra?"D":"A");z=",";I=true;break}if(!I){m+=z+(p(w)?"D":"A");z=","}}if(d.c.eh!=null){d.On=q;pui.ne=d;if(d.c.Jh!=null)d.Nf=m;pui.bc();pui.ne=null}else if(d.c.ng!=null){d.Ei=u;if(d.Ei==null)d.Nf=null;else{if(d.c.Jh!=null)d.Nf=m;pui.qe=d;pui.bc();pui.qe=
|
|
1303
|
-
this.dw=function(k,m){if(!d.Tr){d.Tr=true;var q=Number(d.dataProps["starting row"]),u=Number(d.dataProps["ending row"]);if(!(isNaN(q)||isNaN(u)))if(d.dataProps["data columns"]!=null){for(var z=[],w=0;w<k;w++){var I="data columns";if(w>0)I+=" "+(w+1);z[w]=d.dataProps[I].split(",")}d.dataArray=[];d.j=1;I=0;d.h&&I++;for(q=q;q<=u;q+=k){var H=I-(d.h?1:0);d.dataArray[H]=[];d.dataArray[H].selected=false;for(w=
|
|
1304
|
-
if(ea!=null&&ea.substr(0,6)=="window"){var Q=parseInt(ea.substr(6,1));if(!isNaN(Q)&&Q>0)Y+="_W"+Q}var X=Db(Y),W,ca;if(X==null){Y="I_"+(q+w)+"_"+M;X=Db(Y);if(X==null)if(!isNaN(Q)&&Q>0)Y+="_W"+Q;X=Db(Y);if(X==null)continue;d.d!=null&&d.d.type=="paging"&&d.d.Ci(X);if(!X.readOnly)continue;M=X.value;M=M.replace(/ /g," ");X.style.display="none";Y=X.className;ea=parseInt(X.style.left);W=parseInt(X.style.top);
|
|
1305
|
-
X.B;X.parentNode.removeChild(X);d.d!=null&&d.d.type=="paging"&&d.d.Ci(X)}if(Y==null||Y==""||Y=="A20")Y="";else if(Y.indexOf("readOnly")!=-1){Y=pui.Cp(Y,"readOnly");Y=pui.Cp(Y,"input")}X=J;if(k>1)X=0;if(d.cells.length<=I)break;var ba=d.cells[I][X];if(ba!=null){var ha=document.createElement("div");ha.className=Y;ha.innerHTML=M;d.dataArray[H][X]=M.replace(/ /g," ");ha.style.position="absolute";ea-=parseInt(ba.style.left);
|
|
1306
|
-
parseInt(ba.style.top);W-=parseInt(d.c.style.top);if(m==true||k==1)W=5;ha.style.top=W+"px";ha.B=ca;U(ha,"click",setPos);if(k==1){ba.B=ca;U(ba,"click",setPos)}ba.appendChild(ha)}}I++}}}};this.setScrollBar=function(){if(d.i.b==null){d.i.b=d.b;d.i.grid=d;d.i.init();d.i.z()}d.i.x=parseInt(d.c.style.left);d.i.y=parseInt(d.c.style.top);var k=parseInt(d.c.style.height);if(isNaN(k))k=0;d.i.y+=k;d.i.width=parseInt(d.c.style.width);
|
|
1307
|
-
d.i.position();var m=true;if(d.k.length<2)m=false;if(d.k.length<3&&d.h)m=false;if(d.n.length<2)m=false;if(!d.Kf&&!d.Cc)m=false;k="paging";if(d.Cc)k="sliding";if(R=="genie"&&!d.designMode&&d.ea())k="sliding";if(m&&(d.d==null||d.d!=null&&d.d.type!=k)){d.d!=null&&d.d.destroy();if(k=="paging"){d.d=new pui.Su;d.d.grid=d}if(k=="sliding"){d.d=new pui.Uu;if(R=="genie"&&!pui.fa)d.d.Lf=true}d.d.b=d.b;d.d.zIndex=d.sy;d.d.designMode=
|
|
1308
|
-
"none"){d.mask();d.Ib()}d.j=w;if(!(d==null||d.cells==null)){d.getData();d.yt(true)}};d.d.onchange=function(){d.ea()&&d.dataProps["load all rows"]!="true"&&d.clearData()};d.d.Ci(d.c)}if(k=="paging"){d.d.gj=function(){if(O("onpageup")==false)return false;if(d.wa==false&&d.ea()){if(d.j>1){var w=d.cells.length;if(d.h)w-=1;d.j-=w;if(d.j<1)d.j=1;d.getData()}return true}else if(d.wa==true||R=="dspf"||pui.fa){pui.Fj=d.Wa;pui.qh({},
|
|
1309
|
-
d.d=null;d.setScrollBar()},250)}else if(R=="genie"){Wb("PageUp");return true}};d.d.fj=function(){if(O("onpagedown")==false)return false;if(d.wa==false&&d.ea()){var w=d.cells.length;if(d.h)w-=1;d.j+=w;d.getData();return true}else if(d.wa==true||R=="dspf"||pui.fa){pui.Fj=d.Wa;pui.qh({},"PageDown");d.d.type=="paging"&&pui.Mb&&setTimeout(function(){d.d.destroy();d.d=null;d.setScrollBar()},250)}else if(R=="genie"){Wb("PageDown");
|
|
1310
|
-
d.designMode&&m<ma)m=ma;var q=23;if(pui.is_touch&&!pui.is_mouse_capable&&!d.designMode||pui.pa)q=0;d.d.x=parseInt(d.n[d.n.length-1].style.left)-q;if(!d.designMode&&d.b!=null&&d.b.tagName=="DIV"&&d.b.getAttribute("container")=="true"){var u=d.b.parentNode;if(u!=null&&u.tagName=="DIV"&&u.style.overflowX=="scroll"){var z=u.parentNode;if(z!=null&&z.tagName=="DIV"&&z.pui!=null&&z.pui.properties!=null&&z.pui.properties.template==
|
|
1311
|
-
d.c.offsetWidth+d.c.offsetLeft){d.d.x=z.offsetWidth-q+2+u.scrollLeft;u.onscroll=function(){if(d.d){d.d.x=z.offsetWidth-q+2+u.scrollLeft;d.c.style.visibility!="hidden"&&d.d.z(true)}}}}}d.d.y=parseInt(d.c.style.top)+m;if(k=="paging"){d.d.height=d.pc("height")-m;if(d.d.height<0)d.d.height=0;if(d.ea()){d.d.Gb=d.Gb();d.d.Tb=d.Tb()}}if(k=="sliding"){d.d.interval=!d.ea()||d.dataProps["load fields into widgets"]=="true"&&d.dataProps["load all rows"]==
|
|
1312
|
-
d.la;d.d.borderWidth=m;if(d.designMode)d.d.Ra=k*3;if(d.Qp=="row number"){d.d.Qh=true;d.d.Rh=false}else if(d.Qp=="row range"){d.d.Qh=false;d.d.Rh=true}else{d.d.Qh=false;d.d.Rh=false}}if(d.h){k=d.bb;d.d.y+=k;k=-k;d.d.height+=k}d.c.style.visibility!="hidden"&&d.d.z()}else if(d.d!=null){d.d.destroy();d.d=null}};this.pc=function(k){k=parseInt(d.c.style[k]);if(isNaN(k))k=0;return k};this.setProperty=function(k,m,q){if(m==null)m="";if(k.indexOf("parameter value")==
|
|
1313
|
-
if(z!=null&&z[1]!=null)u=z[1];z=/^(grid row translation placeholder key) \d+$/.exec(k);if(z!=null&&z[1]!=null)u=z[1];z=/^(grid row translation placeholder value) \d+$/.exec(k);if(z!=null&&z[1]!=null)u=z[1];switch(u){case "id":case "parent window":case "screen identifier":case "field type":case "value":case "color":case "display subfile":case "display control record":case "initialize subfile":case "subfile records not active":case "delete subfile":case "clear subfile":case "subfile size":case "subfile next changed":case "subfile record number":case "cursor record number":case "cursor progression":case "subfile return rrn":case "subfile changed":case "subfile message key":case "subfile control program message queue":case "allow drag":case "ondragstart":case "drop targets":case "ondragenter":case "ondragleave":case "ondrop":case "return mode":case "selection field":case "row is hidden field":case "tree level field":case "column sort response":case "right":case "bottom":break;
|
|
1273
|
+
Ob.style.display="block";if(d.h)m-=d.bb;if(m>100){m=100;if(k<100)m=k-5}if(m<35)m=35;Ob.style.width=m+"px";Ob.style.height=m+"px";Ob.className="pui-animation pui-grid-animation";Ab.appendChild(Ob)}};this.getData=function(k){function m(ja,oa,Ha){if(!(d==null||d.cells==null)){if(oa!=null)d.totalRecs=oa;d.saveFieldNames=d.aa;d.aa=[];d.X=[];d.clear(false);d.gc=false;d.dataProps["load all rows"]=="true"&&t(false);if(ja.length>=1){for(var Ma in ja[0])d.aa.push(pui.L(Ma));d.saveFieldNames=d.aa;for(oa=0;oa<
|
|
1274
|
+
ja.length;oa++){d.dataArray[oa]=[];d.X[oa]=[];var ya=ja[oa],Aa=0;for(Ma in ya){var Ra=ya[Ma];d.dataArray[oa][Aa]=Ra;d.X[oa][Aa]=Ra;Aa++}}}d.wa=true;d.getData();if(d.dataProps["load all rows"]=="true"&&d.isFiltered()&&Pa){ja=g();Ma=ja.filters;if(Ma!=null){d.sc=false;for(oa=0;oa<Ma.length;oa++){ya=ja.filters[oa].column;Aa=ja.filters[oa].text;Aa==null||Aa==""?d.removeFilter(ya):d.setFilter(ya,Aa)}d.sc=true}}if(d.dataProps["load all rows"]=="true"&&d.h&&d.cells.length>0){ja=d.cells[0];for(oa=0;oa<ja.length;oa++)if(ja[oa].Tj)ja[oa].Tj=
|
|
1275
|
+
null;d.ol(false)}d.unMask();if(d.dataProps["load all rows"]!="true")d.wa=false;if(d.d!=null)if(d.d.type=="paging")setTimeout(function(){d.d.destroy();d.d=null;d.setScrollBar()},250);else if(d.d.type=="sliding")if(d.totalRecs!=null){d.d.Ra=d.totalRecs;Ha>0&&d.d.td(d.j,true)}if(d.c.style.visibility!="hidden"&&d.d!=null){d.d.z();typeof d.d.ph=="function"&&d.d.ph()}d.xi=false}}function q(ja,oa,Ha){function Ma(Gb){return Gb.columnId===Ra}if(!(d==null||d.cells==null)){if(oa!=null)d.totalRecs=oa;if(Ha>0){d.j=
|
|
1276
|
+
Ha;d.clearData()}oa=e();for(var ya=Array(d.cells[0].length),Aa=0;Aa<d.cells[0].length;Aa++)ya[d.cells[0][Aa].w]=Aa;if((d.sl||d.ma)&&ja.length>0&&d.ga.length){var Ra=0;for(var Jb in ja[0]){if(Aa=d.ga.find(Ma))Aa.field=Jb;Ra++}}for(Aa=d.qf=0;Aa<ja.length;Aa++){if(d.qf==0)d.qf=Aa+1+(d.j-1);d.Ti=Aa+1+(d.j-1);var Na=ja[Aa],cb=0,Bb=d.cells[Aa+(d.h?1:0)];if(Bb!=null)for(Jb in Na){var Ta=Bb.length;if(d.ma&&d.ga.length)Ta=d.ga.length;if(cb<Ta){Ta=Na[Jb];var cc="";Ra=pui.secLevel>0?ya[cb]:cb;if(d.ma){if(Ra==
|
|
1277
|
+
undefined){cb++;continue}if(d.I["text align"]){var Tb=d.I["text align"].split(",");if(Tb[cb])cc=" text-align:"+Tb[cb]}}else if(Bb[Ra].style.textAlign!=null&&Bb[Ra].style.textAlign!="")cc=" text-align:"+Bb[Ra].style.textAlign;if(pui.appJob.decimalFormat=="J"&&Ta.charAt(0)==","&&Ta.length>1&&!Number.isNaN(Number.parseInt(Ta.substring(1))))Ta="0"+Ta;Bb[Ra].innerHTML='<div style="'+oa+cc+'" class="dbd">'+Ta+"</div>";if(d.Y!=null&&d.Y.text!=""&&(Ra===d.Y.col||d.Y.col==="*all"))if(Bb[Ra].tagName=="DIV"){pui.Xk(Bb[Ra],
|
|
1278
|
+
d.Y.text);Bb[Ra].Yk=true}}cb++}}ja=d.cells.length;if(d.h)ja-=1;if(d.d!=null)if(d.d.type=="paging")setTimeout(function(){d.d.destroy();d.d=null;d.setScrollBar()},250);else if(d.d.type=="sliding")if(d.totalRecs!=null){d.d.Ra=d.totalRecs;Ha>0&&d.d.td(d.j,true)}if(d.c.style.visibility!="hidden"&&d.d!=null){d.d.z();typeof d.d.ph=="function"&&d.d.ph()}if(d.i!=null){d.i.Hl=parseInt((d.j+ja*2-2)/ja)+d.No-1;d.i.z()}d.xi=false}}function u(){var ja=null;if(d.ug&&d.Sf!==null){if(d.Ob)if(d.Ob.length<1&&d.kd)d.Ob=
|
|
1279
|
+
null;if(d.Ob==null){d.Ob=[];for(ja=0;ja<d.dataArray.length;ja++){var oa={iq:d.getDataValue(ja+1,d.Sf),Bu:false};d.Ob.push(oa)}d.xe=new pui.uq;d.xe.load(d.Ob)}if(!d.Cu){d.Cu=true;d.Rr=null;ja=d.Qw();for(oa=0;oa<d.C.length;oa++)if(d.C[oa].columnId==ja){ja=d.C[oa].left;if(ja===undefined)ja="10px";ja=ja.substring(0,ja.indexOf("px"));ja=parseInt(ja);d.Rr=ja;break}}ja=d.c.id;ja={id:ja+d.vm,"field type":"graphic button",left:"10px",top:"0px","css class":"pui-button-tree-level","icon position":"left",onclick:'myFunction = function (event, elem) {\n getObj("'+
|
|
1280
|
+
ja+'").grid.toggleTreeLevel(rrn);\n}\n\n',grid:ja,visibility:"visible"};ja.columnId=d.Qe;ja.column=ja.columnId.toString()}return ja}function z(ja){var oa=Ia-1;ja.icon="fontAwesome-solid:minus-square-tree-level";ja.visibility="visible";if(d.Ob[oa].Bu)ja.icon="fontAwesome-solid:plus-square-tree-level";for(var Ha=d.Ob[oa].iq,Ma=0;Ma<d.C.length;Ma++)if(d.C[Ma].columnId==ja.columnId){ja.column=d.C[Ma].column;var ya=d.Rr+(Ha-1)*10;ja.left=ya+"px";d.C[Ma].left=ya+20+"px";break}if(oa+1>=d.Ob.length||d.Ob[oa+
|
|
1281
|
+
1].iq<=Ha)ja.visibility="hidden"}d.Oi();if(d.c.disabled!=true)if(!d.designMode){var w=d.cells.length;if(d.h)w-=1;if(!(w<1)){if(d.wa==false){if(d.ea()){if(!ce){hd=ce=true;h(true);hd=false}if(!de){o();de=true}}var I=d.dataProps["custom sql"],H="";if(I==null||I==""){var J=d.dataProps["database file"],M=d.dataProps["database fields"],Y=d.dataProps["selection criteria"];H=d.dataProps["order by"];if(d.Cb!=null)H=d.Cb;if(M!=null&&M!=""&&J!=null&&J!=""){I="SELECT "+M+" FROM "+J;if(Y&&Y!="")I+=" WHERE "+Y;
|
|
1282
|
+
if(H&&H!="")I+=" ORDER BY "+H}}else if(d.Cb!=null)I+=" ORDER BY "+d.Cb}J=d.dataProps["data url"];if(J=="")J=null;if(I==null)I="";if(d.wa==false&&(I!=""||J!=null))if(k!=null){if(!(I==null||I=="")){var ea=",";w=".";var Q='"';if(pui.appJob!=null&&(pui.appJob.decimalFormat=="I"||pui.appJob.decimalFormat=="J")){ea=";";w=","}if(typeof pui["csv separator"]=="string")ea=pui["csv separator"];if(typeof pui["csv string delimiter"]=="string")Q=pui["csv string delimiter"];var X=document.createElement("form");
|
|
1283
|
+
X.action=Xb("PUI0009107.pgm");X.method="post";var W=function(ja,oa){var Ha=Zb("input",ja);Ha.type="hidden";Ha.value=oa;X.appendChild(Ha)};pui.isCloud&&W("workspace_id",pui.cloud.ws.id);W("delimiter",ea);W("stringDelimiter",Q===""?"*NONE":Q);pui["read db driven data as ebcdic"]!==true&&W("UTF8","Y");W("decType",w);W("fileName",k+".csv");if(pui.secLevel>0){W("q",encodeURIComponent(pui.Wc(d.c)));w={};pui.ld(d.dataProps,w);for(var ca in w)W(ca,encodeURIComponent(w[ca]));if(H&&H!="")W("order",H);else Mb()==
|
|
1284
|
+
"mssql"&&W("order","(select null)")}else W("q",pui.xb.lf(I));W("AUTH",pui.ba?pui.ba:pui.appJob.auth);pui.ba||typeof pui.vId!=="undefined"&&W("VID",pui.vId);if(d.h&&d.Pk){if(d.ma){var ba="";d.ga.forEach(function(ja){var oa=ja.name;if(ja.blankHeader)oa="";oa=oa.replace(/"/g,'""');if(ba)ba+=ea;ba+=Q+oa+Q})}else{ba="";for(H=0;H<d.cells[0].length;H++){w=Oc(d.cells[0][H]);w=w.replace(/"/g,'""');if(ba!="")ba+=ea;ba+=Q+w+Q}}W("headings",ba)}typeof d.Lc==="string"&&d.Lc.length>0&&d.Lc.substring(1).split("&").forEach(function(ja){ja=
|
|
1285
|
+
ja.split("=");W(ja[0],decodeURIComponent(ja[1]))});document.body.appendChild(X);pui.skipConfirm=true;X.submit();setTimeout(function(){X.parentNode.removeChild(X);pui.skipConfirm=false},0)}}else{if(d.d!=null){if(d.d.type=="paging")d.d.Gb=d.j==1;d.c.style.visibility!="hidden"&&d.d.z()}var ha=d.j;if(sc!=null&&rc!=null&&tc>0)ha=tc;else d.clearData();var va=q;w=w;if(jb==null||jb.style.display=="none"){d.mask();d.Ib()}if(d.dataProps["load fields into widgets"]=="true"){va=m;if(d.dataProps["load all rows"]==
|
|
1286
|
+
"true")w=-1}R=="genie"?Ua(I,w,ha,va,d.totalRecs==null,J,false):Ua(I,w,ha,va,d.totalRecs==null,J,true)}else if(R=="dspf"||pui.fa){I=d.dataArray;if(d.isFiltered())I=d.X;d.c.zi=0;H=d.j;if(I[d.j-1]&&I[d.j-1].o!=null)H=I[d.j-1].o;d.c.Vt=H;if(d.ro!=null&&!d.Vs)pui.um["toprrn."+d.ro]=H;d.clearData();ca=d.h?1:0;k=d.j+w-1;if(d.wa==false&&I.length<k&&(d.isFiltered()||d.d!=null)){d.j=d.j-k+I.length;if(d.j<1)d.j=1;k=I.length}d.$w();H=d.j;if(d.wa==true&&d.dataProps["load all rows"]!="true"){H=1;k=w}J=u();d.qf=
|
|
1287
|
+
0;d.kl=null;for(H=H;H<=k;H++){if(d.Es)ha=d.Es[H-1];ha||(ha={});M={};va=I[H-1];if(va==null||va.length==0)M.empty=true;else for(Y=0;Y<d.aa.length;Y++)M[d.aa[Y]]=va[Y];if(d.dataProps["load fields into widgets"]=="true"){M.__pui_show=true;M.__pui_skipdecode=true}va=d.Wd||d.Bj!=null||d.zj!=null;if(M.empty!=true){var Ia=I[H-1].o;if(Ia==null)Ia=H;va&&d.$c(ca,false,H-1);J!==null&&z(J);if(d.qf==0)d.qf=Ia;d.Ti=Ia;pui.Fp({designMode:false,name:pui.Hb(d.Wa),metaData:{items:d.C},data:M,Ds:ha,ref:d.ref,errors:d.errors,
|
|
1288
|
+
Dj:ca,o:Ia,Ub:H-1,Y:d.Y,jq:J});if(d.Wd&&d.Bb!=null){M=pui.Hb(d.Wa)+"."+pui.L(d.Bb.fieldName)+"."+Ia;if(pui.O[M]==null){I[H-1].selection={modified:false,type:"grid selection",value:d.Bb.dataType=="indicator"?"0":" ",o:Ia,N:d.Bb};pui.O[M]=[];pui.O[M].push(I[H-1].selection)}}if(d.ye!=null){M=pui.Hb(d.Wa)+"."+pui.L(d.ye.fieldName)+"."+Ia;if(pui.O[M]==null){I[H-1].ze={modified:false,type:"grid hidden field",value:"0",o:Ia,N:d.ye};pui.O[M]=[];pui.O[M].push(I[H-1].ze)}}}else va&&d.$c(ca);ca++}if(va&&k<w)for(ha=
|
|
1289
|
+
k+1;ha<=w;ha++)d.$c(ha);if(d.ug&&d.Sf!==null&&d.kl!==null){ha=Db(d.c.id+d.vm+"."+d.kl);ha!==null&&ha.focus()}if(d.ea()&&d.dataProps["load all rows"]!="true"){d.qf+=d.j-1;d.Ti+=d.j-1}if(d.d!=null&&d.d.type=="sliding")d.d.Ra=d.wa&&d.dataProps["load all rows"]!="true"?d.totalRecs:I.length;if(d.c.style.visibility!="hidden"&&d.d!=null){d.d.z();typeof d.d.ph=="function"&&d.d.ph()}if(d.i!=null){d.i.Hl=parseInt((d.j+w*2-2)/w)+d.No-1;d.i.z()}d.xi=false;d.unMask()}}}};this.clearData=function(){if(!d.xi){var k;
|
|
1290
|
+
if(d.d!=null)k=d.d.yu;for(var m=d.h?1:0;m<d.cells.length;m++)for(var q=0;q<d.cells[m].length;q++)for(var u=d.cells[m][q],z=u.firstChild;z;){if(z==k){z.style.display="none";z.Hh=true;d.c.appendChild(z)}else u.removeChild(z);z=u.firstChild}d.xi=true}};this.$w=function(){for(var k in d.oq)d.oq[k].Zw()};this.destroy=function(){d.Fd&&bc(document,"click",d.Oi);for(var k=d.n.length-1;k>=0;k-=1)d.n[k].parentNode!=null&&d.n[k].parentNode.removeChild(d.n[k]);for(k=d.k.length-1;k>=0;k-=1)d.k[k].parentNode!=
|
|
1291
|
+
null&&d.k[k].parentNode.removeChild(d.k[k]);d.d!=null&&d.d.destroy();d.i!=null&&d.i.destroy();d.Xb!=null&&d.Xb.destroy();xa!=null&&xa.parentNode.removeChild(xa);Oa!=null&&Oa.parentNode.removeChild(Oa);db!=null&&db.parentNode.removeChild(db);fa!=null&&fa.parentNode.removeChild(fa);fb!=null&&fb.parentNode.removeChild(fb);aa!=null&&aa.parentNode.removeChild(aa);ga!=null&&ga.parentNode.removeChild(ga);qa!=null&&qa.parentNode.removeChild(qa);Va!=null&&Va.parentNode.removeChild(Va);Xa=Wa=Sa=Va=null;try{$b(this);
|
|
1292
|
+
d=null}catch(m){}};this.sf=function(){for(var k="",m=1;m<d.n.length;m++){var q=parseInt(d.n[m].style.left)-parseInt(d.n[m-1].style.left);k+=k==""?String(q):","+String(q)}return k};this.Pf=function(k){if(typeof k=="string")k=k.split(",");if(!(d.n.length<=0)){for(var m=parseInt(d.n[0].style.left),q=1;q<d.n.length;q++){var u=d.Vr,z=q-1;if(z<k.length)u=pui.Vd(k[z],50);m+=u;d.n[q].style.left=m+"px"}Ga();d.designMode&&d.La();T();d.setScrollBar();d.ec();d.dc(true)}};this.Le=function(){if(!d.fo)if(d.designMode){var k=
|
|
1293
|
+
d.c.e;if(k!=null){k.designer.Af.update();var m=k.designer.selection;if(m.Sd.length==1&&m.Sd[0].e==k)d.dc();else{m.clear();m.add(k);d.dc(true)}}}};this.dc=function(k){if(d.designMode)if(!Ib.xh){var m=d.c.e;if(m!=null){var q=m.properties.height==="#subfileHeight"?"#subfileHeight":d.c.style.height,u;if(m.properties["number of rows"]!=="#rowsPerPageRDF"){u=d.k.length-1;if(u<0)u=0;u=String(u)}else u=m.properties["number of rows"];var z=d.n.length-1;if(z<0)z=0;z=String(z);var w=false;w=be(d,m,"number of rows",
|
|
1294
|
+
u)||w;w=be(d,m,"number of columns",z)||w;w=be(d,m,"row height",d.la)||w;w=be(d,m,"header height",d.bb)||w;w=be(d,m,"column widths",d.sf())||w;w=be(d,m,"left",d.c.style.left)||w;w=be(d,m,"top",d.c.style.top)||w;w=be(d,m,"height",q)||w;if(w=be(d,m,"width",d.c.style.width)||w){m.designer.cp();R==="dspf"&&pui.ide.refreshRibbon()}if(w||k)m.designer.nb.refresh()}}};this.ec=function(k){if(d.h)if(!(d.cells.length<=0))for(var m=e(),q=d.cells[0],u=0,z=q.length;u<z;u++){var w=q[u],I=false,H=null;if(d.designMode==
|
|
1295
|
+
false){if(w.nc!=null){I=true;d.xj(w)}if(w.Zc!=null){H=w.Zc;H.parentNode!=null&&H.parentNode.removeChild(H)}}if(d.columnHeadings.length<=u)w.innerHTML="";else{var J="";if(w.style.textAlign!=null&&w.style.textAlign!="")J=" text-align:"+w.style.textAlign;var M="<div";if(d.Oc)M+=' class="qf"';M+=' style="'+m+J+'">';if(d.ma&&k&&k[u])M+=k[u];else if(d.columnHeadings[u])M+=d.columnHeadings[u];w.innerHTML=M+"</div>"}I&&d.hm(w);I=false;if(d.designMode==false&&d.sortable==true)if(H!=null)B(w,H);else if(d.fc!=
|
|
1296
|
+
null){if(Kc==w.w)I=true;else if(d.c.eh!=null&&d.zf==w.w)I=true;else if(d.c.ng!=null&&typeof d.Qi==="string"&&d.Qi.toUpperCase()==d.xo(w.col,parseInt(d.c.dx)))I=true;if(I){F();B(w,d.fc)}}if(d.Oc){H=document.createElement("input");H.type="text";H.className="qf";H.placeholder=pui.getLanguageText("runtimeText","filter text")+"...";if(d.designMode)H.disabled=true;else{H.addEventListener("mousedown",d.Xq);H.addEventListener("click",d.Xq);H.addEventListener("focus",d.$a);H.addEventListener("input",d.$a);
|
|
1297
|
+
H.addEventListener("keydown",d.$a);H.addEventListener("blur",d.$a)}w.appendChild(H);w=w.sa;if(typeof w==="string"&&w.length>0)H.value=w}}};this.bw=function(){if(d.h)if(!(d.cells.length<=0))for(var k=0;k<d.cells[0].length;k++)d.cells[0][k].innerHTML=""};this.ol=function(k){function m(J){function M(){if(d.c.eh!=null){d.On=String(J.w);pui.ne=d;pui.bc();pui.ne=null}else if(d.c.ng!=null){d.Ei=d.xo(J.col,parseInt(d.c.gs));if(d.Ei==null)d.Nf=null;else{pui.qe=d;pui.bc();pui.qe=null}}else s(J)}U(J,"click",
|
|
1298
|
+
M);J.nm=M}if(d.sortable)if(!(R!="dspf"&&!pui.fa))if(d.h)if(!(d.cells.length<=0)){var q=d.cells[0];if(d.dataProps["database file"]!=null&&d.dataProps["database file"]!=""&&(d.dataProps["custom sql"]==null||d.dataProps["custom sql"]=="")&&(d.dataProps["data url"]==null||d.dataProps["data url"]=="")&&d.dataProps["database fields"]!=null&&d.dataProps["database fields"]!=""&&d.dataProps["load all rows"]!="true"){k=pui.oh(d.dataProps["database fields"]);for(var u=0;u<k.length;u++)if(q[u]){q[u].fieldName=
|
|
1299
|
+
k[u];f(q[u])}}else if((d.dataProps["custom sql"]!=null&&d.dataProps["custom sql"]!=""||d.dataProps["data url"]!=null&&d.dataProps["data url"]!="")&&d.dataProps["load all rows"]!="true"){k=d.n.length-1;for(u=0;u<k;u++)f(q[u])}else if(!(d.dataProps["load all rows"]=="true"&&d.wa==false)){for(u=0;u<d.C.length;u++){var z=d.C[u],w=Number(z.column),I=z.value;if(z["field type"]=="html container")I=z.html;if(pui.p(I)&&!isNaN(w)&&w>=0&&w<q.length&&q[w]&&q[w].Tj==null){z=pui.L(I.fieldName);for(var H=0;H<d.aa.length;H++)if(z==
|
|
1300
|
+
d.aa[H]){q[w].Tj=H;q[w].fieldName=z;q[w].dataType=I.dataType;q[w].fs=I;if(I.dateFormat)q[w].dateFormat=I.dateFormat;if(!pui.pa)q[w].style.cursor="pointer";m(q[w]);break}}}k||h()}}};this.my=function(){var k=g();if(k!=null){if(ld&&!d.ma){var m=k.colWidths;if(m!=null){d.Pf(m);d.La();d.ec()}}if(Qa&&!d.ma){var q=k.colSequence;if(q!=null){var u=Array(q.length);for(m=0;m<u.length;m++)u[m]=d.cells[0][q[m]];for(m=0;m<u.length;m++)d.moveColumn(u[m].col,m)}}if(d.ma){q=k.hidableColState;if(m=k.colWidths)m=m.filter(ka());
|
|
1301
|
+
if(q){var z=q.cols;u=z.map(ka());q=k.colSequence;if(u!=null){u.sort(function(I,H){return I.savedColumn>H.savedColumn?1:-1}).forEach(function(I){var H=I.columnId;if(H!==undefined){d.ga.every(function(M){if(M.columnId===H){I.blankHeader=M.blankHeader;I.name=M.name;I.field=M.field;return false}return true});if(I.showing){if(Qa){var J=Da(H);J>=0&&J!=I.savedColumn&&d.moveColumn(J,I.savedColumn)}}else d.Lp(H)}});if(q)u.yi=q;d.ga=u;d.ga.sort(function(I,H){var J=null,M=null;z.every(function(Y,ea){if(I.columnId===
|
|
1302
|
+
Y.columnId)J=ea;if(H.columnId===Y.columnId)M=ea;if(J!==null&&M!==null)return false;return true});return J>M?1:-1})}}if(m){d.Pf(m);d.La()}d.kd&&d.Wb();d.ec(d.ss(d.ga))}l(k,true,s);q=k.filters;if(q!=null&&!d.ea())for(m=0;m<q.length;m++){u=k.filters[m].column;var w=k.filters[m].text;w==null||w==""?d.removeFilter(u):d.setFilter(u,w)}}};this.it=function(k){Kc=null;Sa=[];if(k instanceof Array){t(true);var m="",q="",u="",z="";n(k,function(J,M){return J.Jr===M.w},function(J,M){q+=z+J.Jr;if(d.c.ng!=null)u+=
|
|
1303
|
+
z+d.xo(M.col,parseInt(d.c.gs));z=",";return J.jw});z="";k=0;if(d.C.length>0)k=d.C.reduce(function(J,M){return J.columnId>M.columnId?J:M}).columnId;for(var w=0;w<=k;w++){for(var I=false,H=0;H<d.cells[0].length;H++)if(d.cells[0][H].w===w){m+=z+(d.cells[0][H].ra?"D":"A");z=",";I=true;break}if(!I){m+=z+(p(w)?"D":"A");z=","}}if(d.c.eh!=null){d.On=q;pui.ne=d;if(d.c.Jh!=null)d.Nf=m;pui.bc();pui.ne=null}else if(d.c.ng!=null){d.Ei=u;if(d.Ei==null)d.Nf=null;else{if(d.c.Jh!=null)d.Nf=m;pui.qe=d;pui.bc();pui.qe=
|
|
1304
|
+
null}}else if(Sa.length==0)h(false)||A();else d.ea()&&d.wa==false?C(null,false):s(null,false)}};this.dw=function(k,m){if(!d.Tr){d.Tr=true;var q=Number(d.dataProps["starting row"]),u=Number(d.dataProps["ending row"]);if(!(isNaN(q)||isNaN(u)))if(d.dataProps["data columns"]!=null){for(var z=[],w=0;w<k;w++){var I="data columns";if(w>0)I+=" "+(w+1);z[w]=d.dataProps[I].split(",")}d.dataArray=[];d.j=1;I=0;d.h&&I++;for(q=q;q<=u;q+=k){var H=I-(d.h?1:0);d.dataArray[H]=[];d.dataArray[H].selected=false;for(w=
|
|
1305
|
+
0;w<k;w++)for(var J=0;J<z[w].length;J++){var M=z[w][J],Y="D_"+(q+w)+"_"+M,ea=d.c.parentNode.id;if(ea!=null&&ea.substr(0,6)=="window"){var Q=parseInt(ea.substr(6,1));if(!isNaN(Q)&&Q>0)Y+="_W"+Q}var X=Db(Y),W,ca;if(X==null){Y="I_"+(q+w)+"_"+M;X=Db(Y);if(X==null)if(!isNaN(Q)&&Q>0)Y+="_W"+Q;X=Db(Y);if(X==null)continue;d.d!=null&&d.d.type=="paging"&&d.d.Ci(X);if(!X.readOnly)continue;M=X.value;M=M.replace(/ /g," ");X.style.display="none";Y=X.className;ea=parseInt(X.style.left);W=parseInt(X.style.top);
|
|
1306
|
+
ca=X.B}else{M=X.innerHTML;Y=X.className;ea=parseInt(X.style.left);W=parseInt(X.style.top);ca=X.B;X.parentNode.removeChild(X);d.d!=null&&d.d.type=="paging"&&d.d.Ci(X)}if(Y==null||Y==""||Y=="A20")Y="";else if(Y.indexOf("readOnly")!=-1){Y=pui.Cp(Y,"readOnly");Y=pui.Cp(Y,"input")}X=J;if(k>1)X=0;if(d.cells.length<=I)break;var ba=d.cells[I][X];if(ba!=null){var ha=document.createElement("div");ha.className=Y;ha.innerHTML=M;d.dataArray[H][X]=M.replace(/ /g," ");ha.style.position="absolute";ea-=parseInt(ba.style.left);
|
|
1307
|
+
ea-=parseInt(d.c.style.left);if(m==true||k==1)ea=5;ha.style.left=ea+"px";W-=parseInt(ba.style.top);W-=parseInt(d.c.style.top);if(m==true||k==1)W=5;ha.style.top=W+"px";ha.B=ca;U(ha,"click",setPos);if(k==1){ba.B=ca;U(ba,"click",setPos)}ba.appendChild(ha)}}I++}}}};this.setScrollBar=function(){if(d.i.b==null){d.i.b=d.b;d.i.grid=d;d.i.init();d.i.z()}d.i.x=parseInt(d.c.style.left);d.i.y=parseInt(d.c.style.top);var k=parseInt(d.c.style.height);if(isNaN(k))k=0;d.i.y+=k;d.i.width=parseInt(d.c.style.width);
|
|
1308
|
+
if(isNaN(d.i.width)||d.i.width<10)d.i.width=10;d.i.width-=2;d.designMode||d.i.z();d.i.position();var m=true;if(d.k.length<2)m=false;if(d.k.length<3&&d.h)m=false;if(d.n.length<2)m=false;if(!d.Kf&&!d.Cc)m=false;k="paging";if(d.Cc)k="sliding";if(R=="genie"&&!d.designMode&&d.ea())k="sliding";if(m&&(d.d==null||d.d!=null&&d.d.type!=k)){d.d!=null&&d.d.destroy();if(k=="paging"){d.d=new pui.Su;d.d.grid=d}if(k=="sliding"){d.d=new pui.Uu;if(R=="genie"&&!pui.fa)d.d.Lf=true}d.d.b=d.b;d.d.zIndex=d.sy;d.d.designMode=
|
|
1309
|
+
d.designMode;if(k=="sliding"){d.d.Al=function(w){if(jb==null||jb.style.display=="none"){d.mask();d.Ib()}d.j=w;if(!(d==null||d.cells==null)){d.getData();d.yt(true)}};d.d.onchange=function(){d.ea()&&d.dataProps["load all rows"]!="true"&&d.clearData()};d.d.Ci(d.c)}if(k=="paging"){d.d.gj=function(){if(O("onpageup")==false)return false;if(d.wa==false&&d.ea()){if(d.j>1){var w=d.cells.length;if(d.h)w-=1;d.j-=w;if(d.j<1)d.j=1;d.getData()}return true}else if(d.wa==true||R=="dspf"||pui.fa){pui.Fj=d.Wa;pui.qh({},
|
|
1310
|
+
"PageUp");d.d.type=="paging"&&pui.Mb&&setTimeout(function(){d.d.destroy();d.d=null;d.setScrollBar()},250)}else if(R=="genie"){Wb("PageUp");return true}};d.d.fj=function(){if(O("onpagedown")==false)return false;if(d.wa==false&&d.ea()){var w=d.cells.length;if(d.h)w-=1;d.j+=w;d.getData();return true}else if(d.wa==true||R=="dspf"||pui.fa){pui.Fj=d.Wa;pui.qh({},"PageDown");d.d.type=="paging"&&pui.Mb&&setTimeout(function(){d.d.destroy();d.d=null;d.setScrollBar()},250)}else if(R=="genie"){Wb("PageDown");
|
|
1311
|
+
return true}};d.d.Ci(d.c)}d.d.init(d.c)}if(m){m=d.borderWidth;if(m===null||d.designMode&&m<ma)m=ma;var q=23;if(pui.is_touch&&!pui.is_mouse_capable&&!d.designMode||pui.pa)q=0;d.d.x=parseInt(d.n[d.n.length-1].style.left)-q;if(!d.designMode&&d.b!=null&&d.b.tagName=="DIV"&&d.b.getAttribute("container")=="true"){var u=d.b.parentNode;if(u!=null&&u.tagName=="DIV"&&u.style.overflowX=="scroll"){var z=u.parentNode;if(z!=null&&z.tagName=="DIV"&&z.pui!=null&&z.pui.properties!=null&&z.pui.properties.template==
|
|
1312
|
+
"simple container"&&z.pui.properties["overflow x"]=="scroll")if(z.offsetWidth<d.c.offsetWidth+d.c.offsetLeft){d.d.x=z.offsetWidth-q+2+u.scrollLeft;u.onscroll=function(){if(d.d){d.d.x=z.offsetWidth-q+2+u.scrollLeft;d.c.style.visibility!="hidden"&&d.d.z(true)}}}}}d.d.y=parseInt(d.c.style.top)+m;if(k=="paging"){d.d.height=d.pc("height")-m;if(d.d.height<0)d.d.height=0;if(d.ea()){d.d.Gb=d.Gb();d.d.Tb=d.Tb()}}if(k=="sliding"){d.d.interval=!d.ea()||d.dataProps["load fields into widgets"]=="true"&&d.dataProps["load all rows"]==
|
|
1313
|
+
"true"?1:250;k=d.cells.length;if(d.h)k-=1;d.d.cc=k;d.d.la=d.la;d.d.borderWidth=m;if(d.designMode)d.d.Ra=k*3;if(d.Qp=="row number"){d.d.Qh=true;d.d.Rh=false}else if(d.Qp=="row range"){d.d.Qh=false;d.d.Rh=true}else{d.d.Qh=false;d.d.Rh=false}}if(d.h){k=d.bb;d.d.y+=k;k=-k;d.d.height+=k}d.c.style.visibility!="hidden"&&d.d.z()}else if(d.d!=null){d.d.destroy();d.d=null}};this.pc=function(k){k=parseInt(d.c.style[k]);if(isNaN(k))k=0;return k};this.setProperty=function(k,m,q){if(m==null)m="";if(k.indexOf("parameter value")==
|
|
1314
|
+
0)d.dataProps[k]=m;else{var u=k,z=/^(database file) \d+$/.exec(k);if(z!=null&&z[1]!=null)u=z[1];z=/^(grid row translation placeholder key) \d+$/.exec(k);if(z!=null&&z[1]!=null)u=z[1];z=/^(grid row translation placeholder value) \d+$/.exec(k);if(z!=null&&z[1]!=null)u=z[1];switch(u){case "id":case "parent window":case "screen identifier":case "field type":case "value":case "color":case "display subfile":case "display control record":case "initialize subfile":case "subfile records not active":case "delete subfile":case "clear subfile":case "subfile size":case "subfile next changed":case "subfile record number":case "cursor record number":case "cursor progression":case "subfile return rrn":case "subfile changed":case "subfile message key":case "subfile control program message queue":case "allow drag":case "ondragstart":case "drop targets":case "ondragenter":case "ondragleave":case "ondrop":case "return mode":case "selection field":case "row is hidden field":case "tree level field":case "column sort response":case "right":case "bottom":break;
|
|
1314
1315
|
case "field name sort response":break;case "return sort order":break;case "position at top":if(m==="true")d.At=true;break;case "place cursor":if(m==="true")d.zt=true;break;case "record format name":d.Wa=m;if(R=="dspf"){q=d.c.e;if(q!=null){q.properties[k]=m;recordFormats.refresh()}}break;case "description":if(R=="dspf"){q=d.c.e;if(q!=null){q.properties[k]=m;recordFormats.refresh()}}break;case "font family":case "font size":case "font style":case "font variant":case "font weight":case "letter spacing":case "text align":case "text decoration":case "text transform":case "word spacing":case "header font color":case "header background":case "header image":case "row font color":case "row background":case "odd row font color":case "odd row background":case "even row font color":case "even row background":case "hover font color":case "hover background":case "hover image":case "selection font color":case "selection background":case "selection image":case "header font family":case "header font size":case "header font weight":case "header font style":case "header text align":d.I[k]=
|
|
1315
1316
|
m==""&&d.gf[k]!=null?d.gf[k]:m;if(d.designMode){d.sd();if(k=="text align"||k=="header text align"||k=="header font family"||k=="header font size"||k=="header font style"||k=="header font weight")d.ec()}break;case "row selection":if(m=="single"||m=="multiple (simple)"||m=="multiple (extended)"){d.Wd=true;if(m=="single"){d.singleSelection=true;d.Di=false}else{d.singleSelection=false;d.Di=m=="multiple (extended)"?true:false}if(typeof pui["grid text selection"]=="undefined"||pui["grid text selection"]==
|
|
1316
1317
|
false){d.c.onselectstart=pa(false);if(typeof d.c.style.MozUserSelect!="undefined")d.c.style.MozUserSelect="none"}}else{d.Wd=false;d.singleSelection=false;d.Di=false}break;case "selection value":if(m!=null&&m!="")d.Lh=m;break;case "number of rows":q=d.k.length-1;if(q<0)q=0;u=m==="#rowsPerPageRDF"?14:parseInt(m);if(isNaN(u))u=q;if(u<1)u=1;if(d.h&&u<2)u=2;if(u>99&&d.designMode)u=99;if(u>q){for(;u>d.k.length-1;)d.af();d.zh()}if(u<q)for(;u<d.k.length-1;)d.yj();if(d.c.e!=null)d.c.e.properties[k]=m;d.dc();
|
|
@@ -1387,7 +1388,7 @@ k+"=%3E%3D&fltrval"+k+"="+encodeURIComponent(m.substr(2)):m.substr(0,2)=="<="?"&
|
|
|
1387
1388
|
function(k){k.te=false;if(k.Hd!=null)for(var m=0;m<k.Hd.length;m++)if(k.Hd[m]===true){k.te=true;break}};this.removeFilter=function(k){if(!d.sc){if(typeof k=="number")k=d.cells[0][Da(k)];if(k!=null){d.Y.text="";d.xj(k);k.sa=null;if(d.Oc){var m=k.querySelector("input.qf");if(m)m.value=""}if(d.Zj())return $a(k,"");else if(d.ea()&&d.wa==false){d.totalRecs=null;d.j=1;d.mask();d.Ib()}else{k.mh&&delete k.mh;k=k.w;d.X=[];for(m=0;m<d.dataArray.length;m++){var q=d.dataArray[m];if(q.o==null)q.o=m+1;if(q.Hd!=
|
|
1388
1389
|
null)q.Hd[k]=false;d.Kj(q);!q.te&&!q.rc&&d.X.push(q)}}d.getData();Pa&&d.Xt();O("onfilterchange")}}};this.removeAllFilters=function(){if(!d.sc){d.Y.text="";for(var k=d.cells[0],m=0;m<k.length;m++){var q=k[m];d.xj(q);q.sa=null;if(d.Oc)if(q=q.querySelector("input.qf"))q.value=""}if(d.Zj())return qb("","");d.X=[];for(m=0;m<d.dataArray.length;m++){k=d.dataArray[m];k.Hd=null;k.te=false;if(k.o==null)k.o=m+1;k.rc||d.X.push(k)}if(d.ea()&&d.wa==false){d.totalRecs=null;d.j=1;d.mask();d.Ib()}d.getData();d.clearState("filters");
|
|
1389
1390
|
O("onfilterchange")}};this.rs=function(){for(var k=0,m=d.cells[0],q=0;q<m.length;q++){var u=m[q];u.sa!=null&&u.sa!=""&&k++}return k};this.isFiltered=function(k){if(d.og!=null)return false;if(!k&&d.Lb>0)return true;k=d.cells[0];if(k==null)return false;for(var m=0;m<k.length;m++){var q=k[m];if(q.sa!=null&&q.sa!="")return true}return false};this.hm=function(k){if(k.nc==null){k.nc=document.createElement("img");k.nc.style.paddingLeft="3px";k.nc.src=pui.normalizeURL("/profoundui/proddata/images/grids/filter.png");
|
|
1390
|
-
k.style.cursor="pointer";k.nc.onclick=function(q){if(!pui.Be(q)){d.startFilter(k);
|
|
1391
|
+
k.style.cursor="pointer";k.nc.onclick=function(q){if(!pui.Be(q)){d.startFilter(k);xb(q)}};var m=k;if(m.firstChild!=null&&m.firstChild.tagName=="DIV")m=m.firstChild;if(d.fc!=null&&d.fc.parentNode===m)m.insertBefore(k.nc,d.fc);else k.Zc!=null&&k.Zc.parentNode===m?m.insertBefore(k.nc,k.Zc):m.appendChild(k.nc)}};this.xj=function(k){k.nc!=null&&k.nc.parentNode!=null&&k.nc.parentNode.removeChild(k.nc);k.nc=null};this.isRowFilteredOut=function(k){k=b(k,false);var m=false;if(k!=null&&k.te!=null&&k.te===true)m=
|
|
1391
1392
|
true;return m};this.Zj=function(){return d.c.hs!=null};this.hideColumn=function(k){return d.Gs(k,false)};this.showColumn=function(k){return d.Gs(k,true)};this.isColumnHidden=function(k){if(typeof k=="string")k=Number(k);if(!isNaN(k))for(var m=0;m<d.ga.length;m++)if(d.ga[m].columnId===k)return d.ga[m].showing!==true;return false};this.xs=function(k,m){var q=m,u=true;if(typeof d.gc!="undefined"&&d.gc===true||d.isFiltered(true)){u=false;for(var z=0;z<k.length;z++)if(k[z].o==q){q=z+1;u=true;break}}if(q<
|
|
1392
1393
|
1||q>k.length||u==false)q=null;return q};this.getRowNumber=function(k){var m=d.dataArray;if(d.isFiltered())m=d.X;var q=d.xs(m,k);if(q==null)q=k;if(q<1)q=1;if(q>m.length)q=m.length;return q};this.getRRN=function(k){k=k;var m=d.dataArray;if(d.isFiltered())m=d.X;if(k<1)k=1;if(k>m.length)k=m.length;m=m[k-1];return m!=null&&m.o?m.o:k};this.Gs=function(k,m){if(!this.ma)return false;if(typeof k=="string")k=Number(k);if(!isNaN(k))for(var q=d.ga,u=0;u<q.length;u++){var z=q[u];if(z.columnId===k)return z.showing===
|
|
1393
1394
|
m?true:d.Jo(z)}return false};this.Jo=function(k,m){if(!this.ma)return false;var q=d.ga,u=!k.showing;if(d.n.length-2<1&&!u){pui.alert(pui.getLanguageText("runtimeMsg","cannot rmv last col"));return false}for(var z=k.columnId,w=k.currentColumn,I=q.yi,H=[],J=d.cells[0],M=0,Y=pui["grid column resize style"]!=="simple",ea=d.sf().split(",").map(function(ca){return Number(ca)}),Q=0;Q<q.length;Q++){if(k===q[Q]){q[Q].showing=u;if(!u){var X=Da(q[Q].columnId);q[Q].width=ea[X]}k=q[Q]}if(q[Q].showing){X=Da(q[Q].columnId);
|
|
@@ -1395,8 +1396,8 @@ if(X>-1)q[Q].width=ea[X];H.push(q[Q])}else M+=q[Q].width-(q[Q].lastAdjustment||0
|
|
|
1395
1396
|
ba){return Da(ca.columnId)>Da(ba.columnId)?1:-1}).map(function(ca){ca.blankHeader?W.push(""):W.push(ca.name);if(d.kd||Y){if(d.ky)return ca.width;return ca.orginalWidth}for(var ba=Math.floor(M/H.length),ha=ca.lastAdjustment||0,va=0;va<q.length;va++)if(q[va].columnId===ca.w){q[va].lastAdjustment=ba;break}ba=ca.width+ba-ha;return ba<0?ca.width:ba});if(Pa){q=q.map(function(ca){if(ca.showing)ca.savedColumn=Da(ca.columnId);return ca});X={cols:q,headings:W};if(Pa){Q=S();if(Q!=null)I=Q.colSequence}P(X,"hidableColState");
|
|
1396
1397
|
P(u,"colWidths");P(I,"colSequence")}d.Pf(u);d.La();d.sd();if(Qa)for(Q=0;Q<J.length;Q++)Z(J[Q],true,d.sortable);if(ld)for(Q=0;Q<d.n.length;Q++)La(d.n,Q,true,true);d.kd&&d.Wb();d.columnHeadings=W;d.ec();mb();if(Qa&&Pa)if(I!=null){J=Array(I.length);for(Q=0;Q<J.length;Q++)J[Q]=d.cells[0][I[Q]];for(Q=0;Q<J.length;Q++)d.moveColumn(J[Q].col,Q)}return true};this.ss=function(k){if(typeof k!=="object")return d.columnHeadings.split(",");return k.filter(function(m){return m.showing}).sort(function(m,q){var u,
|
|
1397
1398
|
z;if(d.designMode&&m.currentColumn!=null&&q.currentColumn!=null){u=m.currentColumn;z=q.currentColumn}else{u=Da(m.columnId);z=Da(q.columnId)}return u>z?1:-1}).map(function(m){if(m.blankHeader)return"";return m.name})};this.ju=function(){function k(ba){ba=ba.target;if(ba.tagName=="TD")ba=ba.parentNode;if(ba.tagName!="TR")return null;return ba}function m(ba){var ha=k(ba);if(ha){ba.stopPropagation();Wa.Gf=ha;pui.Q(ha,"move_origin");try{ba.dataTransfer.setData("text/plain",ha.w)}catch(va){}}}function q(ba){if(ba=
|
|
1398
|
-
k(ba)){pui.da(ba,"move_origin");Wa.Gf=null}}function u(ba){
|
|
1399
|
-
ha.parentNode.parentNode;if(ha.parentNode==va.tHead){
|
|
1399
|
+
k(ba)){pui.da(ba,"move_origin");Wa.Gf=null}}function u(ba){xb(ba);if(ba=k(ba)){var ha=ba.parentNode.parentNode;ba.parentNode==ha.tHead?pui.da(ha.tHead.lastChild,"move_valid"):pui.da(ba,"move_valid");if(Wa.Gf==null)console.log("Origin row not set.");else{var va=ba.sectionRowIndex;if(ba.parentNode==ha.tHead)va=-1;va++;ba=ha.tBodies[0].rows[va];if(Wa.Gf!==ba){ha.tBodies[0].removeChild(Wa.Gf);ha.tBodies[0].insertBefore(Wa.Gf,ba)}H(ha.tBodies[0])}}}function z(ba){if(Wa.Gf!=null){var ha=k(ba);if(ha!=null){var va=
|
|
1400
|
+
ha.parentNode.parentNode;if(ha.parentNode==va.tHead){xb(ba);ba.dataTransfer.dropEffect="move";pui.Q(va.tHead.lastChild,"move_valid")}else if(ha!=Wa.Gf&&ha.sectionRowIndex!=Wa.Gf.sectionRowIndex-1){xb(ba);ba.dataTransfer.dropEffect="move";pui.Q(ha,"move_valid")}}}}function w(ba){xb(ba);if(ba=k(ba)){var ha=ba.parentNode.parentNode;if(ba.parentNode==ha.tHead)ba=ha.tHead.lastChild;pui.da(ba,"move_valid")}}function I(ba){H(ba.target.parentNode.parentNode.parentNode)}function H(ba){for(var ha=0,va=0;va<
|
|
1400
1401
|
ba.rows.length;va++){var Ia=ba.rows[va],ja=Ia.cells[1],oa=Ia.cells[3].children[0];if(Ia.cells[0].children[0].checked){Ia.Kb=ha;ja.innerHTML=ha;ha++;oa.style.visibility=""}else{Ia.Kb=-1;ja.innerHTML="";oa.style.visibility="hidden"}}}if(d.c.parentNode!=null){if(Wa==null){Wa=document.createElement("div");Wa.className="grid-multisort"+(d.Xc!=""?" "+d.Xc+"-multisort":"");Wa.style.top=d.c.offsetTop+"px";Wa.style.left=d.c.offsetLeft+"px";var J=document.createElement("div");new pui.Ue({wk:J,move:Wa});var M=
|
|
1401
1402
|
document.createElement("button");M.className="pui-material-icons";M.innerHTML="close";U(M,"click",function(){Wa.style.display="none"});J.appendChild(M);M=document.createElement("button");M.className="pui-material-icons";M.innerHTML="check";U(M,"click",function(){Wa.style.display="none";for(var ba=[],ha=0;ha<Y.tBodies[0].rows.length;ha++){var va=Y.tBodies[0].rows[ha];va.Kb>=0&&ba.push({Jr:va.w+0,jw:va.ra})}d.it(ba)});J.appendChild(M);J.appendChild(document.createTextNode(pui.getLanguageText("runtimeText",
|
|
1402
1403
|
"sort multiple")));Wa.appendChild(J);var Y=document.createElement("table");J=Y.createTHead().insertRow();J.ondrop=u;J.ondragover=z;J.ondragleave=w;var ea=J.insertCell();ea.innerHTML=pui.getLanguageText("runtimeText","sort");ea=J.insertCell();ea.innerHTML=pui.getLanguageText("runtimeText","order");ea=J.insertCell();ea.innerHTML=pui.getLanguageText("runtimeText","column");ea=J.insertCell();ea.innerHTML=pui.getLanguageText("runtimeText","direction");var Q=document.createElement("tbody");Y.appendChild(Q);
|
|
@@ -1407,7 +1408,7 @@ J.childNodes[3].firstChild)X.innerHTML=J.ra?"arrow_downward":"arrow_upward";X=tr
|
|
|
1407
1408
|
"_filter";Na.checked=ha;M.appendChild(Na);M=J.insertCell();M.innerHTML=ba}function q(){ca=X.entries();va=X.size;for(var Na=va<50?va:50,cb=0;cb<Na;cb++){W=ca.next().value;ba=W[0];ha=W[1];m();Ia++}Xa.appendChild(H);d.c.parentNode.appendChild(Xa)}function u(Na){if(Na.target.localName=="td")if(this.cells[0].children[0].checked==false)ha=this.cells[0].children[0].checked=true;else ha=this.cells[0].children[0].checked=false;if(Na.target.localName=="input")if(this.cells[0].children[0].checked==true)ha=this.cells[0].children[0].checked=
|
|
1408
1409
|
true;else ha=this.cells[0].children[0].checked=false;ba=this.cells[1].innerHTML;ba!=null&&X.has(ba)&&X.set(ba,ha)}function z(Na,cb,Bb,Ta,cc){d.mask();d.Ib();if(Na==null)Na=-1;if(cb==null)cb=1;var Tb=null;Tb=pui.ld(d.dataProps);d.Lc="";if(d.isFiltered())for(var Gb=d.cells[0],nd=0,od=0;od<Gb.length;od++){var uc=Gb[od];if(uc.w>=0&&uc.sa!=null){var Se=ab(uc.w);d.Lc+="&fltrcol"+String(nd)+"="+(uc.w+1+Se);d.Lc+=d.Ct(String(nd),uc.sa);Tb+=d.Lc;nd++}}if(d.dataProps["data url"]!=null&&d.dataProps["data url"]!=
|
|
1409
1410
|
""&&d.Cb!=null)Tb+="&order="+d.Cb;Gb=Xb("PUI0009102.PGM");if(Ta)Gb=pui.df(Ta);Ta=new pui.Ajax(Gb);Ta.method="post";Ta.async=true;if(pui.ba)Ta.postData="AUTH="+pui.ba;else{Ta.postData="AUTH="+pui.appJob.auth;if(typeof pui.vId!=="undefined")Ta.postData+="&VID="+pui.vId}Ta.postData+="&q="+encodeURIComponent(pui.Wc(d.c));Gb=d.dataProps["order by"];if(d.Cb!=null)Gb=d.Cb;if(Gb&&Gb!="")Ta.postData+="&order="+Gb;else if(Mb()=="mssql")Ta.postData+="&order=(select null)";if(Tb!="")Ta.postData+="&"+Tb;Ta.postData+=
|
|
1410
|
-
"&limit="+Na+"&start="+cb;if(Bb!=null&&Bb==true)Ta.postData+="&getTotal=1";if(pui["read db driven data as ebcdic"]!==true)Ta.postData+="&UTF8=Y";Na=d.dataProps["allow any select statement"];if(Na!=null&&(Na=="true"||Na==true))Ta.postData+="&FetchCounter=Y";if(pui.isCloud)Ta.postData+="&workspace_id="+pui.cloud.ws.id;Ta.onready=function(ic){var Hb,jc,Pb;if(Hb=Kb(ic,"Run SQL SELECT Query")){d.mask();d.Ib();ic=Hb.results;var Ub=Hb.totalRecs;if(Ub!=null)d.totalRecs=Ub;if(ic.length>=1){var Eb=
|
|
1411
|
+
"&limit="+Na+"&start="+cb;if(Bb!=null&&Bb==true)Ta.postData+="&getTotal=1";if(pui["read db driven data as ebcdic"]!==true)Ta.postData+="&UTF8=Y";Na=d.dataProps["allow any select statement"];if(Na!=null&&(Na=="true"||Na==true))Ta.postData+="&FetchCounter=Y";if(pui.isCloud)Ta.postData+="&workspace_id="+pui.cloud.ws.id;Ta.onready=function(ic){var Hb,jc,Pb;if(Hb=Kb(ic,"Run SQL SELECT Query")){d.mask();d.Ib();ic=Hb.results;var Ub=Hb.totalRecs;if(Ub!=null)d.totalRecs=Ub;if(ic.length>=1){var Eb=ub(d.C);
|
|
1411
1412
|
Ub=[];for(Pb in Hb.results[0])Eb.indexOf(Pb)==-1&&Ub.push(Pb);Pb=Ub;Hb=[];for(Eb=0;Eb<d.C.length;Eb++)if(d.C[Eb]&&d.C[Eb].value&&d.C[Eb].value.fieldName){var Mc=d.C[Eb].value.fieldName;Pb.indexOf(Mc)!=-1&&Hb.push(Mc)}Ub=Hb.length===0?Ub:Hb;for(Hb=0;Hb<ic.length;Hb++){Eb=ic[Hb];if(cc.fieldName!=null)for(jc in Eb){if(jc.toUpperCase()==cc.fieldName.toUpperCase()){Pb=Eb[jc];X.set(Pb,false)}}else{d.dataArray=ic;d.sc=false;d.wa=true;Mc=Ub[cc.w];for(jc in Eb)if(jc==Mc){Pb=Eb[jc];X.set(Pb,false)}}}if(X.size>
|
|
1412
1413
|
0){q();d.unMask()}}}};d.sc=true;Ta.send()}if(d.c.parentNode!=null)if(!pui.is_ie){d.mask();d.Ib();Xa&&Xa.parentNode.removeChild(Xa);Xa=document.createElement("div");Xa.className="grid-multifilter"+(d.Xc!=""?" "+d.Xc+"-multifilter":"");if(k!=null){Xa.style.top=d.c.offsetTop+k.offsetHeight+"px";Xa.style.left=d.c.offsetLeft+k.offsetLeft+"px";if(Xa.style.top==null||Xa.style.left==null){Xa.style.top=d.c.offsetTop+"px";Xa.style.left=d.c.offsetLeft+"px"}}else{Xa.style.top=d.c.offsetTop+"px";Xa.style.left=
|
|
1413
1414
|
d.c.offsetLeft+"px"}var w=document.createElement("div");new pui.Ue({wk:w,move:Xa});var I=document.createElement("button");I.className="pui-material-icons";I.innerHTML="close";U(I,"click",function(){Xa.style.display="none";if(d.sc==true)d.sc=false;Xa=null;if(d.wa==true&&d.dataProps["load all rows"]!="true")d.wa=false});w.appendChild(I);I=document.createElement("button");I.className="pui-material-icons";I.innerHTML="check";U(I,"click",function(){Xa.style.display="none";d.mask();d.Ib();ca=X.entries();
|
|
@@ -1524,17 +1525,17 @@ b.properties["hyperlink reference"],b.properties.target,b.evalProperty("tab inde
|
|
|
1524
1525
|
classList:{"":"ui-icon ui-icon-"}}];if(a)a=Lb(a);if(pui.customIconList&&pui.customIconList)if(Array.isArray(pui.customIconList.icons)&&pui.customIconList.icons.length)l=pui.customIconList.icons;if(a.substr(0,9)=="material:"){l=a.substr(9);g.innerText=Lb(l);g.className="pui-material-icons";if(f)g.style.cursor=f}else if(a.substr(0,12)=="fontAwesome:"){l=Lb(a.substr(12));g.className="pui-fa-icons fa-"+l;g.innerText=""}else{f=a.split(":");var o=f.shift().split("-"),n=o.pop();o=o.join("-");var r=f.pop();
|
|
1525
1526
|
l.every(function(p){var t=p.classList[n];if(o===p.type){g.className=t+r;g.innerText=a.startsWith("material-")?Lb(r):"";return false}return true})}if(c)g.className=g.className+" "+c;if(e)g.style.fontSize=e;if(h)g.style.fontFamily=h;b.dom.appendChild(g)}function re(b,a){var c=b.dom.firstChild;c.style.fontSize=parseInt(b.value)<=parseInt(b.dom.style[a])?b.value:b.dom.style[a];b.properties["icon size"]=c.style.fontSize}
|
|
1526
1527
|
pui.widgets.add({name:"icon",newId:"Icon",tag:"div",defaults:{icon:"material:face"},propertySetters:{"field type":function(b){qe(b);b.dom.style.textAlign="center"},icon:function(b){b.properties.icon=b.value;qe(b)},width:function(b){re(b,"height")},height:function(b){re(b,"width")},"css class":function(b){b.properties["css class"]=b.value;qe(b)},cursor:function(b){b.properties.cursor=b.value;qe(b)},"font family":function(b){b.properties["font family"]=b.value;qe(b)}}});pui.widgets.add({name:"iframe",newId:"IFrame",menuName:"IFrame",defaults:{width:"400px",height:"300px","z index":"25","background color":"#FFFFFF","frame border":"true"},propertySetters:{"field type":function(b){if(b.design){b.dom.innerHTML="IFrame content will appear here.";b.dom.style.overflow="hidden"}else{b.dom.innerHTML="";url=b.evalProperty("iframe url");if(url==null||url=="")b.dom.innerHTML="IFrame URL property not specified.";else{var a="",c=parseInt(b.properties.width),e=parseInt(b.properties.height);
|
|
1527
|
-
if(c>0)a+=' width="'+b.properties.width+'"';if(e>0)a+=' height="'+b.properties.height+'"';c='<iframe src="'+url;c+='" frameborder="';c+=b.properties["frame border"]=="true"?"1":"0";c+='"'+a+">";b.dom.innerHTML=c}}},visibility:function(b){if(!b.design){var a=b.dom.getElementsByTagName("iframe");if(a&&a.length==1){a=a[0];if(b.value=="hidden"){a.style.visibility="hidden";a.style.display="none"}else{a.style.visibility="";a.style.display=""}}}}}});pui.Ns=function(b){b=
|
|
1528
|
+
if(c>0)a+=' width="'+b.properties.width+'"';if(e>0)a+=' height="'+b.properties.height+'"';c='<iframe src="'+url;c+='" frameborder="';c+=b.properties["frame border"]=="true"?"1":"0";c+='"'+a+">";b.dom.innerHTML=c}}},visibility:function(b){if(!b.design){var a=b.dom.getElementsByTagName("iframe");if(a&&a.length==1){a=a[0];if(b.value=="hidden"){a.style.visibility="hidden";a.style.display="none"}else{a.style.visibility="";a.style.display=""}}}}}});pui.Ns=function(b){b=wb(b);if(b.tagName=="IMG")if(b.Ae!=null&&b.Ae!=""){b.Ws=true;if(b.Ro!=true)b.src=b.Ae}};pui.Ms=function(b){b=wb(b);if(b.tagName=="IMG"){b.Ws=false;if(b.Qd!=null)if(b.Ro!=true)b.src=b.Qd}};pui.Zk=function(b){b=wb(b);if(b.tagName=="IMG")if(b.hf!=null&&b.hf!=""){b.Ro=true;b.src=b.hf}};pui.$k=function(b){if(b.Qd!=null){b.Ro=false;b.src=b.Ws==true?b.Ae:b.Qd}};
|
|
1528
1529
|
pui.Os=function(b){if(b.design)return null;var a=b.evalProperty("blob table"),c=b.evalProperty("blob column");if(a!=null&&c!=null&&a!=""&&c!=""){a={};c="?AUTH="+encodeURIComponent(pui.ba?pui.ba:pui.appJob.auth)+"&q="+encodeURIComponent(pui.Wc(b.dom));pui.ld(b.properties,a);for(var e in a)c+="&"+encodeURIComponent(e)+"="+a[e];c+="&rnd="+String(Math.random())+String((new Date).getTime());return Xb("PUI0009119.PGM")+c}return null};
|
|
1529
1530
|
pui.widgets.add({name:"image",tag:"img",propertySetters:{"field type":function(b){b.dom.onselectstart=pa(false);b.dom.ondragstart=pa(false);b.dom.setAttribute("draggable","false");if(typeof b.dom.style.MozUserSelect!="undefined")b.dom.style.MozUserSelect="none";b.dom.Qd=b.evalProperty("image source");var a=pui.Os(b);if(a)b.dom.Qd=a;b.dom.src=b.dom.Qd;a=b.evalProperty("hover image source");b.dom.Ae=a;if(a!=null&&a!=""){b.dom.Ae=pui.normalizeURL(b.dom.Ae,true);U(b.dom,"mouseover",pui.Ns);U(b.dom,"mouseout",
|
|
1530
1531
|
pui.Ms);(new Image).src=a}a=b.evalProperty("click image source");b.dom.hf=a;if(a!=null&&a!=""){b.dom.hf=pui.normalizeURL(b.dom.hf,true);U(b.dom,"mousedown",pui.Zk);U(document,"mouseup",function(){pui.$k(b.dom)});U(b.dom,"touchstart",pui.Zk);U(document,"touchend",function(){pui.$k(b.dom)});(new Image).src=a}},"image source":function(b){b.dom.Qd=pui.normalizeURL(b.value,true);if(b.design&&b.dom.Qd.indexOf(".svg")!=-1)if(!b.properties.width&&!b.properties.height){var a=Dc();a=pui.Li(a,"width");b.dom=
|
|
1531
1532
|
Pc(a,b.properties,b.dom,"200px",b.design,b.e,b.Tt);b.e.designer.nb.QA("width","200px",true)}},"blob column":function(b){var a=pui.Os(b);if(a)b.dom.Qd=a;b.dom.src=b.dom.Qd},"hover image source":function(b){b.dom.Ae=b.value;if(b.value!=null&&b.value!=""){b.dom.Ae=pui.normalizeURL(b.dom.Ae,true);U(b.dom,"mouseover",pui.Ns);U(b.dom,"mouseout",pui.Ms);(new Image).src=b.value}},"click image source":function(b){b.dom.hf=b.value;if(b.value!=null&&b.value!=""){b.dom.hf=pui.normalizeURL(b.dom.hf,true);U(b.dom,
|
|
1532
|
-
"mousedown",pui.Zk);U(document,"mouseup",function(){pui.$k(b.dom)});U(b.dom,"touchstart",pui.Zk);U(document,"touchend",function(){pui.$k(b.dom)});(new Image).src=b.value}}}});pui.Qu=function(){function b(g){function l(G){function B(){G.wh>0&&G.Vj==null&&f.Lt();if(f.b.onoptionclick!=null&&!f.lq)Fb()||G.Vj==null&&f.b.onoptionclick(G.bh,Oc(G));else if(R=="dspf")if(G.Vj==null){var
|
|
1533
|
-
else G.className="menu-hover";if(f.wg!=null&&f.wg!="")G.style.color=f.wg;if(f.hj!=null&&f.hj!=""){G.style.backgroundImage="url('"+f.hj+"')";if(f.repeat!=null&&f.repeat.length>0){G.style.backgroundRepeat=f.repeat;if(f.repeat=="no-repeat")G.style.backgroundPosition="left center"}}else G.style.backgroundImage=G.zb!=null&&G.zb!=""?"url('"+G.zb+"')":"";for(var
|
|
1534
|
-
var D
|
|
1533
|
+
"mousedown",pui.Zk);U(document,"mouseup",function(){pui.$k(b.dom)});U(b.dom,"touchstart",pui.Zk);U(document,"touchend",function(){pui.$k(b.dom)});(new Image).src=b.value}}}});pui.Qu=function(){function b(g){function l(G){function B(){G.wh>0&&G.Vj==null&&f.Lt();if(f.b.onoptionclick!=null&&!f.lq)Fb()||G.Vj==null&&f.b.onoptionclick(G.bh,Oc(G));else if(R=="dspf")if(G.Vj==null){var D=f.b;if(D.S!=null)if(D.disabled!=true){D.S=G.bh;if(D.G=="true"||D.G=="send data")pui.G=D.G;if(f.lq)pui.Ka=f.routine;if(pui.bc()==false){D.S="";pui.Ka=null;pui.Nc=null;pui.Mc=null}}}}G.oncontextmenu=pa(false);G.onmouseover=function(){G.ni=true;if(f.vg!=null&&f.vg!="")G.style.backgroundColor=f.vg;
|
|
1534
|
+
else G.className="menu-hover";if(f.wg!=null&&f.wg!="")G.style.color=f.wg;if(f.hj!=null&&f.hj!=""){G.style.backgroundImage="url('"+f.hj+"')";if(f.repeat!=null&&f.repeat.length>0){G.style.backgroundRepeat=f.repeat;if(f.repeat=="no-repeat")G.style.backgroundPosition="left center"}}else G.style.backgroundImage=G.zb!=null&&G.zb!=""?"url('"+G.zb+"')":"";for(var D=G,E=[],K=0;K<h.length;K++)h[K].wh>=D.wh&&E.push(h[K]);for(K=0;K<E.length;K++)f.Ep(E[K]);f.Oy(G)};G.onmouseout=function(D){if(!D)D=window.event;
|
|
1535
|
+
var E=D.relatedTarget;if(E==null)E=D.toElement;for(;E!=null&&(E.tagName=="TABLE"||E.tagName=="TBODY"||E.tagName=="TR");){if(E.firstChild==null)break;E=E.firstChild}if(E==null||E.wh==null||E.tagName!="TD"||E.rx!=f.b.id){D=false;if(E!=null){if(E==r)D=true;if(n!=null&&E==n)D=true;if(E.Vo)D=true;if(!D){E=e(E);var K=e(G);if(E&&E===K)D=true}}D||f.Lt()}else if(G.ub!=null){for(D=true;E!=null;){if(G.ub==E){D=false;break}E=E.parentNode}D&&f.Ep(G)}if(f.wg!=null&&f.wg!="")G.style.color="";if(G.zb!=null&&G.zb!=
|
|
1535
1536
|
""){G.style.backgroundImage="url('"+G.zb+"')";G.style.backgroundRepeat=f.repeat}else G.style.backgroundImage="";if(f.vg!=null&&f.vg!=""){G.ni=false;if(f.animate){var S=function(P){P-=10;if(P<40){if(!G.ni)G.style.backgroundColor="";G.ni=true}if(G.ni)P=100;G.style.filter="alpha(opacity="+P+")";G.style.opacity=P/100;G.ni||setTimeout(function(){S(P)},60)};S(100)}else G.style.backgroundColor=""}else G.className=""};if(pui.is_touch&&!pui.is_mouse_capable&&G.children.length>0)G.addEventListener("touchend",
|
|
1536
|
-
B,false);else G.onclick=B;G.ondblclick=function(
|
|
1537
|
-
null);K.ob.choices=true;K.hd=true;K.designer.jd[K.designer.Ma.tb]=true;K.designer.nb.Ih("choices")};K.designer.Af.show(K,
|
|
1537
|
+
B,false);else G.onclick=B;G.ondblclick=function(D){if(Fb()&&G.orientation=="vertical"&&G.wh==0){var E=designUtils.getTarget(D);for(D=E.parentNode;D.tagName!="DIV";)D=D.parentNode;var K=Ib.designer.nh(D);if(!pui.p(K.properties.choices)&&!pui.Jb(K.properties.choices)&&typeof E.Ir==="number"){K.designer.Af.mp=function(S){var P=K.properties.choices;if(P=="")P="Option 1,Option 2,Option 3";P=P.split(",");P[E.Ir]=S;P=P.join(",");S=Dc().choices;K.designer.ca.add(K,S.name);Pc(S,K.properties,K.dom,P,true,K,
|
|
1538
|
+
null);K.ob.choices=true;K.hd=true;K.designer.jd[K.designer.Ma.tb]=true;K.designer.nb.Ih("choices")};K.designer.Af.show(K,E,"menu")}}}}var o=g.b,n=g.Ix;if(o.Qj==undefined)o.Qj=true;o.innerHTML="";pui.Q(o,"pui-menu");g.orientation=="horizontal"&&pui.Q(o,"pui-horizontal");var r=document.createElement("table"),p=o.style.width;if(p!=null&&p!=""&&g.orientation!="horizontal")r.style.width="100%";r.cellPadding=0;r.cellSpacing=0;p=a(g.vo);var t,s=f.borderColor;if(s!=""&&s!=null){s=pui.lt(s);r.style.borderTop=
|
|
1538
1539
|
"1px solid "+s;r.style.borderLeft="1px solid "+s}for(var y=g.vo;y<=g.xu;y++)if(a(y)==p){for(var A=f.choices[y];A.substr(0,1)=="-";)A=A.substr(1);var C=f.me[y];if(C==null)C=A;t=t==null||g.orientation=="vertical"?r.insertRow(r.rows.length):t;var F=t.insertCell(t.cells.length);if(A==null||A==""||Lb(A)=="")A=" ";F.innerHTML=A;F.bh=C;F.wh=p;if(Fb())F.Ir=y;F.rx=f.b.id;F.orientation=g.orientation;if(f.padding!=null&&f.padding.length>0)F.style.paddingTop=F.style.paddingBottom=F.style.paddingRight=f.padding;
|
|
1539
1540
|
if(f.paddingLeft!=null&&f.paddingLeft.length>0)F.style.paddingLeft=f.paddingLeft;if(s!=""&&s!=null){F.style.borderRight="1px solid "+s;F.style.borderBottom="1px solid "+s}if(f.animate){F.style.filter="alpha(opacity=100)";F.style.opacity=1}if(f.zb!=null&&f.zb!=""){F.zb=f.zb;if(f.ij.length>1)F.zb=f.ij[y]!=null?f.ij[y]:"";if(F.zb!="")F.style.backgroundImage="url('"+pui.normalizeURL(F.zb,true)+"')";if(f.repeat!=null&&f.repeat.length>0){F.style.backgroundRepeat=f.repeat;if(f.repeat=="no-repeat")F.style.backgroundPosition=
|
|
1540
1541
|
"left center"}}else F.style.backgroundImage="";if(c(y)){F.Vj=y+1;F.pm=y+1;for(A=a(y+1);F.pm<f.choices.length-1&&a(F.pm+1)>=A;)F.pm+=1;if(g.orientation=="vertical"){A=document.createElement("img");A.src=pui.normalizeURL("/profoundui/proddata/images/menus/submenu-arrow.gif");A.style.position="absolute";A.style.right="3px";A.style.paddingTop="3px";A.Vo=true;C=document.createElement("span");C.innerHTML=" ";C.Vo=true;F.appendChild(C);F.appendChild(A)}}l(F);t=t}o.appendChild(r)}
|
|
@@ -1569,15 +1570,15 @@ y.value);b.dom.add(y)}catch(A){b.dom.add(y,null)}b.dom.choices[y.value]=y.text}p
|
|
|
1569
1570
|
b.dom)},choices:function(b){var a=b.evalProperty("choices database file"),c=b.evalProperty("choices url");if(!(a!=""||c!="")){if(b.dom.tagName=="SELECT")b.dom.options.length=0;a=b.value;c=b.evalProperty("choice values");pui.ap(a,c,b.dom);pui.Nh(b.evalProperty("value"),b.dom)}},"choice values":function(b){var a=b.evalProperty("choices database file"),c=b.evalProperty("choices url");if(!(a!=""||c!="")){if(b.dom.tagName=="SELECT")b.dom.options.length=0;a=b.evalProperty("choices");pui.ap(a,b.value,b.dom);
|
|
1570
1571
|
pui.Nh(b.evalProperty("value"),b.dom)}},"select box height":function(b){if(b.design&&pui.is_old_ie&&pui.ie_mode==6){var a=Dc();Pc(a["field type"],b.properties,b.dom,"select box",b.design,b.e,b.Tt)}}}});pui.Slider=function(){this.u=null;this.orientation="horizontal";this.value=2;this.minValue=0;this.maxValue=10;this.yf=1;this.disabled=this.readOnly=this.design=false;var b=this,a,c,e,f=pui.is_touch&&!pui.is_mouse_capable||pui.pa;this.init=function(){function h(g){function l(A){var C=ad(A)-t,F=$c(A)-p,G=b.maxValue-b.minValue,B=0;B=n?a.clientHeight:a.clientWidth;C=G*(((n?y+C:s+F)-(n?a.offsetTop:a.offsetLeft)+(n?c.clientHeight/2:c.clientWidth/2))/B)+b.minValue;if(C<b.minValue)C=b.minValue;if(C>b.maxValue)C=
|
|
1571
1572
|
b.maxValue;C=b.Mp(C);if(C!=b.value){b.setValue(C);b.u.modified=true;pui.Re(b.u);if(R=="genie"&&b.u.B!=null&&b.u.B.idx!=null)pui.response[b.u.B.idx]=b.u;!b.design&&typeof b.u.onchange=="function"&&b.u.onchange(A)}r&&A.preventDefault()}function o(){if(r){bc(document,"touchmove",l);bc(document,"touchend",o)}else{bc(document,"mousemove",l);bc(document,"mouseup",o)}}if(!b.readOnly)if(!b.disabled){var n=b.orientation=="vertical",r=false;if(g!=null&&g.touches!=null){if(g.touches.length!=1)return;r=true}var p=
|
|
1572
|
-
$c(g),t=ad(g),s=parseInt(c.offsetLeft),y=parseInt(c.offsetTop);if(r){U(document,"touchmove",l);U(document,"touchend",o)}else{U(document,"mousemove",l);U(document,"mouseup",o)}
|
|
1573
|
+
$c(g),t=ad(g),s=parseInt(c.offsetLeft),y=parseInt(c.offsetTop);if(r){U(document,"touchmove",l);U(document,"touchend",o)}else{U(document,"mousemove",l);U(document,"mouseup",o)}xb(g);return false}}a=document.createElement("div");a.className="bar";if(!b.design&&R=="genie"){e=Zb("input",b.u.name);e.type="hidden";document.forms.main.appendChild(e)}c=document.createElement("div");c.className="handle";b.u.onselectstart=pa(false);a.onselectstart=pa(false);c.onselectstart=pa(false);U(c,"mousedown",h);U(c,
|
|
1573
1574
|
"touchstart",h);b.u.appendChild(a);b.u.appendChild(c);b.z();pui.Jg.push(b)};this.Mp=function(h,g){var l=b.yf/2;if(g==true)l=0;l=parseInt((h+b.minValue+l)/b.yf)*b.yf-b.minValue;return l=Math.round(l*1E6)/1E6};this.z=function(){pui.Q(b.u,"slider");f&&!b.design&&pui.Q(b.u,"touch");pui.da(b.u,b.orientation=="vertical"?"horizontal":"vertical");pui.Q(b.u,b.orientation);b.setValue(b.value)};this.nq=function(){if(isNaN(b.yf))b.yf=1;if(b.yf<=0)b.yf=1;if(isNaN(b.minValue))b.minValue=0;if(isNaN(b.maxValue))b.maxValue=
|
|
1574
1575
|
10;if(isNaN(b.value))b.value=0;if(b.value<b.minValue)b.value=b.minValue;if(b.value>b.maxValue)b.value=b.maxValue;b.value=b.Mp(b.value);b.u.value=b.value;if(!b.design&&R=="genie")e.value=b.value};this.setValue=function(h){h=Number(h);if(isNaN(h))h=b.minValue;if(h<b.minValue)h=b.minValue;if(h>b.maxValue)h=b.Mp(b.maxValue,true);var g=b.maxValue-b.minValue,l=b.orientation=="vertical",o=0,n=0;o=l?a.clientHeight:a.clientWidth;n=l?c.clientHeight/2:c.clientWidth/2;g=parseInt(o/g*(h-b.minValue)-n)+10;if(isNaN(g))g=
|
|
1575
1576
|
0;if(l){c.style.top=g+"px";c.style.left=""}else{c.style.left=g+"px";c.style.top=""}b.value=h;b.u.value=h;if(!b.design&&R=="genie")e.value=b.value};this.destroy=function(){if(b!=null)b=e=c=a=b.u=null}};
|
|
1576
1577
|
pui.widgets.add({name:"slider",defaults:{width:"150px",height:"20px"},propertySetters:{"field type":function(b){if(b.dom.U==null)b.dom.U=new pui.Slider;b.dom.U.u=b.dom;b.dom.U.design=b.design;b.dom.U.value=b.evalProperty("value");b.dom.U.init()},value:function(b){b.dom.U!=null&&b.dom.U.setValue(b.value)},orientation:function(b){if(b.dom.U!=null){b.dom.U.orientation=b.value;b.dom.U.z()}},"min value":function(b){if(!b.design&&b.dom.U!=null){b.dom.U.minValue=Number(b.value);b.dom.U.maxValue=Number(b.evalProperty("max value"));
|
|
1577
1578
|
b.dom.U.value=Number(b.evalProperty("value"));b.dom.U.nq();b.dom.U.z()}},"max value":function(b){if(!b.design&&b.dom.U!=null){b.dom.U.maxValue=Number(b.value);b.dom.U.minValue=Number(b.evalProperty("min value"));b.dom.U.value=Number(b.evalProperty("value"));b.dom.U.nq();b.dom.U.z()}},"increment value":function(b){if(!b.design&&b.dom.U!=null){b.dom.U.yf=Number(b.value);b.dom.U.value=Number(b.evalProperty("value"));b.dom.U.nq();b.dom.U.z()}},"read only":function(b){if(b.dom.U!=null&&!b.design)b.dom.U.readOnly=
|
|
1578
1579
|
b.value==true||b.value=="true"?true:false},disabled:function(b){if(b.dom.U!=null&&!b.design)b.dom.U.disabled=b.value==true||b.value=="true"?true:false},width:function(b){b.dom.style.width=b.value;b.dom.U!=null&&b.dom.U.z()},height:function(b){b.dom.style.height=b.value;b.dom.U!=null&&b.dom.U.z()}},qc:function(b){b.propertyName.indexOf("css class")===0&&b.dom.U!=null&&b.dom.U.z()}});pui.Ru=function(){function b(){var p=c.b.offsetWidth;if(p==0){p=parseInt(c.b.style.width);if(isNaN(p))p=0;p+=2}return onPoint=c.xm?parseInt((p+3)/2):p-6}function a(p){if(!c.readOnly)if(!c.disabled)if(!c.designMode)if(!r){c.toggle(true);c.Nj(p)}}this.b=null;this.readOnly=this.disabled=false;this.xm=this.Kd=true;this.designMode=false;var c=this,e=document.createElement("label"),f=document.createElement("span"),h=document.createElement("label"),g=document.createElement("span"),l=document.createElement("div"),
|
|
1579
|
-
o=document.createElement("div"),n=document.createElement("div"),r=false;this.init=function(){function p(t){function s(B){r=true;var
|
|
1580
|
-
c.Nj(B)}else c.refresh(true);setTimeout(function(){r=false},0)}}if(!c.readOnly)if(!c.disabled)if(!c.designMode){var A=b(),C=false;if(t!=null&&t.touches!=null){if(t.touches.length!=1)return;C=true}var F=$c(t),G=parseInt(l.style.left);if(C){U(document,"touchmove",s);U(document,"touchend",y)}else{U(document,"mousemove",s);U(document,"mouseup",y)}
|
|
1580
|
+
o=document.createElement("div"),n=document.createElement("div"),r=false;this.init=function(){function p(t){function s(B){r=true;var D=G+$c(B)-F;if(D<0)D=0;if(D>A)D=A;c.sp(D);C&&B.preventDefault()}function y(B){if(C){bc(document,"touchmove",s);bc(document,"touchend",y)}else{bc(document,"mousemove",s);bc(document,"mouseup",y)}var D=Math.abs(G-parseInt(l.style.left)),E=c.b.offsetWidth;if(E==0){E=parseInt(c.b.style.width);if(isNaN(E))E=0;E+=2}E=E/2;if(c.xm)E=E/2-4;if(r){if(D<=5||D>=E){c.toggle(true);
|
|
1581
|
+
c.Nj(B)}else c.refresh(true);setTimeout(function(){r=false},0)}}if(!c.readOnly)if(!c.disabled)if(!c.designMode){var A=b(),C=false;if(t!=null&&t.touches!=null){if(t.touches.length!=1)return;C=true}var F=$c(t),G=parseInt(l.style.left);if(C){U(document,"touchmove",s);U(document,"touchend",y)}else{U(document,"mousemove",s);U(document,"mouseup",y)}xb(t);return false}}e.className="off-label";e.appendChild(f);h.className="on-label";h.appendChild(g);l.className="onoff-handle-left";o.className="onoff-handle-right";
|
|
1581
1582
|
n.className="onoff-handle-center";o.appendChild(n);l.appendChild(o);pui.Q(c.b,"onoff-switch");c.b.appendChild(e);c.b.appendChild(h);c.b.appendChild(l);bc(c.b,"click",a);U(c.b,"click",a);U(c.b,"mousedown",p);U(c.b,"touchstart",p);c.size()};this.size=function(){var p=c.b.offsetWidth;if(p==0){p=parseInt(c.b.style.width);if(isNaN(p))p=0;p+=2}offLabelWidth=p-5;if(offLabelWidth<0)offLabelWidth=0;e.style.width=offLabelWidth+"px";c.hu(c.xm)};this.hu=function(p){if(p){var t=c.b.offsetWidth;if(t==0){t=parseInt(c.b.style.width);
|
|
1582
1583
|
if(isNaN(t))t=0;t+=2}t=parseInt((t-14)/2);if(t<0)t=0;l.style.width=t+"px"}else l.style.width="";c.xm=p;c.refresh()};this.sp=function(p,t){for(var s=["transition","MozTransition","WebkitTransition","msTransition","OTransition"],y=" 0.3s ease",A=0;A<s.length;A++){var C=s[A];if(t){y=" 0.2s ease";h.style[C]="width"+y;g.style[C]="margin-left"+y;f.style[C]="margin-right"+y;l.style[C]="left"+y}else{h.style[C]="";g.style[C]="";f.style[C]="";l.style[C]=""}}s=b();h.style.width=p+4+"px";g.style.marginLeft=p-
|
|
1583
1584
|
s+"px";f.style.marginRight=-p+"px";l.style.left=p+"px"};this.Gy=function(p){var t=b();c.sp(t,p);c.Kd=true};this.Fy=function(p){c.sp(0,p);c.Kd=false};this.set=function(p,t){p?c.Gy(t):c.Fy(t)};this.toggle=function(p){c.set(!c.Kd,p)};this.refresh=function(p){c.set(c.Kd,p)};this.Zv=function(p){g.innerHTML=p};this.Yv=function(p){f.innerHTML=p};this.disable=function(){c.disabled=true;pui.Q(c.b,"onoff-switch-disabled")};this.enable=function(){c.disabled=false;pui.da(c.b,"onoff-switch-disabled")};this.Cy=
|
|
@@ -1627,44 +1628,44 @@ leftWidth:5,rightWidth:5,defaultBackColor:"#ffffff",hiColor:"#666699",selColor:"
|
|
|
1627
1628
|
CSS:{useImages:false,fz:false}};pui.widgets.Ox=function(b){var a=pui.widgets.tabStyles[b];if(a!=null)if(a.Px!=true){if(a.useImages){var c=a.imageFileExtension;if(c==null)c="gif";if(c.substr(0,1)==".")c=c.substr(1);var e=function(f){(new Image).src=f};b=pui.normalizeURL("/profoundui/proddata/images/tabs/"+b.toLowerCase()+"/");if(a.hiImages){e(b+"left-hi."+c);e(b+"middle-hi."+c);e(b+"right-hi."+c)}e(b+"left-sel."+c);e(b+"middle-sel."+c);e(b+"right-sel."+c)}a.Px=true}};
|
|
1628
1629
|
function ve(){function b(){if(g.A.scrollLeft>0)g.A.scrollLeft-=s;else{clearInterval(n);p.style.display="none"}t.style.display="inline-block";y++;if(y>0&&y%5==0)s+=o}function a(){if(g.A.scrollLeft<g.A.scrollWidth-g.A.offsetWidth)try{g.A.scrollLeft+=s}catch(B){}else{clearInterval(r);t.style.display="none"}p.style.display="inline-block";y++;if(y>0&&y%5==0)s+=o}function c(){s=l;y=0;n=setInterval(b,42)}function e(){s=l;y=0;r=setInterval(a,42)}function f(){clearInterval(n)}function h(){clearInterval(r)}
|
|
1629
1630
|
this.uc="Tab 1,Tab 2,Tab 3";this.Og="The tab cannot be removed because it contains other elements that must be removed first.";var g=this,l=Number(pui["tabpanel scroll speed"]);if(isNaN(l)||l<1)l=5;var o=Number(pui["tabpanel scroll acceleration"]);if(isNaN(o)||o<0)o=1;var n=null,r=null,p=null,t=null,s=5,y=0;this.Bd=0;this.qk=true;this.Xe={};var A,C,F,G;this.an=0;this.defaults={};this.defaults.fontFamily="arial";this.defaults.fontSize="12px";this.defaults.color="#333366";this.hb=[];this.selectedTab=
|
|
1630
|
-
0;this.b=null;this.Fc="#eeeeff";this.hc="Simple";this.A=null;this.Is=function(B){var
|
|
1631
|
+
0;this.b=null;this.Fc="#eeeeff";this.hc="Simple";this.A=null;this.Is=function(B){var D=false;if(this.selectedTab==B){if(!this.bm){for(var E=-1,K=0,S=this.hb.length;K<S;K++)if(K!=B&&this.Xe[K]!==true){E=K;break}if(E!=-1){this.selectedTab=E;D=this.Xe[B]=true}}}else D=this.Xe[B]=true;D&&this.Tc()};this.mu=function(B){g.Xe[B]=false;g.Tc()};this.setTab=function(B){if(g.selectedTab!=B){g.selectedTab=B;if(g.Xe[B])g.Xe[B]=false;g.vp(B)}};this.getTab=function(){return g.selectedTab};this.refresh=function(){g.setTab(g.selectedTab)};
|
|
1631
1632
|
this.cu=function(){var B=pui.widgets.tabStyles[g.hc];if(B!=null&&B.defaultBackColor!=null)g.Fc=B.defaultBackColor};this.Tc=function(){g.z()};this.z=function(){function B(L){L=(R=="dspf"&&!T?pui.runtimeContainer:document.getElementById(za)).getElementsByTagName(L);for(var Z=0;Z<L.length;Z++){var N=L[Z];if(N.Va!=null&&N.db!=null&&N.Va==g.b.id){if(N.db==g.selectedTab){N.style.visibility="";applyProperty(N,"visibility","");if(N.grid&&N.grid.setProperty)N.grid.h||!N.grid.Pe?N.grid.show():N.grid.hide();
|
|
1632
1633
|
!Fb()&&N.pui.properties["field type"]=="chart"&&!N.chart&&applyProperty(N,"field type","chart")}else{N.style.visibility="hidden";applyProperty(N,"visibility","hidden");N.grid&&N.grid.setProperty&&N.grid.hide();N.H!=null&&N.H.hide()}if(T&&N.tagName=="INPUT"&&(N.type=="text"||pui.dl(N.type)||N.type=="checkbox"||N.type=="radio"))Ib.designer.nh(N).kh()}}}if(g.hc==null||g.hc=="")g.hc="Simple";A=pui.widgets.tabStyles[g.hc];if(A==null)A=pui.widgets.tabStyles.Simple;C=pui.normalizeURL("/profoundui/proddata/images/tabs/"+
|
|
1633
|
-
g.hc.toLowerCase()+"/");F=A.imageFileExtension;if(F==null)F="gif";if(F.substr(0,1)==".")F=F.substr(1);G="#aaaaaa";if(A.borderColor!=null)G=A.borderColor;g.b.innerHTML="";g.b.style.backgroundColor="";if(A.fz!==false){if(!g.b.style.fontFamily)g.b.style.fontFamily=g.defaults.fontFamily;if(!g.b.style.fontSize)g.b.style.fontSize=g.defaults.fontSize;if(!g.b.style.color)g.b.style.color=g.defaults.color}var
|
|
1634
|
-
"absolute";g.A.style.left="0px";g.A.style.top="0px";g.A.style.height=A.height+
|
|
1635
|
-
"0px";
|
|
1636
|
-
Math.abs(S-4)+"px";
|
|
1637
|
-
"no-repeat";O.style.height=A.height+2+"px";O.style.width=A.leftWidth+"px";O.style.cssFloat="left";O.style.styleFloat="left";O.style.display="inline-block"}if(A.rightWidth!=null){var da=document.createElement("span");da.style.backgroundImage="url("+C+"right"+(
|
|
1638
|
-
K.Ea=
|
|
1639
|
-
g.selectedTab)K.style.cursor="pointer";else{if(A.separated!=true){O.style.backgroundColor=g.Fc;da.style.backgroundColor=g.Fc;K.style.backgroundColor=g.Fc;if((this.hc=="Glass"||this.hc=="Delicate"||this.hc=="Classic")&&
|
|
1640
|
-
K.style.padding="3px 0.5em";K.style.borderTop="1px solid "+G;K.style.borderLeft="1px solid "+G;K.style.borderRight="1px solid "+G;if(
|
|
1641
|
-
"default"}}K.onmouseover=g.Yy;K.onmouseout=g.Xy;K.ondblclick=g.uu;K.onclick=g.Wy;g.A.appendChild(S);A.leftWidth!=null&&S.appendChild(O);S.appendChild(K);A.rightWidth!=null&&S.appendChild(da)}g.b.appendChild(
|
|
1642
|
-
Fb();T&&g.Pr();B("div");B("input");B("select");B("textarea");B("button");B("img")};this.Pr=function(){var B=designUtils.Sn("plus","Add New Tab",g.b),
|
|
1643
|
-
"dspf"&&g.am==true)
|
|
1634
|
+
g.hc.toLowerCase()+"/");F=A.imageFileExtension;if(F==null)F="gif";if(F.substr(0,1)==".")F=F.substr(1);G="#aaaaaa";if(A.borderColor!=null)G=A.borderColor;g.b.innerHTML="";g.b.style.backgroundColor="";if(A.fz!==false){if(!g.b.style.fontFamily)g.b.style.fontFamily=g.defaults.fontFamily;if(!g.b.style.fontSize)g.b.style.fontSize=g.defaults.fontSize;if(!g.b.style.color)g.b.style.color=g.defaults.color}var D=7;if(A.useImages)D=1;g.A=document.createElement("div");g.A.className="header-area";g.A.style.position=
|
|
1635
|
+
"absolute";g.A.style.left="0px";g.A.style.top="0px";g.A.style.height=A.height+D+1+"px";g.A.style.padding="0px";g.A.style.whiteSpace="nowrap";g.A.style.overflow="hidden";if(A.backBar){g.b.style.overflowX="hidden";g.b.style.overflowY="hidden";if(A.backBarColor!=null)g.A.style.backgroundColor=A.backBarColor;else{g.A.style.backgroundImage="url("+C+"middle."+F+")";g.A.style.backgroundRepeat="repeat-x"}}g.A.style.width="100%";var E=document.createElement("div");E.style.position="absolute";E.style.left=
|
|
1636
|
+
"0px";E.style.top=A.height+D+"px";E.className="content-area";var K=g.b.style.width,S=0;if(typeof K=="string"&&K!=""&&!isNaN(K))K+="px";if(K!=null&&K!=""&&K.length>=3&&K.substr(K.length-2)=="px"){S=parseInt(K);if(isNaN(S))S=0;S+=2}else S=g.b.offsetWidth;K=g.b.style.height;if(typeof K=="string"&&K!=""&&!isNaN(K))K+="px";var P=0;if(K!=null&&K!=""&&K.length>=3&&K.substr(K.length-2)=="px"){P=parseInt(K);if(isNaN(P))P=0;P+=2}else P=g.b.offsetHeight;E.style.height=Math.abs(P-A.height-D-4)+"px";E.style.width=
|
|
1637
|
+
Math.abs(S-4)+"px";D=1;if(A.borderSize)D=A.borderSize;E.style.border=D+"px solid "+G;E.style.backgroundColor=g.Fc;for(D=0;D<g.hb.length;D++){S=document.createElement("span");S.style.display="inline-block";if(this.Xe[D])S.style.display="none";if(D==g.selectedTab){if(g.b.className!="")S.className=g.b.className.split(" ")[0]+"-";S.className+="selected-tab"}if(A.leftWidth!=null){var O=document.createElement("span");O.style.backgroundImage="url("+C+"left"+(D==g.selectedTab?"-sel":"")+"."+F+")";O.style.backgroundRepeat=
|
|
1638
|
+
"no-repeat";O.style.height=A.height+2+"px";O.style.width=A.leftWidth+"px";O.style.cssFloat="left";O.style.styleFloat="left";O.style.display="inline-block"}if(A.rightWidth!=null){var da=document.createElement("span");da.style.backgroundImage="url("+C+"right"+(D==g.selectedTab?"-sel":"")+"."+F+")";da.style.backgroundRepeat="no-repeat";da.style.height=A.height+2+"px";da.style.width=A.rightWidth+"px";da.style.cssFloat="left";da.style.styleFloat="left";da.style.display="inline-block"}K=document.createElement("span");
|
|
1639
|
+
K.Ea=D;K.innerHTML=g.hb[D];K.style.display="block";K.style.cssFloat="left";K.style.styleFloat="left";K.style.height=A.height+"px";K.style.lineHeight=A.height+"px";K.setAttribute("isTab","true");K.style.display="inline-block";if(A.useImages){K.style.backgroundImage="url("+C+"middle"+(D==g.selectedTab?"-sel":"")+"."+F+")";K.style.backgroundRepeat="repeat-x";P=1;if(A.leftMargin)P=A.leftMargin;O.style.marginLeft=P+"px";O.style.paddingTop="2px";K.style.padding="2px 0.5em";da.style.paddingTop="2px";if(D!=
|
|
1640
|
+
g.selectedTab)K.style.cursor="pointer";else{if(A.separated!=true){O.style.backgroundColor=g.Fc;da.style.backgroundColor=g.Fc;K.style.backgroundColor=g.Fc;if((this.hc=="Glass"||this.hc=="Delicate"||this.hc=="Classic")&&D==g.selectedTab){O.style.backgroundSize="cover";da.style.backgroundSize="cover";O.style.backgroundColor="";da.style.backgroundColor=""}}K.style.cursor="default";if(A.selColor!=null)K.style.color=A.selColor;if(A.selBold==true)K.style.fontWeight="bold"}}else{K.style.marginLeft="3px";
|
|
1641
|
+
K.style.padding="3px 0.5em";K.style.borderTop="1px solid "+G;K.style.borderLeft="1px solid "+G;K.style.borderRight="1px solid "+G;if(D!=g.selectedTab){K.style.borderBottom="1px solid "+G;K.style.backgroundColor=A.defaultTabColor?A.defaultTabColor:"#B7C8F6";if(R=="genie")K.style.filter="progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=white,endColorStr=##B7C8F6)";K.style.cursor="pointer"}else{K.style.backgroundColor=g.Fc;K.style.borderBottom="1px solid "+g.Fc;K.style.cursor=
|
|
1642
|
+
"default"}}K.onmouseover=g.Yy;K.onmouseout=g.Xy;K.ondblclick=g.uu;K.onclick=g.Wy;g.A.appendChild(S);A.leftWidth!=null&&S.appendChild(O);S.appendChild(K);A.rightWidth!=null&&S.appendChild(da)}g.b.appendChild(E);g.b.appendChild(g.A);t=p=null;if(g.A.scrollWidth-g.A.offsetWidth>0){g.hr(g.A);if(this.am&&this.qk){if(g.A.childNodes!=null&&g.selectedTab>=0&&g.selectedTab<g.A.childNodes.length){S=g.A.childNodes[g.selectedTab];g.Bd=Math.round(S.offsetLeft-g.A.offsetWidth/2+S.offsetWidth/2)}this.qk=false}g.kk()}var T=
|
|
1643
|
+
Fb();T&&g.Pr();B("div");B("input");B("select");B("textarea");B("button");B("img")};this.Pr=function(){var B=designUtils.Sn("plus","Add New Tab",g.b),D=designUtils.Sn("minus","Remove Tab",g.b);B.style.right="2px";D.style.right="16px";D.style.top=B.style.top="2px";B.onclick=g.yv;D.onclick=g.dy};this.vp=function(B){var D=g.b;if(D.disabled!=true)if(R=="dspf"&&g.bm==true){D.S=B;if(D.G=="true"||D.G=="send data")pui.G=D.G;if(g.Jp)pui.sb=g.Jp;if(pui.bc()==false){D.S=null;g.selectedTab=g.an}}else{g.Tc();if(R==
|
|
1644
|
+
"dspf"&&g.am==true)D.S=B}};this.Yy=function(B){B=wb(B);if(B.Ea==null&&B.parentNode.Ea!=null)B=B.parentNode;if(B.Ea!=g.selectedTab){if(A.useImages&&A.hiImages){B.style.backgroundImage="url("+C+"middle-hi."+F+")";B.previousSibling.style.backgroundImage="url("+C+"left-hi."+F+")";B.nextSibling.style.backgroundImage="url("+C+"right-hi."+F+")"}if(A.hiColor!=null)B.style.color=A.hiColor;if(A.hiUnderline==true)B.style.textDecoration="underline"}};this.Xy=function(B){B=wb(B);if(B.Ea==null&&B.parentNode.Ea!=
|
|
1644
1645
|
null)B=B.parentNode;if(B.Ea!=g.selectedTab){if(A.useImages&&A.hiImages){B.style.backgroundImage="url("+C+"middle."+F+")";B.previousSibling.style.backgroundImage="url("+C+"left."+F+")";B.nextSibling.style.backgroundImage="url("+C+"right."+F+")"}if(A.hiColor!=null)B.style.color="";if(A.hiUnderline==true)B.style.textDecoration=""}};this.Wy=function(B){B=B.target;g.Bd=B.parentNode.parentNode.scrollLeft;if(B.Ea==null&&B.parentNode.Ea!=null)B=B.parentNode;B=B.Ea;if(g.b.ontabclick!=null)if(g.b.ontabclick(B)==
|
|
1645
|
-
false)return;if(g.b.tu!=null){var
|
|
1646
|
-
function(S){var P=
|
|
1647
|
-
|
|
1648
|
-
this.dy=function(){var B=Ib.designer.nh(g.b),
|
|
1649
|
-
|
|
1646
|
+
false)return;if(g.b.tu!=null){var D=g.b.tu.split(",");if(D.length-1>=B){D=D[B];D=Lb(D);if(D!=""){Wb(D);return}}}g.an=g.selectedTab;D=false;if(g.selectedTab!=B)D=true;if(D)g.selectedTab=B;if(Fb()){var E=Ib.designer.selection;E.Sd.length>1&&E.clear()}D&&g.vp(B)};this.uu=function(B){if(Fb()){var D=B.target;if(D.Ea==null&&D.parentNode.Ea!=null)D=D.parentNode;var E=D.parentNode.parentNode.parentNode,K=Ib.designer.nh(E);if(!pui.p(K.properties["tab names"])&&!pui.Jb(K.properties["tab names"])){K.designer.Af.mp=
|
|
1647
|
+
function(S){var P=D.Ea,O=K.properties["tab names"];if(O==""||O==null)O=g.uc;O=pui.ha(O);O[P]=S;O=O.join(",");S=Dc()["tab names"];K.designer.ca.add(K,S.name);Pc(S,K.properties,K.dom,O,true,K,null);K.ob["tab names"]=true;K.hd=true;K.designer.jd[K.designer.Ma.tb]=true;K.designer.nb.Ih("tab names");D=E=K=K.designer.Af.mp=null};K.designer.Af.show(K,D,"tab")}}};this.yv=function(){var B=Ib.designer.nh(g.b),D=B.properties["tab names"];if(!pui.Jb(D)){if(pui.p(D)){var E=D.designValue;if(E==null||E=="")E=g.uc;
|
|
1648
|
+
E=pui.ha(E);E.push("Tab "+(E.length+1));D.designValue=E.join(",")}else{if(D==""||D==null)D=g.uc;D=pui.ha(D);D.push("New Tab");D=D.join(",")}E=!pui.p(D)&&!pui.Jb(D)?pui.ha(D):pui.ha(D.designValue);g.selectedTab=E.length-1;if(g.A)g.Bd=g.A.scrollWidth;E=Dc()["tab names"];B.designer.ca.start("Add New Tab");B.designer.ca.add(B,E.name);Pc(E,B.properties,B.dom,D,true,B,null);B.ob["tab names"]=true;B.hd=true;B.designer.jd[B.designer.Ma.tb]=true;B.designer.selection.clear();B.designer.selection.add(B);B.designer.nb.refresh()}};
|
|
1649
|
+
this.dy=function(){var B=Ib.designer.nh(g.b),D=B.properties["tab names"],E;if(!pui.Jb(D)){if(pui.p(D)){var K=D.designValue;if(K==null||K=="")K=g.uc;D.designValue=K;E=pui.ha(K)}else{if(D==""||D==null)D=g.uc;E=pui.ha(D)}if(E.length>1)if(g.di(E.length-1,B)){B.designer.selection.clear();B.designer.selection.add(B);B.designer.nb.refresh();g.selectedTab=E.length-1;g.Tc();pui.alert(g.Og)}else{E.pop();K=g.selectedTab;if(g.selectedTab>E.length-1)g.selectedTab=E.length-1;if(pui.p(D)||pui.Jb(D))D.designValue=
|
|
1650
|
+
E.join(",");else D=E.join(",");E=Dc()["tab names"];B.designer.ca.start("Remove Tab");B.designer.ca.add(B,E.name);Pc(E,B.properties,B.dom,D,true,B,null);B.ob["tab names"]=true;B.hd=true;B.designer.jd[B.designer.Ma.tb]=true;B.designer.nb.Ih("tab names");if(B.dom.Ia!=null&&B.dom.Ia==g)g.selectedTab=K}}};this.di=function(B,D){for(var E=0;E<D.designer.items.length;E++){var K=D.designer.items[E].dom;if(K.Va!=null&&K.db!=null&&K.Va==g.b.id)if(K.db==B)return true}return false};this.hr=function(){p=g.ei("left");
|
|
1650
1651
|
t=g.ei("right");if(Fb())t.style.right="35px";p.onmousedown=c;p.ontouchstart=c;p.onmouseup=f;p.ontouchend=f;p.onmouseout=p.onmouseup;p.Cx=p.onmouseup;t.onmousedown=e;t.ontouchstart=e;t.onmouseup=h;t.ontouchend=h;t.onmouseout=t.onmouseup;t.Cx=t.onmouseup;g.b.appendChild(p);g.b.appendChild(t)};this.kk=function(){var B=g.A.scrollWidth-g.A.offsetWidth;if(B-g.Bd<=3)g.Bd=B;else if(g.Bd<=3)g.Bd=0;g.A.scrollLeft=g.Bd;p.style.display=g.A.scrollLeft>0?"inline-block":"";t.style.display=g.A.scrollLeft<B?"inline-block":
|
|
1651
|
-
""};this.ei=function(B){var
|
|
1652
|
-
"px";S.style.width=A.rightWidth+"px"}B=document.createElement("span");B.className="mid";B.style.height=A.height+"px";if(A.useImages){B.style.backgroundImage="url("+C+"middle"+
|
|
1652
|
+
""};this.ei=function(B){var D=document.createElement("span");if(B)D.className="pui-tscrbtn "+B;var E="-sel.";if(pui["tabpanel scroll unsel style"]==true)E=".";if(A.leftWidth!=null){var K=document.createElement("span");K.className="edge";K.style.backgroundImage="url("+C+"left"+E+F+")";K.style.height=A.height+2+"px";K.style.width=A.leftWidth+"px"}if(A.rightWidth!=null){var S=document.createElement("span");S.className="edge";S.style.backgroundImage="url("+C+"right"+E+F+")";S.style.height=A.height+2+
|
|
1653
|
+
"px";S.style.width=A.rightWidth+"px"}B=document.createElement("span");B.className="mid";B.style.height=A.height+"px";if(A.useImages){B.style.backgroundImage="url("+C+"middle"+E+F+")";B.style.backgroundRepeat="repeat-x";E=1;if(A.leftMargin)E=A.leftMargin;K.style.marginLeft=E+"px";B.style.padding=A.height-17+"px 0.5em 0px";if(A.separated!=true){K.style.backgroundColor=g.Fc;S.style.backgroundColor=g.Fc;B.style.backgroundColor=g.Fc;if(this.hc=="Glass"||this.hc=="Delicate"||this.hc=="Classic"){K.style.backgroundSize=
|
|
1653
1654
|
"cover";S.style.backgroundSize="cover";K.style.backgroundColor="";S.style.backgroundColor="";K.style.height=A.height+"px";S.style.height=A.height+"px"}}if(A.selColor!=null)B.style.color=A.selColor;if(A.selBold==true)B.style.fontWeight="bold"}else{B.style.marginLeft="3px";B.style.padding="3px 0.5em";B.style.borderTop="1px solid "+G;B.style.borderLeft="1px solid "+G;B.style.borderRight="1px solid "+G;B.style.borderBottom="1px solid "+g.Fc;B.style.backgroundColor=pui["tabpanel scroll unsel style"]!=
|
|
1654
|
-
true?g.Fc:A.defaultTabColor?A.defaultTabColor:"#B7C8F6"}A.leftWidth!=null&&
|
|
1655
|
+
true?g.Fc:A.defaultTabColor?A.defaultTabColor:"#B7C8F6"}A.leftWidth!=null&&D.appendChild(K);D.appendChild(B);A.rightWidth!=null&&D.appendChild(S);return D}}ve.prototype=Object.create(pui.zd.prototype);
|
|
1655
1656
|
pui.widgets.add({name:"tab panel",ig:false,b:true,defaults:{width:"300px",height:"200px","tab names":"Tab 1,Tab 2,Tab 3","z index":"8",color:"#333366","font family":"Arial","font size":"12px"},propertySetters:{"field type":function(b){b.dom.sizeMe=function(){b.dom.tabPanel.z()};b.dom.tabPanel=new ve;var a=b.evalProperty("tab names");b.dom.tabPanel.hb=a!=null&&a!=""?pui.ha(a):["Tab 1","Tab 2","Tab 3"];b.dom.tabPanel.selectedTab=0;b.dom.tabPanel.b=b.dom;b.dom.tabPanel.hc=b.properties["tab panel style"];
|
|
1656
1657
|
if(b.design&&pui.p(b.dom.tabPanel.hc))b.dom.tabPanel.hc="Simple";if(b.properties["background color"]==null||b.properties["background color"]=="")b.dom.tabPanel.cu();if(R=="genie"||b.design)b.dom.tabPanel.z();if(!b.design){a=b.dom.tabPanel;b.dom.setTab=a.setTab.bind(a);b.dom.getTab=a.getTab.bind(a);b.dom.refresh=a.refresh.bind(a);b.dom.hideTab=a.Is.bind(a);b.dom.showTab=a.mu.bind(a)}},"tab names":function(b){if(b.dom.tabPanel!=null){var a=b.value;b.dom.tabPanel.hb=a!=null&&a!=""?pui.ha(a):["Tab 1",
|
|
1657
1658
|
"Tab 2","Tab 3"];if(R=="genie"||b.design)b.dom.tabPanel.z()}},"tab keys":function(b){b.dom.tu=b.value},"tab panel style":function(b){b.dom.tabPanel.hc=b.value;if(b.properties["background color"]==null||b.properties["background color"]=="")b.dom.tabPanel.cu();if(R=="genie"||b.design)b.dom.tabPanel.z();pui.widgets.Ox(b.value)},width:function(b){b.design&&pui.th(b.value)&&b.dom.tabPanel.z()},height:function(b){b.design&&pui.th(b.value)&&b.dom.tabPanel.z()},"response AID":function(b){if(b.dom.tabPanel)b.dom.tabPanel.Jp=
|
|
1658
1659
|
b.value}}});pui.OA=function(b){function a(P){if(g.qd[P].B.DBCSDataType&&g.qd[P].B.DBCSDataType=="G")return p[P].length;return pd(p[P])}function c(){if(t>=l.length-1)return false;t++;p.push("");return true}function e(P){if(P>=48&&P<=90)return true;if(P>=96&&P<=111)return true;if(P>=186&&P<=192)return true;if(P>=219&&P<=222)return true;if(P==32)return true;return false}function f(P,O,da){if(P.setSelectionRange){P.focus();P.setSelectionRange(O,da)}else if(P.createTextRange){P=P.createTextRange();P.collapse(true);
|
|
1659
1660
|
P.moveEnd("character",da);P.moveStart("character",O);P.select()}}function h(){var P,O;O=[];for(var da=0,T=0;T<r;T++){var L=n.charAt(T);if(L=="\n"||L==" "){da<T&&O.push(n.substring(da,T));da=T+1;O.push(L)}else T==r-1&&da<r&&O.push(n.substring(da))}if(C!="paste")for(T=0;T<O.length;T++){da=l[0];da-=G;G=0;if(O.length>T+2)if(O[T].length>=da&&O[T+1]==="\n"&&O[T+2]!==" "&&O[T+2]!=="\n"){O[T]+=O[T+2];O.splice(T+1,2);T--}}O=O;T=0;da=false;L=true;for(var Z=C=="paste";O.length>0;)if(O[0]=="\n"){if(!da){if(!c())break;
|
|
1660
1661
|
L=true}da=false;T<s&&s--;O.shift()}else if(O[0]==" "){var N=a(t)<l[t];if(!N){if(!c())break;if(!F&&!Z)da=true;L=true}if((N||!Z)&&O[1]!=="\n"){p[t]+=" ";L=false}else N&&O[1]=="\n"&&c();T++;O.shift()}else{P=a(t);if(!Z&&P+O[0].length==l[t]&&O.length>=3&&O[1]=="\n"&&O[2]!=" "){if(!c())break;L=da=true;N=O.shift();O.splice(1,0,N," ");T<s&&!F&&s++}else if(!Z&&P+O[0].length==l[t]-1&&O.length>=3&&O[1]=="\n"&&O[2]!=" "&&(!F||T>=s))O.splice(1,0," ");else if(P+O[0].length<=l[t]){if(O[1]=="\n"&&!F){da=false;L=
|
|
1661
|
-
true}else{p[t]+=O[0];L=false}T+=O[0].length;O.shift()}else if(L){N=O.shift();for(var v=0;v<N.length;){P=a(t);P=l[t]-P;p[t]+=N.substr(v,P);v+=P;if(v>=N.length)break;else if(!c()){O=[];break}L=true}Z||(da=true);K=true}else{if(!c()){if(Z){P=l[t]-P;p[t]+=O[0].substr(0,P)}break}F||(da=true);if(F&&g.qd!=null)da=true;if(O.length>=3&&O[1]=="\n"){O[2]!=" "&&O.splice(1,0," ");da=true}L=true}}if(C=="paste")s=y}var g=
|
|
1662
|
+
true}else{p[t]+=O[0];L=false}T+=O[0].length;O.shift()}else if(L){N=O.shift();for(var v=0;v<N.length;){P=a(t);P=l[t]-P;p[t]+=N.substr(v,P);v+=P;if(v>=N.length)break;else if(!c()){O=[];break}L=true}Z||(da=true);K=true}else{if(!c()){if(Z){P=l[t]-P;p[t]+=O[0].substr(0,P)}break}F||(da=true);if(F&&g.qd!=null)da=true;if(O.length>=3&&O[1]=="\n"){O[2]!=" "&&O.splice(1,0," ");da=true}L=true}}if(C=="paste")s=y}var g=wb(b);if(g.Wi!=null){for(var l=[],o=0;o<g.Wi.length;o++){l[o]=parseInt(g.Wi[o],10);if(isNaN(l[o]))l[o]=
|
|
1662
1663
|
0}var n=g.value,r=n.length,p=[];p.push("");var t=0,s=function(P){if(typeof P.selectionStart=="number")return P.selectionStart;else if(document.selection){var O=document.selection.createRange().duplicate();if(O.parentElement()==P){var da=document.body.createTextRange();da.moveToElementText(P);da.setEndPoint("EndToStart",O);var T=document.body.createTextRange();T.moveToElementText(P);T.setEndPoint("StartToEnd",O);var L=P=false,Z=false,N,v,V,La,ra,ua;N=v=da.text;V=La=O.text;ra=ua=T.text;do{if(!P)if(da.compareEndPoints("StartToEnd",
|
|
1663
1664
|
da)==0)P=true;else{da.moveEnd("character",-1);if(da.text==N)v+="\r\n";else P=true}if(!L)if(O.compareEndPoints("StartToEnd",O)==0)L=true;else{O.moveEnd("character",-1);if(O.text==V)La+="\r\n";else L=true}if(!Z)if(T.compareEndPoints("StartToEnd",T)==0)Z=true;else{T.moveEnd("character",-1);if(T.text==ra)ua+="\r\n";else Z=true}}while(!P||!L||!Z);return v.length}}}(g),y=s;if(!b)b=window.event;var A=b.which;if(!A)A=b.keyCode;var C=b.type;if(C=="keydown"&&A==17)g.Or=true;if(C=="keyup")g.Or=false;if(C=="paste"){b.preventDefault();
|
|
1664
1665
|
b.stopPropagation();o=(b.clipboardData||window.clipboardData).getData("text");if(o==null||o.length==0)return false;o=o.replace(/\r/g,"");o=o.replace(/\t/g," ");if(o.length==0)return;n=n.substr(0,g.selectionStart)+o+n.substr(g.selectionEnd);r=n.length;h()}if(!(A==8&&C=="keyup")){var F=A==8,G=0;if(A==8&&C=="keydown"&&s>0){if(pui.is_ie&&n.length<s)s=n.length;if(n.substr(s-1,1)=="\n"){n=n.substr(0,s-1)+n.substr(s);s-=1}if(n.substr(s-1,1)=="\r"){n=n.substr(0,s-1)+n.substr(s);s-=1}n=n.substr(0,s-1)+n.substr(s);
|
|
1665
|
-
if(s<=l[0])G=1;s-=1;b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();b.cancelBubble=true;b.returnValue=false;y=s}else if(A==46&&C=="keydown"){g.Xr=true;if(s<=l[0])g.bs=true}else if(A==46&&C=="keyup"){delete g.Xr;delete g.bs}else if(C=="input"){F=g.Xr===true;G=g.bs===true?1:0}if(A==13&&C=="keydown"){var B=0;for(o=0;o<r;o++){var
|
|
1666
|
-
b.cancelBubble=true}}var
|
|
1667
|
-
1<s&&C!="paste"&&!K)s+=1}}B=g.value.replace(/\r/g,"");if(C=="keydown"&&!g.Or&&g.selectionStart===g.selectionEnd&&e(A))if(p.length>=l.length&&
|
|
1666
|
+
if(s<=l[0])G=1;s-=1;b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();b.cancelBubble=true;b.returnValue=false;y=s}else if(A==46&&C=="keydown"){g.Xr=true;if(s<=l[0])g.bs=true}else if(A==46&&C=="keyup"){delete g.Xr;delete g.bs}else if(C=="input"){F=g.Xr===true;G=g.bs===true?1:0}if(A==13&&C=="keydown"){var B=0;for(o=0;o<r;o++){var D=n.charAt(o);D=="\n"&&B++}if(B+1>=l.length){b.preventDefault&&b.preventDefault();b.returnValue=false}else{b.stopPropagation&&b.stopPropagation();
|
|
1667
|
+
b.cancelBubble=true}}var E,K=false;if(g.qd!=null&&g.qd[0]!=null&&g.qd[0].B!=null&&g.qd[0].B.wrapped!==true&&(C=="input"||C=="keydown"&&A==8)){h();for(o=D=0;o<p.length;o++){if(s>=D&&s<D+p[o].length){E=o;break}D+=p[o].length}if(s==D)E=p.length-1}else if(C!="paste"){B=false;for(o=0;o<r;o++){D=n.charAt(o);if(D=="\n"||D=="\r"){if(o<y)s-=1;if(D=="\n"){if(!B&&!c())break;B=false}}else{if(a(t)>=l[t]){if(!c())break;B=true}p[t]+=D}if(y==o)E=t}}if(y==r)E=t;D="";for(o=0;o<=t;o++){D+=p[o];if(o!=t){D+="\n";if(D.length-
|
|
1668
|
+
1<s&&C!="paste"&&!K)s+=1}}B=g.value.replace(/\r/g,"");if(C=="keydown"&&!g.Or&&g.selectionStart===g.selectionEnd&&e(A))if(p.length>=l.length&&E!=null){var S=true;for(o=E;o<l.length;o++)if(p[o].length<l[o]){S=false;break}if(S){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();b.cancelBubble=true;b.returnValue=false;return}}if(D!=B&&g.qd[0]!=null){if(C=="paste"){g.value=D;f(g,s,s)}if(A==8){g.value=D;f(g,y,y)}}if(D!=B&&!g.qd){g.value=D;f(g,s,s)}}}};
|
|
1668
1669
|
pui.widgets.add({name:"text area",tag:"textarea",propertySetters:{"field type":function(b){b.dom.value=b.evalProperty("value");if(b.za.maxLength&&b.dom.maxLength!=b.za.maxLength)b.dom.maxLength=b.za.maxLength;if(b.za.st)b.dom.st=b.za.st;if(b.za.qd)b.dom.qd=b.za.qd;if(b.za.Wi)b.dom.Wi=b.za.Wi;R=="dspf"&&!b.design&&U(b.dom,"keydown",function(a){a=a||window.event;if(a.keyCode==13)a.cancelBubble=true});if(b.design)b.dom.Zp=false;if(R=="dspf")U(b.dom,"click",function(a){if(pui["highlight on focus"]){a.target.focus();
|
|
1669
1670
|
a.target.select()}});else if(typeof pui["allow spellcheck"]=="boolean")b.dom.Zp=pui["allow spellcheck"]},value:function(b){b.dom.value=b.value}},qc:function(b){b.propertyName=="field type"&&b.za&&b.za.l!=null&&b.dom&&b.dom.l==null&&pui.pg(b.dom);b.dom&&b.dom.l!=null&&pui.gp(b)}});pui.widgets.add({name:"textbox",tag:"input",newId:"TextBox",defaults:{"css class":"input"},vt:true,Ks:"pui-prompt",propertySetters:{"field type":function(b){b.dom.value=b.evalProperty("value");if(!b.design){md(b.properties,b.originalValue,b.dom);if(pui.pa&&!pui.xf&&b.dom.id.indexOf(".")==-1){U(b.dom,"focus",function(){Db("ipadKeyboard").style.display=""});U(b.dom,"blur",function(){Db("ipadKeyboard").style.display="none"})}if(typeof pui["allow spellcheck"]=="boolean")b.dom.Zp=pui["allow spellcheck"];
|
|
1670
1671
|
b.dom.calimg&&pui.Bp(b.dom);if(b.dom.getAttribute("autocomplete")==null&&(R!="genie"||!pui.F.config.Yg)){b.dom.setAttribute("autocomplete","off");R=="dspf"&&b.dom.setAttribute("name",pui.Rd())}}var a=b.evalProperty("prompt icon");if(b.design){b.dom.readOnly=true;b.dom.Zp=false;var c=b.e;c.Ll=null;if(a)c.Ll=a;b.dom.sizeMe=function(){c.kh();c.Bg()}}else b.dom.sizeMe=function(){pui.fp(b.dom)};b.dom.ge=true;a&&!b.design&&pui.Av(b);R=="dspf"&&U(b.dom,"click",function(e){if(pui["highlight on focus"]){e.target.focus();
|
|
@@ -1716,7 +1717,7 @@ function xe(b){function a(){clearTimeout(h);var g=e.P.parentNode;if(g!=null&&g.t
|
|
|
1716
1717
|
callback:a})==false&&c()}function Ac(b,a){var c=document.documentElement.clientHeight+"px";b.P.parentNode.style.height=c;document.body.style.height=c;document.body.parentNode.style.height=c;b.P.style.height=c;a&&b.setProperty("height",c)}
|
|
1717
1718
|
wa.Yt=function(b){this.Ze={active:b.active,data:b.data,designMode:b.designMode,errors:b.errors,file:b.file,fileId:b.fileId,il:b.il,jl:b.jl,library:b.library,metaData:{screen:{"record format name":b.metaData.screen["record format name"]}},msgInfo:b.msgInfo,name:b.name,ref:b.ref,Ej:b.Ej,subfiles:b.subfiles}};
|
|
1718
1719
|
wa.Sl=function(b){if(this.Ze!=null){if(this.dg[b]!=null&&this.wc[b]!=null){this.Ze.b=this.wc[b];this.Ze.ll=b;this.Ze.metaData.items=this.dg[b];this.Ze.ej=this.ej;pui.Fp(this.Ze);delete this.dg[b]}if(Object.keys(this.dg).length==0)this.Ze=null}};wa.destroy=function(){this.iScroll!=null&&this.iScroll.destroy();this.P&&delete this.P.layout;$b(this)};
|
|
1719
|
-
pui.layout.dk.prototype.handleEvent=function(b){switch(b.type){case "click":if(this.Df)if(!pui.designer.KA){b=
|
|
1720
|
+
pui.layout.dk.prototype.handleEvent=function(b){switch(b.type){case "click":if(this.Df)if(!pui.designer.KA){b=wb(b);if(b==this.P||b.getAttribute!=null&&b.getAttribute("container")=="true"&&pui.layout.template.wo(this.P).includes(b)){b=this.e;if(b!=null){var a=b.designer.selection;if(!(a.Sd.length==1&&a.Sd[0].e==b)){a.clear();a.add(b);b.designer.nb.refresh()}}}}break}};pui.layout.Template=function(b,a){this.ue=b&&b.Nl;this.designMode=b&&b.designMode;if(b)this.layout=b.layout;a&&this.Xi(a)};
|
|
1720
1721
|
pui.layout.Template.prototype=Object.create(pui.zd.prototype);wa=pui.layout.Template.prototype;wa.Xi=function(b){this.b=b;this.b.Ia=this;var a=b.layout;if(a&&typeof a.resize==="function")b.sizeMe=a.resize.bind(a)};wa.destroy=function(){if(this.b){delete this.b.Ia;delete this.b.sizeMe}$b(this)};wa.en=function(b,a){if(this.layout)return this.layout.Tf(b,a)};function ye(b,a){var c=a.properties;if(c)for(var e in c)b.setProperty(e,c[e])}wa.setProperty=pa(false);wa.fu=la();wa.resize=la();wa.render=la();
|
|
1721
1722
|
wa.sg=pa(-1);pui.layout.template.gw=function(b,a){var c=b.properties,e=b.Nl,f=new pui.Gm;f.rf=true;f.b=a;f.init();a.panel=f;a.sizeMe=function(){a.panel.resize()};var h=c["header text"];h!=null&&f.setText(h);h=c["header theme"];h!=null&&f.Qf(h);h=c["body theme"];h!=null&&f.Of(h);f.T(c["straight edge"]);h=c["has header"];h=h!=="false"&&h!==false;f.Lj(h);h=c["header height"];h!=null&&f.Mj(h);f.Dg(c);c=c.height;if(c==null)c=a.style.height||"300px";f.setHeight(c);if(e)a.style.position="relative";return a};pui.ak=function(b,a){pui.layout.Template.call(this,b,a);this.uc=pui.getLanguageText("runtimeText","section")+" 1,"+pui.getLanguageText("runtimeText","section")+" 2,"+pui.getLanguageText("runtimeText","section")+" 3";this.We=[];this.ce=[];this.Qb=[];this.Qg=[];this.Yq="none";this.Rq="b";this.Lq="c";this.Qc=-1;this.Qm=false;this.Ye=this.Wf=null;this.ii=[];this.Xu=this.hv.bind(this);this.init();this.b.sizeMe=this.resize.bind(this);if(this.layout&&this.layout.P)this.layout.P.sizeMe=this.resize.bind(this);
|
|
1722
1723
|
var c=b.properties,e=c["section names"];if(b.Cf>3&&(typeof e!=="string"||e.length===0)){e=this.uc;for(var f=e.split(",").length+1,h=b.Cf;f<=h;f++)e+=","+pui.getLanguageText("runtimeText","section")+" "+f;this.setProperty("section names",e);this.layout.Tf("section names",e)}else this.setProperty("section names",e);this.pe(0);e=c["header theme"];e!=null&&this.Qf(e);e=c["body theme"];e!=null&&this.Of(e);this.T(c["straight edge"]);e=c["small sections"];e=e==="true"||e===true;this.Fg(e);this.Dg(c);e=c.height;
|
|
@@ -1724,7 +1725,7 @@ if(e==null)e="300px";this.setHeight(e);if(!this.designMode){c=c["active section"
|
|
|
1724
1725
|
wa.render=function(){for(var b=this.ii,a=b.length,c=this.We.length;a>this.We.length;){var e=document.createElement("div");e.style.width="100%";e.style.padding="0";e.ty=c;e.onclick=this.Xu;var f=document.createElement("div");f.style.width="100%";f.style.height="175px";f.style.padding="0";var h=new pui.Fm;h.b=e;h.ue=this.ue;h.init();h.ud(this.Rq);h.setIcon("plus");h.im("left");var g=new pui.Hm;g.type="body";g.rf=true;g.b=f;g.init();g.ud(this.Lq);g.setHeight("100%");this.b.appendChild(e);this.b.appendChild(f);
|
|
1725
1726
|
this.We.push(e);this.ce.push(f);this.Qb.push(h);this.Qg.push(g);c++}for(;a<this.We.length;){e=this.We.pop();this.b.removeChild(e);f=this.ce.pop();this.b.removeChild(f);this.Qb.pop();this.Qg.pop()}a=0;for(c=b.length;a<c;a++){this.Qb[a].setText(b[a]);this.ce[a].style.overflow=a<b.length-1?"hidden":""}if(this.designMode){if(this.Wf==null){this.Wf=designUtils.Sn("plus",pui.getLanguageText("runtimeText","add x",[pui.getLanguageText("runtimeText","section")]),this.b);this.Wf.style.right="2px";this.Wf.style.bottom=
|
|
1726
1727
|
"2px";this.Wf.onclick=this.Fq.bind(this);this.Wf.Bv=true}else this.b.appendChild(this.Wf);if(this.Ye==null){this.Ye=designUtils.Sn("minus",pui.getLanguageText("runtimeText","delete x",[pui.getLanguageText("runtimeText","section")]),this.b);this.Ye.style.right="2px";this.Ye.style.bottom="16px";this.Ye.onclick=this.Fq.bind(this);this.Ye.style.display="none"}else this.b.appendChild(this.Ye);this.Ye.style.display=b.length>1?"":"none"}};
|
|
1727
|
-
wa.hv=function(b){b=
|
|
1728
|
+
wa.hv=function(b){b=wb(b);for(var a=null;a==null&&b!=null;){a=b.ty;b=b.parentNode}if(a!=null)if(this.Qc==a){a=-1;this.Qm&&!this.designMode&&this.pe(a)}else{if(this.b.onsectionclickevent!=null)if(this.b.onsectionclickevent(a)==false)return;this.pe(a)}};
|
|
1728
1729
|
wa.setProperty=function(b,a){switch(b){case "section names":var c=this.ii.length;if(a==null||a=="")a=this.uc;else if(pui.p(a)||pui.Jb(a))a=pui.ha(a.designValue).length==0?this.uc:a.designValue;var e=pui.ha(a);if(e.length!=c){var f=false;if(this.designMode){c=c;for(var h=e.length;c>h;c--)if(ze(this,c-1)){f=true;break}}if(f){pui.alert(this.Og);setTimeout(this.layout.Tf.bind(this.layout),1,"section names",this.ii.join(","))}else{this.ii=e;this.render();f=this.Qc;if(f>e.length-1)f=e.length-1;this.pe(f)}}else{this.ii=
|
|
1729
1730
|
e;this.render()}break;case "active section":if(!this.designMode)if(a!=null){a=Number(a);!isNaN(a)&&a!=0&&this.pe(a)}break;case "header theme":this.Qf(a);break;case "body theme":this.Of(a);break;case "small sections":this.Fg(a=="true"||a==true);break;case "allow collapse":this.Qm=a=="true"||a==true;this.pe(this.Qc);break;case "straight edge":this.T(a);break;case "color":case "font style":case "font weight":case "text align":case "text decoration":case "text transform":this.setStyle(b,a);break;case "font family":case "font size":this.setStyle(b,
|
|
1730
1731
|
a);this.resize();break;case "onsectionclick":this.designMode||(this.b.onsectionclickevent=function(){eval("var section = arguments[0];");try{return eval(a)}catch(g){pui.Ca(g,"Onexpand Error:\n")}});break;default:return false}if(this.layout&&this.layout.Pa)this.layout.Pa[b]=a;return true};
|
|
@@ -1770,14 +1771,14 @@ case b.type==="dragend":delete this.fi}};wa=pui.fd.prototype;wa.di=function(b){v
|
|
|
1770
1771
|
function Ge(b){if(b.am&&b.qk&&b.A.offsetWidth>0){var a=b.A.childNodes[b.Xm?He(b,b.selectedTab):b.selectedTab];if(a){b.Bd=Math.round(a.offsetLeft-b.A.offsetWidth/2+a.offsetWidth/2);b.qk=false}}}function He(b,a){for(var c=0,e=b.A.childNodes.length;c<e;c++){var f=b.A.childNodes[c];if(f.childNodes[1]&&f.childNodes[1].Ea===a)return c}return-1}wa.resize=function(){if(this.hi){Ge(this);this.kk()}};
|
|
1771
1772
|
wa.destroy=function(){var b=this.b;if(b){delete b.setTab;delete b.getTab;delete b.refresh;delete b.hideTab;delete b.showTab}pui.layout.Template.prototype.destroy.call(this)};wa.sg=function(){return this.selectedTab!=null?parseInt(this.selectedTab,10):-1};pui.Jm=function(b,a){pui.layout.Template.call(this,b,a);this.bg=document.createElement("fieldset");this.bg.className="layout";this.pk=document.createElement("legend");this.bg.appendChild(this.pk);this.J=document.createElement("div");this.J.setAttribute("container","true");this.bg.appendChild(this.J);this.b.appendChild(this.bg)};pui.Jm.prototype=Object.create(pui.layout.Template.prototype);
|
|
1772
1773
|
pui.Jm.prototype.setProperty=function(b,a){switch(b){case "legend":this.pk.innerHTML=a;break;case "legend align":this.pk.setAttribute("align",a);break;case "legend style":this.pk.style=a;break;case "border style":this.bg.style.borderStyle=a;break;case "border width":this.bg.style.borderWidth=a;break;case "border color":this.bg.style.borderColor=a;break;default:return false}if(this.b.layout&&this.b.layout.Pa)this.b.layout.Pa[b]=a;return true};pui.layout.templates={};pui.retrieveCustomLayoutTemplate=function(b){if(typeof b==="string"&&b.length>0){pui.lg=pui.lg||[];var a=b;if(b.substr(0,1)!="/"&&b.substr(0,5).toLowerCase()!="http:"&&b.substr(0,6).toLowerCase()!="https:")a="/profoundui/userdata/layouts/"+b+".html";pui.lg.push({rm:b,url:pui.normalizeURL(a)})}};
|
|
1773
|
-
pui.maximizeLayout=function(b){var a=
|
|
1774
|
-
c.nb.refresh();
|
|
1774
|
+
pui.maximizeLayout=function(b){var a=wb(b).parentNode,c=Ib.designer,e=c.nh(a);c.ca.start("Maximize Layout");c.ca.add(e,"left");c.ca.add(e,"top");c.ca.add(e,"width");c.ca.add(e,"height");a.style.left="0px";e.properties.left="0px";e.ob.left=true;a.style.top="0px";e.properties.top="0px";e.ob.top=true;a.style.width="100%";e.properties.width="100%";e.ob.width=true;a.style.height="100%";e.properties.height="100%";e.ob.height=true;c.jd[c.Ma.tb]=true;c.cp();c.selection.clear();a.layout.resize();c.selection.add(e);
|
|
1775
|
+
c.nb.refresh();xb(b)};
|
|
1775
1776
|
pui.layout.template.load=function(b){var a;a=b.dom;a=a!=null?a.cloneNode(false):document.createElement("div");a.innerHTML="";var c=pui.layout.templates[b.template];switch(b.template){case "css panel":a=pui.layout.template.gw(b,a);break;case "accordion":new pui.ak(b,a);break;case "tab panel":new pui.fd(b,a);break;case "responsive layout":new (b.designMode?pui.designer.yA.Ng:pui.Ng)(b,a);break;case "fieldset":new pui.Jm(b,a);break;default:a=typeof c=="function"?c(b):pui.layout.template.Ft(b,a);break}return a};
|
|
1776
1777
|
pui.layout.et='<div condition="{ designValue: \'true\', runtimeValue: \'false\', proxyValue: \'false\' }" title="Maximize" style="position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; cursor: pointer; background-image: url(/profoundui/proddata/images/icons/maximize.png)" onmousedown="pui.maximizeLayout(event)" />';pui.layout.templates["simple container"]="<div style=\"position: relative; width: 100%; height: 100%; overflow: hidden; overflow-x: { property: 'overflow x', helpDefault: 'hidden', help: 'Determines whether a horizontal scrollbar should be displayed.', choices: ['visible', 'hidden', 'scroll', 'auto'] }; overflow-y: { property: 'overflow y', helpDefault: 'hidden', help: 'Determines whether a vertical scrollbar should be displayed.', choices: ['visible', 'hidden', 'scroll', 'auto'] };\"><div stretch=\"true\" container=\"true\" style=\"overflow: hidden; { designValue: 'border: 2px dashed #666666;' } { proxyValue: 'width: 97px; height: 97px;' } \"></div></div>";
|
|
1777
1778
|
pui.layout.templates.table='<table style="empty-cells: show; overflow: hidden;" width="100%" height="100%"><tr repeat="{ property: \'rows\', helpDefault: \'2\', help: \'Specifies the number of table rows for this layout.\' }"><td style="border: { designValue: \'1\', runtimeValue: 0 }px dashed #666666;" repeat="{ property: \'columns\', helpDefault: \'2\', help: \'Specifies the number of table columns for this layout.\' }"><div stretch="true" container="true" style="position: relative; width: 100%; overflow: hidden;"></div></td></tr></table>';
|
|
1778
1779
|
pui.layout.templates.table+=pui.layout.et;pui.layout.templates["mobile device"]='<table cellpadding="0" cellspacing="0">';pui.layout.templates["mobile device"]+="<tr condition=\"{ property: 'top bar', choices: ['true','false'], helpDefault: 'true', help: 'Determines whether the mobile layout should have a top bar.' }\"><td class=\"top-bar\"><div container=\"true\" class=\"top-bar\" style=\"position: relative; width: 100%; overflow: hidden;\"></div></td></tr>";
|
|
1779
1780
|
pui.layout.templates["mobile device"]+='<tr><td class="content-section"><div class="content-section" stretch="true" container="true"></div></td></tr>';pui.layout.templates["mobile device"]+="<tr condition=\"{ property: 'bottom bar', choices: ['true','false'], helpDefault: 'true', help: 'Determines whether the mobile layout should have a bottom bar.' }\"><td class=\"bottom-bar\"><div container=\"true\" class=\"bottom-bar\" style=\"position: relative; width: 100%; overflow: hidden;\"></div></td></tr>";
|
|
1780
|
-
pui.layout.templates["mobile device"]+="</table>";pui.layout.templates["mobile device"]+=pui.layout.et;pui.layout.templates["css panel"]=true;pui.layout.templates.accordion=true;pui.layout.templates["responsive layout"]=true;pui.layout.templates["tab panel"]=true;pui.layout.templates.fieldset=true;pui.layout.Pw=function(){var b=pui.layout.templates,a=[];for(var c in b)a.push(c);return a};pui.layout.template.Ft=function(b,a){function c(){var A=g.indexOf("{");if(A==-1)return null;for(var C=null,F=false,G=false,B=0,
|
|
1781
|
+
pui.layout.templates["mobile device"]+="</table>";pui.layout.templates["mobile device"]+=pui.layout.et;pui.layout.templates["css panel"]=true;pui.layout.templates.accordion=true;pui.layout.templates["responsive layout"]=true;pui.layout.templates["tab panel"]=true;pui.layout.templates.fieldset=true;pui.layout.Pw=function(){var b=pui.layout.templates,a=[];for(var c in b)a.push(c);return a};pui.layout.template.Ft=function(b,a){function c(){var A=g.indexOf("{");if(A==-1)return null;for(var C=null,F=false,G=false,B=0,D=A;D<g.length;D++){var E=g.substr(D,1);if(E=="'")F=!F;else if(E=='"')G=!G;else if(!(F||G)){if(E=="{")B+=1;if(E=="}")B-=1;if(B==0){C=D;break}}}if(C==null)return null;return{start:A,end:C}}function e(A){if(A==null)return"";if(typeof A=="string")return A;if(typeof A=="number"||typeof A=="boolean")return String(A);if(typeof A=="object"){var C=A.property;if(r){if(C!=null){A.name=
|
|
1781
1782
|
C;A.bind=false;p[C]=A}return""}var F=null;if(C!=null)F=l[C];if(F==null)F=A.defaultValue;if(F==null&&o)F=A.designValue;if(F==null)F="";if(typeof F=="object")return e(F);return F}return""}function f(A){var C="("+g.substring(A.start,A.end+1)+")";A=null;try{A=eval(C)}catch(F){}if(A==null)return"";var G;A=A;if(A.designValue!=null||A.runtimeValue!=null||A.proxyValue!=null){var B;if(o||r)B=e(A.designValue);if(!o||r)B=e(A.runtimeValue);if(n&&A.proxyValue!=null)B=A.proxyValue;G=B}else if(A.property!=null)G=
|
|
1782
1783
|
e(A);return G}function h(A,C){g=g.substr(0,A.start)+C+g.substr(A.end+1)}var g=pui.layout.templates[b.template];if(typeof g!="string"){console.log("Template,",b.template,", did not exist. Reverting to simple container.");g=pui.layout.templates[b.template]=pui.layout.templates["simple container"]}for(var l=b.properties,o=b.designMode,n=b.Nl,r=b.oy,p={},t=c();t!=null;){var s=f(t);h(t,s);t=c()}if(r){t=[];for(var y in p)t.push(p[y]);return pui.layout.Mi(t)}else{a.innerHTML=g;return a}};pui.layout.template.Et=function(b){function a(e){if(e!=null){if(e.getAttribute!=null){if(e.getAttribute("condition")=="false"&&e.parentNode!=null){e.parentNode.removeChild(e);return}var f=e.getAttribute("repeat");if(f!=null){e.removeAttribute("repeat");f=parseInt(f);if(!isNaN(f)){if(f<=0)e.style.display="none";f>1&&c.push({el:e,iy:f})}}if(e.getAttribute("container")=="true")if(e.innerHTML==null)e.removeAttribute("container");else e.innerHTML=""}e=e.childNodes;if(!(e==null||e.length==null))for(f=0;f<
|
|
1783
1784
|
e.length;f++)a(e[f])}}var c=[];a(b);(function(){for(var e;(e=c.pop())!=null;){var f=e.el;e=e.iy-1;for(var h=0;h<e;h++){var g=f.cloneNode(true);f.parentNode.insertBefore(g,f)}}})()};pui.layout.Mi=function(b){var a=[{name:"Identification",category:true},{name:"id",maxLength:75,V:"id",a:"id",help:"Sets the ID of the layout element.",bind:false,va:false},{name:"field type",displayName:"widget type",choices:["layout"],je:false,a:"widget",help:"Determines the type of control that is used to render the element.",bind:false,va:false},{name:"Template Settings",category:true,context:"dspf"},{name:"template",choices:pui.layout.Pw,je:false,a:"widget",help:"Specifies the name of the template used to render the layout.",
|
|
@@ -1820,19 +1821,19 @@ JSON.parse(ua);if(ua.threadId)y=ua.threadId;if(ua.status==="error"){o.hideLoader
|
|
|
1820
1821
|
"function"?window.marked(v+O):v+O;if(ua.status==="citation")Ga=Ga.replace(ua.citationPlaceholder,ua.citationContent);o.add({message:Ga,type:"agent-response",replace:true})}}}Z()}})}var N=new TextDecoder("utf-8"),v="",V;Z()}function f(L){var Z=L.status;if(L.threadId)y=L.threadId;if(L.runId)A=L.runId;if(L.modelKey)C=L.modelKey;if(L.message){var N=L.message,v="agent-response";if(L.status==="error"){N="Error: "+N;v="error"}if(L.status==="failed"){N="Failed: "+N;v="error"}if(L.status==="cancelled"){N=
|
|
1821
1822
|
"Cancelled";v="error"}if(L.status==="expired"){N="Chat Expired";v="error"}if(L.charts){if(!profound.ai.Ek){var V=window.define;window.define=undefined;profound.ai.$o(da,function(){window.define=V;profound.ai.Ek=true})}var La=L.charts;for(var ra in La)N=N.replace(ra,'<div class="pai-chart" data-config="'+JSON.stringify(La[ra]).replace(/"/g,""")+'"><span>Loading chart...</span><canvas></canvas></div>')}o.add({message:N,type:v});L.charts&&c()}Z==="queued"||Z==="in_progress"?setTimeout(function(){o.poll()},
|
|
1822
1823
|
F):o.hideLoader()}function h(){t.value===""||o.isLoading()?s.classList.remove("pai-send-button-active"):s.classList.add("pai-send-button-active")}function g(){t.style.height="1px";var L=t.scrollHeight;if(L>100)L=100;r.style.height="calc(100% - "+(L+54)+"px)";t.style.height=L+"px"}function l(L,Z){if(typeof L!=="string")return L;if(L.length!==7)return L;if(L.substring(0,1)!=="#")return L;var N=parseInt(L.substring(1,3),16),v=parseInt(L.substring(3,5),16),V=parseInt(L.substring(5,7),16);N=parseInt(N*
|
|
1823
|
-
(100+Z)/100);v=parseInt(v*(100+Z)/100);V=parseInt(V*(100+Z)/100);N=N<255?N:255;v=v<255?v:255;V=V<255?V:255;N=N.toString(16).length==1?"0"+N.toString(16):N.toString(16);v=v.toString(16).length==1?"0"+v.toString(16):v.toString(16);V=V.toString(16).length==1?"0"+V.toString(16):V.toString(16);return"#"+N+v+V}var o=this,n=null,r=null,p=null,t=null,s=null,y=null,A=null,C=null,F=1E3,G=null,B=null,
|
|
1824
|
-
T=null;this.init=function(L){L||(L={});if(!L.container)L.container=document.body;L.closeButton||(L.closeButton=true);L.closeTitle||(L.closeTitle="Close this conversation");L.sendTitle||(L.sendTitle="Send this message");L.promptPlaceHolder||(L.promptPlaceHolder="Send a message...");if(L.heading)o.heading=L.heading;if(L.greeting)o.greeting=L.greeting;if(L.agent)o.agent=L.agent;if(L.pollInterval)F=L.pollInterval;if(L.loaderMessage)
|
|
1824
|
+
(100+Z)/100);v=parseInt(v*(100+Z)/100);V=parseInt(V*(100+Z)/100);N=N<255?N:255;v=v<255?v:255;V=V<255?V:255;N=N.toString(16).length==1?"0"+N.toString(16):N.toString(16);v=v.toString(16).length==1?"0"+v.toString(16):v.toString(16);V=V.toString(16).length==1?"0"+V.toString(16):V.toString(16);return"#"+N+v+V}var o=this,n=null,r=null,p=null,t=null,s=null,y=null,A=null,C=null,F=1E3,G=null,B=null,D="Thinking",E="",K="light",S=null,P=false,O='<span class="pai-loader-dot pai-inline-loader"></span>',da="https://cdn.jsdelivr.net/npm/chart.js@4/dist/chart.umd.min.js",
|
|
1825
|
+
T=null;this.init=function(L){L||(L={});if(!L.container)L.container=document.body;L.closeButton||(L.closeButton=true);L.closeTitle||(L.closeTitle="Close this conversation");L.sendTitle||(L.sendTitle="Send this message");L.promptPlaceHolder||(L.promptPlaceHolder="Send a message...");if(L.heading)o.heading=L.heading;if(L.greeting)o.greeting=L.greeting;if(L.agent)o.agent=L.agent;if(L.pollInterval)F=L.pollInterval;if(L.loaderMessage)D=L.defaultLoaderMessage;if(L.server)E=L.server;if(L.data)o.data=L.data;
|
|
1825
1826
|
if(L.stream)P=L.stream;if(L.jwt)T=L.jwt;o.dom=document.createElement("div");o.dom.classList.add("pai-chat");o.dom.classList.add("pai-hidden");L.container.appendChild(o.dom);if(L.closeButton){n=document.createElement("div");n.classList.add("pai-close-button");n.title=L.closeTitle;n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>';
|
|
1826
1827
|
n.addEventListener("click",function(){o.onClose&&o.onClose();b()?o.clear():o.hide()});o.dom.appendChild(n)}r=document.createElement("div");r.classList.add("pai-messages");o.dom.appendChild(r);p=document.createElement("div");p.classList.add("pai-prompt-area");t=document.createElement("textarea");t.classList.add("pai-prompt-box");t.setAttribute("placeholder",L.promptPlaceHolder);t.addEventListener("keydown",function(v){if(v.key==="Enter"){v.shiftKey||v.preventDefault();v.stopPropagation();v.shiftKey||
|
|
1827
1828
|
o.send()}h()});t.addEventListener("input",function(){g();h()});p.appendChild(t);s=document.createElement("div");s.classList.add("pai-send-button");s.title=L.sendTitle;s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"/></svg>';s.addEventListener("click",function(){o.send()});p.appendChild(s);o.dom.appendChild(p);G=document.createElement("div");
|
|
1828
1829
|
G.classList.add("pai-loader");B=document.createElement("span");B.classList.add("pai-loader-message");G.appendChild(B);for(var Z=1;Z<=3;Z++){var N=document.createElement("div");N.classList.add("pai-loader-dot");G.appendChild(N)}o.clear();L.theme&&o.setTheme(L.theme);L.brandColor&&o.setBrandColor(L.brandColor)};this.show=function(){o.dom.classList.remove("pai-hidden");t.focus()};this.hide=function(){o.dom.classList.add("pai-hidden")};this.add=function(L){var Z=L.message,N=document.createElement("div");
|
|
1829
|
-
N.classList.add("pai-message");var v=L.type;v||(v="user-message");N.classList.add("pai-"+v);if(v==="agent-response"){N.classList.add("markdown-body");if(
|
|
1830
|
+
N.classList.add("pai-message");var v=L.type;v||(v="user-message");N.classList.add("pai-"+v);if(v==="agent-response"){N.classList.add("markdown-body");if(E)Z=Z.replace(/<img src="\/profound-ai\/image\?file=/g,'<img src="'+E+"/profound-ai/image?file=");N.innerHTML=Z;N.querySelectorAll("a").forEach(function(V){V.addEventListener("click",function(){pui.skipConfirm=true;setTimeout(function(){pui.skipConfirm=false},250)})});N.querySelectorAll("span.pai-citation").forEach(function(V){function La(){if(ra&&
|
|
1830
1831
|
!ra.matches(":hover")){V.removeChild(ra);ra=null}}var ra,ua;V.addEventListener("mouseenter",function(){if(!ra)if(V.getAttribute("data-citation")){ra=document.createElement("div");ra.classList.add("pai-tooltip-content");ra.innerHTML=V.getAttribute("data-citation");V.appendChild(ra);var Ga=V.getBoundingClientRect();ra.style.left=Ga.left+"px";ra.style.top=Ga.top-ra.offsetHeight-5+"px";ra.addEventListener("mouseenter",function(){clearTimeout(ua)});ra.addEventListener("mouseleave",function(){La()})}});
|
|
1831
1832
|
V.addEventListener("mouseleave",function(){ua=setTimeout(La,100)})});if(L.replace)(L=r.lastChild)&&L.classList.contains("pai-agent-response")&&L.parentNode.removeChild(L)}else N.innerText=Z;r.appendChild(N);r.scrollTop=r.scrollHeight};this.clear=function(){r.innerHTML="";o.heading&&o.add({message:o.heading,type:"heading"});o.greeting&&o.add({message:o.greeting,type:"greeting"});o.setBrandColor(S);A=y=null};this.setTheme=function(L){K=L;K=typeof K!=="string"?"light":K.toLowerCase();K==="dark"?o.dom.classList.add("pai-dark"):
|
|
1832
1833
|
o.dom.classList.remove("pai-dark")};this.setBrandColor=function(L){S=L;if(L=o.dom.querySelector(".pai-heading")){L.style.backgroundColor=null;L.style.backgroundImage=null;L.classList.remove("pai-branded")}n&&n.classList.remove("pai-branded");s.style.backgroundColor=null;if(S){var Z=l(S,-30);if(L){L.style.backgroundColor=S;L.style.backgroundImage="linear-gradient(to right, "+S+", "+Z+")";L.classList.add("pai-branded")}n&&L&&n.classList.add("pai-branded");s.style.backgroundColor=S}};this.send=function(){if(t.value!==
|
|
1833
1834
|
"")if(!o.isLoading()){o.onSend&&o.onSend(t.value);o.add({message:t.value});var L={};L.message=t.value;if(y)L.threadId=y;var Z="/profound-ai/chat";if(b()){L.agentData=a();L.agentFile=Ext.getCmp("centerPanel").getActiveTab().title.replace(/\*/g,"").trim();P=pui.streamingModelList.includes(L.agentData.aiAgent.model);Z="/ide/profound-ai/chat"}else L.agent=o.agent;var N=o.data;if(typeof N==="function")N=N();if(o.data)L.data=N;t.value="";g();t.focus();o.showLoader();N={"Content-Type":"application/json"};
|
|
1834
|
-
if(P){N.Connection="keep-alive";N["Response-Type"]="stream"}if(T){var v=T;if(typeof v==="function")v=v();N.Authorization="Bearer "+v}fetch(
|
|
1835
|
-
fetch(
|
|
1835
|
+
if(P){N.Connection="keep-alive";N["Response-Type"]="stream"}if(T){var v=T;if(typeof v==="function")v=v();N.Authorization="Bearer "+v}fetch(E+Z,{method:"POST",headers:N,body:JSON.stringify(L)}).then(function(V){return P?V.body.getReader():V.json()}).then(function(V){P?e(V):f(V)})["catch"](function(V){o.hideLoader();o.add({message:"Error: "+V.message,type:"error"})})}};this.poll=function(){if(!(!y||!A||!C)){var L={};L.threadId=y;L.runId=A;L.modelKey=C;var Z="/profound-ai/poll";if(b())Z="/ide/profound-ai/poll";
|
|
1836
|
+
fetch(E+Z,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(L)}).then(function(N){return N.json()}).then(function(N){f(N)})["catch"](function(N){o.hideLoader();o.add({message:"Error: "+N.message,type:"error"})})}};this.showLoader=function(L){L||(L=D);B.innerText=L;if(!o.isLoading()){P?o.add({message:O,type:"agent-response"}):r.appendChild(G);h()}r.scrollTop=r.scrollHeight};this.hideLoader=function(){if(o.isLoading()){if(P)for(var L=r.querySelectorAll(".pai-inline-loader"),
|
|
1836
1837
|
Z=L.length-1;Z>=0;Z--)L[Z].parentNode.removeChild(L[Z]);else r.removeChild(G);h()}};this.isLoading=function(){if(P)return r.querySelectorAll(".pai-inline-loader").length>0;return G.parentNode===r};this.destroy=function(){if(o.dom){o.dom.parentNode.removeChild(o.dom);o.dom=null}};this.removeEmbedIcon=function(){profound.ai.removeEmbedIcon()}};profound.ai.ct=function(b){if(!document.querySelector('link[href="'+b+'"]')){var a=document.createElement("link");a.rel="stylesheet";a.href=b;document.head.appendChild(a)}};
|
|
1837
1838
|
profound.ai.$o=function(b,a){if(document.querySelector('script[src="'+b+'"]'))typeof a==="function"&&a();else{var c=document.createElement("script");c.type="text/javascript";c.src=b;c.onload=function(){typeof a==="function"&&a()};document.head.appendChild(c)}};
|
|
1838
1839
|
profound.ai.startAgent=function(b,a){b||(b={});var c="";if(b.server)c=b.server;if(!a&&b.agent)fetch(c+"/profound-ai/attributes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent:b.agent})}).then(function(e){return e.json()}).then(function(e){if(e.status==="error")throw Error(e.message);e=e.attributes;for(var f in e)if(b[f]===undefined)b[f]=e[f];profound.ai.startAgent(b,true)})["catch"](function(e){throw Error("Unable to start AI Agent: "+e.message);});else{if(!b.container)b.container=
|
|
@@ -1846,7 +1847,7 @@ Atrium.setTabTitle=function(){var b=Atrium.getAtriumWindow();if(b!=null)if(argum
|
|
|
1846
1847
|
Atrium.attachActivityMonitor=function(){var b=Atrium.getAtriumWindow(true);b!=null&&b.Atrium.api.attachActivityMonitor(window)};window.hideElement=Rc;window.hideElements=Sc;window.removeElement=Tc;window.removeElements=Uc;window.getElementValue=Vc;window.get=Wc;window.getObj=Db;
|
|
1847
1848
|
window.postToNewWindow=function(b){b||pui.alert("postToNewWindow Error: URL not specified.");var a=document.forms.postToForm;if(a==null){a=document.createElement("form");document.body.appendChild(a)}a.innerHTML="";a.action=b;a.method="post";a.target="_blank";for(var c=1;c<arguments.length;c+=2){var e=arguments[c],f="";if(c+1<arguments.length)f=arguments[c+1];e=Zb("input",e);e.type="hidden";e.value=f;a.appendChild(e)}a.submit()};
|
|
1848
1849
|
window.postTo=function(b){b||pui.alert("postTo Error: URL not specified.");var a=document.forms.postToForm;if(a==null){a=document.createElement("form");document.body.appendChild(a)}a.innerHTML="";a.action=b;a.method="post";a.target="";for(var c=1;c<arguments.length;c+=2){var e=arguments[c],f="";if(c+1<arguments.length)f=arguments[c+1];e=Zb("input",e);e.type="hidden";e.value=f;a.appendChild(e)}a.submit()};window.changeElementValue=Xc;
|
|
1849
|
-
window.changeElementClass=function(b,a){var c=document.getElementById(b);if(c==null)return"";c.className=a};window.newElement=Yc;window.preventEvent=
|
|
1850
|
+
window.changeElementClass=function(b,a){var c=document.getElementById(b);if(c==null)return"";c.className=a};window.newElement=Yc;window.preventEvent=xb;window.setTab=function(b,a){var c=Db(b);if(c==null||c.setTab==null)Zc[b]=a;else c.setTab(a)};window.ltrim=Vb;window.rtrim=Qb;window.trim=Lb;window.attachCalendar=function(b,a){var c=document.getElementById(b);c!=null&&Kd(c,a)};window.createNamedElement=Zb;window.getInnerText=Oc;
|
|
1850
1851
|
window.setDOMAttribute=function(b,a,c){b=typeof b=="string"?document.getElementById(b):b;if(b!=null)try{b[a]=c}catch(e){}};
|
|
1851
1852
|
window.getActualStyle=function(b,a){for(var c=a.replace(/ /g,"-"),e="",f=false,h=0;h<a.length;h++){var g=a.substr(h,1);if(f){g=g.toUpperCase();f=false}if(g==" ")f=true;else e+=g}f="";if(b.currentStyle)f=b.currentStyle[e];else if(window.getComputedStyle)f=document.defaultView.getComputedStyle(b,null).getPropertyValue(c);if(a.indexOf("color")>=0){if(f.substr(0,1)=="#")f=f.toUpperCase();if(f.substr(0,4)=="rgb("&&f.substr(f.length-1,1)==")"){f=f.substr(4,f.length-5);f=f.replace(/ /g,"");c=f.split(",");
|
|
1852
1853
|
f="#";for(h=0;h<c.length;h++){e=Number(c[h]).toString(16).toUpperCase();if(e.length==1)e="0"+e;f+=e}}}return f};window.addEvent=U;window.removeEvent=bc;window.getMouseX=$c;window.getMouseY=ad;window.showErrors=function(){if(Ya.length==0)alert("No errors have been reported.");else for(var b,a=0;a<Ya.length;a++){b=Ya[a];b="Operation: "+b.Dl+"\nId: "+b.id+"\n\nMessage: "+b.text+"\n"+b.tm;alert(b)}};window.presskey=function(b){Wb(b)};window.pressKey=Wb;window.pressKEY=function(b){Wb(b)};
|
|
@@ -1854,7 +1855,7 @@ window.Presskey=function(b){Wb(b)};window.PressKey=function(b){Wb(b)};window.PRE
|
|
|
1854
1855
|
window.currentDate=function(b,a){if(b==null||b=="Y")slashes=true;if(Fb()){var c;c=slashes?"DD/DD/DD":"DDDDDD";if(a)c+="DD";return c}else{c="";if(pui&&pui.appJob){if(pui.appJob.sysTime==0)return"";c=new Date(pui.appJob.sysTime*1E3);var e=pui.appJob.dateFormat;if(a){if(e=="*MDY")e="*USA";if(e=="*DMY")e="*EUR";if(e=="*YMD")e="*ISO"}e=pui.formatting.keywords.DATFMT[e].eb.replace(/\B/g,pui.appJob.dateSeparator);c=c.format(e,"en_US")}else{c=new Date;e=2E3;if(a)e=0;c=(parseInt(c.getMonth(),10)+1<10?"0":
|
|
1855
1856
|
"")+(parseInt(c.getMonth(),10)+1)+"/"+(parseInt(c.getDate(),10)<10?"0":"")+c.getDate()+"/"+(parseInt(c.getFullYear(),10)-e<10?"0":"")+(parseInt(c.getFullYear(),10)-e)}if(b!=null&&b!="Y"){e="/";if(pui!=null&&pui.appJob!=null&&pui.appJob.dateSeparator!=null)e=pui.appJob.dateSeparator;c=c.replace(e,"");c=c.replace(e,"");if(c.substr(0,1)=="0")c=" "+c.substr(1)}return c}};
|
|
1856
1857
|
window.currentTime=function(){if(Fb())return"TT:TT:TT";else{var b;if(pui&&pui.appJob){if(pui.appJob.sysTime==0)return"";b=new Date(pui.appJob.sysTime*1E3);var a=pui.formatting.keywords.ed["*HMS"].eb.replace(/\B/g,pui.appJob.timeSeparator);return b.format(a,"en_US")}else{b=new Date;return(b.getHours()<10?"0":"")+b.getHours()+":"+(b.getMinutes()<10?"0":"")+b.getMinutes()+":"+(b.getSeconds()<10?"0":"")+b.getSeconds()}}};
|
|
1857
|
-
window.currentUser=function(){return Fb()?"UUUUUUUUUU":pui.appJob==null||pui.appJob.user==null?"":pui.appJob.user};window.currentFormatNames=bd;window.getQueryStringParms=Cc;window.setCursor=function(b,a){if(arguments.length==1){var c=Db(b);if(c)if(R=="genie"){if(c.B){pui.response.crow=c.B.row;pui.response.ccol=c.B.col}}else c.kf&&c.oe&&pui.Td(null,c)}if(arguments.length==2)if(R=="genie"){pui.response.crow=b;pui.response.ccol=a}else{pui.r.row=b;pui.r.column=a}};window.getTarget=
|
|
1858
|
+
window.currentUser=function(){return Fb()?"UUUUUUUUUU":pui.appJob==null||pui.appJob.user==null?"":pui.appJob.user};window.currentFormatNames=bd;window.getQueryStringParms=Cc;window.setCursor=function(b,a){if(arguments.length==1){var c=Db(b);if(c)if(R=="genie"){if(c.B){pui.response.crow=c.B.row;pui.response.ccol=c.B.col}}else c.kf&&c.oe&&pui.Td(null,c)}if(arguments.length==2)if(R=="genie"){pui.response.crow=b;pui.response.ccol=a}else{pui.r.row=b;pui.r.column=a}};window.getTarget=wb;
|
|
1858
1859
|
window.inDesignMode=Fb;window.loadPCCommandApplet=ed;window.runPCCommand=dd;window.copyToClipboard=function(b){var a=document.getElementById("PCCommandApplet");if(a)a.copyToClipboard(b);else{pui.mr=b;ed("copyToClipboardCb")}};window.pui.UTF8=pui.ci;window.pui.UTF8.encode=pui.ci.encode;window.pui.UTF8.decode=pui.ci.decode;window.$=la();window.id=window.id;window.pui=pui;window.pui.locales=pui.locales;window.pui.formatting=pui.formatting;window.pui.formatting.leftPad=pui.formatting.leftPad;window.pui.formatting.Date=pui.formatting.Date;window.pui.formatting.Date.y2k=pui.formatting.Date.kz;window.pui.formatting.Date.getSuffix=pui.formatting.Date.getSuffix;window.pui.formatting.Date.getMonthNum=pui.formatting.Date.Iw;window.pui.formatting.Date.isMidnight=pui.formatting.Date.hx;
|
|
1859
1860
|
window.getSystemName=function(){return Fb()?"SSSSSSSS":pui.appJob==null||pui.appJob.sysName==null?"":pui.appJob.sysName};function Ie(b){var a={};switch(b){case "runtimeMsg":a.closeMessage="This will end your session.";a["no connection message"]="Unable to reach server. Check your connection and try again.";a["upload file limit"]="Limit of &1 file(s) exceeded.";a["upload size limit"]="Limit of &1MB per file exceeded";a["upload no files"]="No files selected.";a["upload duplicate file"]="Duplicate files selected.";a["upload file exists"]="One or more files already exist on the file system.";a["upload prevented"]="Operation prevented by exit program.";
|
|
1860
1861
|
a["upload input limit"]="Total input size limit exceeded.";a["upload no session"]="Not connected to a valid session.";a["upload timeout"]="Transaction timed out.";a["upload invalid response"]="The server response is missing or invalid.";a["upload cancelled"]="Upload canceled.";a["close browser text"]="To complete the log off process, please close your browser window.";a["session ended text"]="Your session has ended.";a["outside ucs2"]="Characters are outside of UCS-2 range.";a["invalid number"]="&1 is not a valid number.";
|