profoundjs 7.12.0 → 7.13.0
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/css/logic.css +8 -1
- package/htdocs/profoundui/proddata/css/profoundai.css +2 -0
- package/htdocs/profoundui/proddata/js/designer.js +1737 -1734
- package/htdocs/profoundui/proddata/js/key_management.js +0 -1
- package/htdocs/profoundui/proddata/js/profoundai.js +2 -2
- package/htdocs/profoundui/proddata/js/rich-display-react-component.js +0 -1
- package/htdocs/profoundui/proddata/js/rich-display-vue-component.js +0 -1
- package/htdocs/profoundui/proddata/js/runtime.js +136 -135
- package/package.json +2 -2
- package/profound.jse +1 -1
- package/setup/pjsdist.savf +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
function la(){return function(b){return b}}function oa(){return function(){}}function ya(b){return function(){return b}}var Aa,P="dspf",Da="dspfDesigner0",Fa="OFF";var Ha=0,
|
|
1
|
+
function la(){return function(b){return b}}function oa(){return function(){}}function ya(b){return function(){return b}}var Aa,P="dspf",Da="dspfDesigner0",Fa="OFF";var Ha=0,Ia=-20,Ma=[],Ua=[];P=="genie"&&window.parent==window&&window.history.forward(1);window.pui={};var bb=navigator.userAgent.toLowerCase();pui.is_edge=bb.indexOf("edg/")!=-1;pui.is_ie=false;pui.is_opera=bb.indexOf("opera")!=-1||bb.indexOf("opr/")!=-1;pui.is_chrome=!pui.is_edge&&bb.indexOf("chrome")!=-1;pui.is_safari=!pui.is_edge&&!pui.is_chrome&&bb.indexOf("safari")!=-1;pui.is_firefox=bb.indexOf("firefox")!=-1;pui.is_android=bb.indexOf("android")!=-1;pui.is_quirksmode=document.compatMode=="BackCompat";
|
|
2
2
|
pui.is_ios=bb.indexOf("iphone")!=-1||bb.indexOf("ipad")!=-1||bb.indexOf("ipod")!=-1;var hb,ib,lb,mb;hb=/trident\/([0-9]{1,}[.0-9]{0,})/;mb=hb.exec(bb);if(mb!=null)ib=parseFloat(mb[1]);if(!pui.is_opera){hb=/msie ([0-9]{1,}[.0-9]{0,})/;mb=hb.exec(bb);if(mb!=null)lb=parseFloat(mb[1])}if(ib||lb){pui.is_ie=true;pui.ie_mode=lb||ib+4;if(pui.ie_mode<11)pui.is_old_ie=true;pui.ie_version=ib?ib+4:lb}pui.secLevel=0;pui.Ic=null;pui.vl=null;pui.wl=null;pui.defaultDateFormat="MM/DD/YY";
|
|
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.Yz={};pui.Gf={};pui.toolbox={};pui.toolbox.add=oa();pui["field exit key"]=107;pui["field exit minus key"]=109;pui["no connection status"]=false;pui["client side timeout"]=true;
|
|
4
4
|
pui.Bq={"*ISO":1,"*USA":2,"*EUR":3,"*JIS":4,"*MDY":5,"*DMY":6,"*YMD":7,"*JUL":8,"*JOB":10};pui.Cq={"/":1,"-":2,".":3,",":4," ":5,"*BLANK":5,"*JOB":7};pui.Dq={"*ISO":1,"*USA":2,"*EUR":3,"*JIS":4,"*HMS":9};pui.Eq={".":3,",":4," ":5,"*BLANK":5,":":6,"*JOB":7};
|
|
5
5
|
pui.CA=["abstract","arguments","await","boolean","break","byte","case","catch","char","class","const","continue","debugger","default","delete","do","double","else","enum","eval","export","extends","false","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","let","long","native","new","null","package","private","protected","public","return","short","static","super","switch","synchronized","this","throw","throws","transient","true","try",
|
|
6
6
|
"typeof","var","void","volatile","while","with","yield"];pui.fa=false;pui.Iz=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.Up=0;pui["session timeout retries"]=0;pui.Cz=0;pui.dj=false;pui.wz="profoundjs.com";pui.nz="http://www.w3.org/2000/svg";pui.zp={};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;
|
|
7
|
-
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;pui.wf={tA:{},IA:{},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 ob=location.pathname.match(/\/([^\/]+)\/?$/i);if(ob&&ob[1].toLowerCase()==="viewdesigner")pui.viewdesigner=true;else if(ob&&ob[1].toLowerCase()==="nodedesigner")pui.nodedesigner=true}pui.Nn=false;window.pui||(window.pui={});window.pui.baseVersion="6";window.pui.fixPackVersion="
|
|
7
|
+
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;pui.wf={tA:{},IA:{},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 ob=location.pathname.match(/\/([^\/]+)\/?$/i);if(ob&&ob[1].toLowerCase()==="viewdesigner")pui.viewdesigner=true;else if(ob&&ob[1].toLowerCase()==="nodedesigner")pui.nodedesigner=true}pui.Nn=false;window.pui||(window.pui={});window.pui.baseVersion="6";window.pui.fixPackVersion="29.0";window.pui.version=window.pui.baseVersion+"."+window.pui.fixPackVersion;function ub(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 vb(b){b.preventDefault();b.stopPropagation()}pui.Ee=function(b){vb(b);return false};function wb(b){for(var a=Array(256),c=0;c<=255;c++)a[c]=c;xb(a,b)}
|
|
8
8
|
function Ab(b){var a;if(typeof b=="string")b=Bb(b);if(b==null)return-1;if(b.tagName!="INPUT"||!pui.Ui(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}
|
|
9
9
|
function Eb(){if(pui.ide&&pui.ide.designerId)return true;if(Ib==null)return false;if(Ib.designer==null)return false;return true}
|
|
10
|
-
function Kb(b,a){var c,e="",f="",h,g=false;if(b.xf()!=200){c="HTTP "+b.xf();e=b.Bs()+"."}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){
|
|
10
|
+
function Kb(b,a){var c,e="",f="",h,g=false;if(b.xf()!=200){c="HTTP "+b.xf();e=b.Bs()+"."}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){Ua.push({Fl:a,id:c,text:e,um:f});return false}else return g==true?b.yc():h.response}
|
|
11
11
|
pui.Cr=function(b,a,c){function e(h,g){var l=Lb(b.style[h]),o=l.lastIndexOf(")");if(o!=-1){l=l.substr(0,o);l+=g+"px)";c.style[h]=l}}var f=true;if(c==null){f=false;c=document.createElement("div");c.style.position="absolute";c.style.borderStyle="none";c.style.backgroundColor="transparent"}c.innerHTML='<label title="'+b.title+'" for="'+b.id+'">'+a+"</label>";c.className="label-for";a=Lb(b.className.split(" ")[0]);a!=""&&pui.Q(c,"label-for-"+a);c.style.zIndex=b.currentStyle?b.currentStyle.zIndex:window.getComputedStyle?
|
|
12
12
|
document.defaultView.getComputedStyle(b,null).getPropertyValue("z-index"):20;if(b.style.top!="")c.style.top=b.style.top;else if(b.style.bottom!="")c.style.bottom=b.style.bottom;c.style.zIndex=b.style.zIndex;c.style.visibility=b.style.visibility;c.style.filter=b.style.filter;c.style.opacity=b.style.opacity;c.style.color=b.style.color;c.style.fontFamily=b.style.fontFamily;c.style.fontSize=b.style.fontSize;c.style.fontStyle=b.style.fontStyle;c.style.fontWeight=b.style.fontWeight;c.style.backgroundColor=
|
|
13
13
|
b.style.backgroundColor;if(!f){c.style.cursor=b.style.cursor?b.style.cursor:"pointer";c.Vs=true;b.Ld!=null&&b.parentNode.removeChild(b.Ld);b.Ld=c;b.xc=[];b.xc.push(c);b.parentNode!=null&&b.parentNode.appendChild(c)}a=b.offsetWidth;if(a<20)a=20;if(b.style.left!="")if(b.style.left.indexOf("calc")!=-1)e("left"," + "+a);else{f=pui.Cs(b.style.left);c.style.left=f[1]=="px"?f[0]+a+"px":"calc("+b.style.left+" + "+a+"px)"}else if(b.style.right!=""){c.style.left="";a=c.getBoundingClientRect().width;if(a<10)a=
|
|
@@ -53,10 +53,10 @@ pui.Ds=function(){var b=0;if(typeof window.pageYOffset=="number")b=window.pageYO
|
|
|
53
53
|
pui.zs=function(){var b=null,a=null;if(typeof pui["sql date format"]=="string")b=pui.Bq[pui["sql date format"].toUpperCase()];if(b==null)b=pui.Bq["*ISO"];if(typeof pui["sql date separator"]=="string")a=pui.Cq[pui["sql date separator"].toUpperCase()];if(a==null)a=pui.Cq["/"];return{Ii:b,Jj:a}};
|
|
54
54
|
pui.As=function(){var b=null,a=null;if(typeof pui["sql time format"]=="string")b=pui.Dq[pui["sql time format"].toUpperCase()];if(b==null)b=pui.Dq["*ISO"];if(typeof pui["sql time separator"]=="string")a=pui.Eq[pui["sql time separator"].toUpperCase()];if(a==null)a=pui.Eq[":"];return{Ii:b,Jj:a}};pui.rs=function(){var b=location.href.split("://"),a="",c="";if(b.length>1){a=b[0]+"://";b.splice(0,1);c=b.join("://")}else c=location.href;return c=a+c.split("/")[0]};
|
|
55
55
|
pui.Ao=function(b){var a=document.getElementsByTagName("head")[0];if(a==null)return null;var c=pui.rs();a=a.getElementsByTagName("link");for(var e=0;e<a.length;e++){var f=a[e];if(f.href==b)return f;if(f.href==c+b)return f}return null};pui.Co=function(b){var a=document.getElementsByTagName("head")[0];if(a==null)return null;var c=pui.rs();a=a.getElementsByTagName("script");for(var e=0;e<a.length;e++){var f=a[e];if(f.src==b)return f;if(f.src==c+b)return f}return null};
|
|
56
|
-
pui.ha=function(b){if(typeof b!="string")return b instanceof Array?b:[];if(b=="")return[];var a;if(b.substr(0,1)=="["&&b.substr(b.length-1,1)=="]")try{a=eval(b)}catch(c){}if(a==null)a=b.split(",");return a};
|
|
57
|
-
pui.Ui=function(b){if(b.tagName=="INPUT")if(b.type==null||b.type==""||b.type=="text"||pui.gl(b.type)||b.type=="password")return true;return false};
|
|
58
|
-
pui.df=function(b){if(!Eb()&&(!pui.dj||pui.ba||pui.appJob.auth)&&typeof b=="string"&&b.search("AUTH=")==-1){b+=b.search(/\?/)==-1?"?":"&";b+="AUTH="+encodeURIComponent(pui.ba?pui.ba:pui.appJob.auth)}return b};pui.validateEmail=function(b){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(b)};
|
|
59
|
-
pui.Kb=function(b){return b!=null&&typeof b=="object"&&typeof b.translations=="object"&&b.translations!=null&&typeof b.translations.length=="number"};pui.$b=function(b){return b!=null&&typeof b=="object"&&typeof b.routine=="string"};pui.dA=function(b){return b!=null&&typeof b=="object"&&b.join==true};
|
|
56
|
+
pui.ha=function(b){if(typeof b!="string")return b instanceof Array?b:[];if(b=="")return[];var a;if(b.substr(0,1)=="["&&b.substr(b.length-1,1)=="]")try{definedPhrases=["Image","String","Object","Array","Number","Boolean","Date","Function","RegExp","Error"];phrase=b.substring(1,b.length-1);a=definedPhrases.includes(phrase)?Array(b):eval(b)}catch(c){}if(a==null)a=b.split(",");return a};
|
|
57
|
+
pui.gl=function(b){switch(b){case "number":case "date":case "datetime":case "time":case "email":case "url":case "month":case "tel":case "color":case "datetime-local":case "search":case "week":return true;default:return false}};pui.Ui=function(b){if(b.tagName=="INPUT")if(b.type==null||b.type==""||b.type=="text"||pui.gl(b.type)||b.type=="password")return true;return false};
|
|
58
|
+
pui.ix=function(b){var a=b.keyCode,c=pui["field exit key"],e=pui["field exit minus key"];return(a==c||a==e)&&(!b.shiftKey||c==16)&&(!b.ctrlKey||c==17)?true:false};pui.Is=function(b){b=b.parentNode;return b!=null&&(!pui.is_old_ie||b.nodeName!="#document-fragment")};pui.df=function(b){if(!Eb()&&(!pui.dj||pui.ba||pui.appJob.auth)&&typeof b=="string"&&b.search("AUTH=")==-1){b+=b.search(/\?/)==-1?"?":"&";b+="AUTH="+encodeURIComponent(pui.ba?pui.ba:pui.appJob.auth)}return b};pui.validateEmail=function(b){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(b)};
|
|
59
|
+
pui.p=function(b){return b!=null&&typeof b=="object"&&typeof b.fieldName=="string"};pui.Kb=function(b){return b!=null&&typeof b=="object"&&typeof b.translations=="object"&&b.translations!=null&&typeof b.translations.length=="number"};pui.$b=function(b){return b!=null&&typeof b=="object"&&typeof b.routine=="string"};pui.dA=function(b){return b!=null&&typeof b=="object"&&b.join==true};
|
|
60
60
|
pui.az=function(b,a,c){function e(l){h=setTimeout(function(){h=null;a(l)},c)}function f(){clearTimeout(h);h=null}if(b&&b.addEventListener)if(typeof a=="function"){if(typeof c!="number")c=475;var h;try{b.addEventListener("touchstart",e,false);b.addEventListener("touchend",f,false)}catch(g){}}};pui.Uk=function(b){b.checked?b.setAttribute("checked","checked"):b.removeAttribute("checked")};
|
|
61
61
|
pui.Yh=function(b){b=""+b;b=b.replace(/&/g,"&");b=b.replace(/</g,"<");b=b.replace(/>/g,">");b=b.replace(/"/g,""");b=b.replace(/\u001a/g,"□");return b=b.replace(/\u000c/g,"□")};pui.mg=function(b){var a=false;try{a=typeof b.Atrium!="undefined"&&typeof b.Atrium.api!="undefined"}catch(c){}return a};pui.Wh=function(b){var a=false;try{if(b.location.host!=null)a=true}catch(c){}return a};
|
|
62
62
|
pui.Cg=function(){try{return localStorage!=null&&typeof window.localStorage!="undefined"?true:false}catch(b){return false}};pui.Vo=function(){try{return sessionStorage!=null&&typeof window.sessionStorage!="undefined"?true:false}catch(b){return false}};
|
|
@@ -136,7 +136,7 @@ a+'" r:id="rId'+(c[h].by+1)+'" />'}f+="</hyperlinks>"}f+="</worksheet>";return f
|
|
|
136
136
|
function zc(b,a,c,e,f){var h=e.match(/\.(jpe?g|gif|png|tiff?)(\?.*)?(#.*)?$/i);if(h==null)console.log("Unsupported image type in URI:",e);else{h=h[1].toLowerCase();if(h=="jpeg")h="jpg";else if(h=="tif")h="tiff";for(var g=-1,l=0;l<b.ta.length;l++)if(b.ta[l].uri==e){g=l;break}if(g<0){g="image"+b.kt+"."+h;b.kt++;b.fs[h]="image/"+h;b.ta.push({name:g,uri:e});g=b.ta.length-1}b.anchors.push({row:a,col:c,rel:g,top:f.top,left:f.top,width:f.width,height:f.height})}}
|
|
137
137
|
pui.tq.prototype.$u=function(){this.fo++;this.Jc&&typeof this.Jc.hm=="function"&&this.Jc.hm(pui.getLanguageText("runtimeMsg","downloading x",[Math.round(100*(this.fo/this.ta.length))+"%"]));if(!(this.fo<this.ta.length)){for(var b=0;b<this.ta.length;b++){if(this.ta[b].Xf.status==200)this.ta[b].Ms=this.ta[b].Xf.response;this.ta[b].Xf=null;try{delete this.ta[b].Xf}catch(a){}}this.Wv()}};
|
|
138
138
|
pui.Oz=function(b,a){var c,e=b.library||"",f=b.file||"",h=b.customSql||"",g=b.connection||"";if(P=="genie")c=Wb("PUI0009101.PGM");if(P=="dspf")c=Wb("PUI0009101.PGM",null,true);c=new pui.Ajax(c);c.async=true;c.method="post";c.postData="file="+encodeURIComponent(f);c.postData+="&library="+encodeURIComponent(e);c.postData+="&customSql="+encodeURIComponent(h);c.postData+="&connection="+encodeURIComponent(g);if(pui.isCloud)c.postData+="&workspace_id="+pui.cloud.ws.id;if(pui.ba)c.postData+="&AUTH="+pui.ba;
|
|
139
|
-
else if(P=="genie")c.postData+="&AUTH="+pui.appJob.auth;c.postData+="&context="+P;c.suppressAlert=true;c.onready=a;c.send()};pui.pf=function(b){var a=null;if(
|
|
139
|
+
else if(P=="genie")c.postData+="&AUTH="+pui.appJob.auth;c.postData+="&context="+P;c.suppressAlert=true;c.onready=a;c.send()};pui.pf=function(b){var a=null;if(Ua.length>0){a=Ua.length-1;a={operation:Ua[a].Fl,id:Ua[a].id,text:Ua[a].text,text2:Ua[a].um}}try{pui.temporary_property=a;eval("var response = { success: arguments[1], id: arguments[2], error: pui.temporary_property };");var c=eval(b);typeof c=="function"&&c()}catch(e){pui.Ea(e,"OndbLoad Error:\n");return false}return true};
|
|
140
140
|
pui.Ea=function(b,a){var c;if(pui["alert script errors"]===false){if(window.console&&window.console.error){if(b.stack){c=b.stack.split("\n");c[0]!=b.toString()&&c.splice(0,0,b.toString());c=c.join("\n")}else c=b.toString();if(a!=null)c=a+c;console.error(c)}}else{c=b.message;if(a!=null)c=a+c;pui.alert(c)}};
|
|
141
141
|
pui.qA=function(){["pui-material-icons","pui-fa-icons","blueprint-defaults","office-copy-defaults"].forEach(function(b){var a=document.createElement("div");a.innerText="face";a.className=b;a.style.visibility="hidden";a.style.left="-1000px";a.style.position="absolute";document.body.appendChild(a)})};
|
|
142
142
|
pui.Fz=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,
|
|
@@ -377,7 +377,7 @@ if(c.tagName=="TEXTAREA")e=c.value;else if(c.tagName=="INPUT"){var f=c.Ed;if(a&&
|
|
|
377
377
|
if(c.U!=null)e=String(c.value);if(c.M!=null){e="";if(c.M.Kd&&c.M.Dh!=null)e=c.M.Dh;else if(!c.M.Kd&&c.M.Ch!=null)e=c.M.Ch}if(c.pui&&c.pui.widget&&typeof c.pui.widget.getPropertyValue==="function")e=c.pui.widget.getPropertyValue("value");for(e=e.replace(/ /g," ");e.indexOf(String.fromCharCode(160))!=-1;)e=e.replace(String.fromCharCode(160)," ");if(e==c.emptyText)e="";return e}function Wc(b,a){return Lb(Vc(b,a))}function Bb(b){return document.getElementById(b)}
|
|
378
378
|
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!=
|
|
379
379
|
null&&a==c.checkedValue?true:false;else{P=="genie"&&a!=c.value&&pui.F.iA(c);c.value=a;if(c.Ed!=null)c.Ed.value=a}if(P=="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.mc!=null)pui.kf[c.mc]=true;if(e!=null){e.hide();e.ja=true;pui.da(c,e.ug())}}if(P=="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}}
|
|
380
|
-
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.wl+
|
|
380
|
+
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.wl+Ia+"px";h.style.left=a*pui.vl+"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.pt())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=
|
|
381
381
|
"55px";break;case "img":h.src=e;break}if(f!=null)h.id=f;if(c=="input"){document.forms.main.appendChild(h);T(h,"keydown",wb)}else{P=="genie"&&document.getElementById(Da).appendChild(h);P=="dspf"&&pui.runtimeContainer.appendChild(h)}return h}function vb(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={};
|
|
382
382
|
function Ub(b){if(typeof b!=="string")return b;for(;b.charAt(0)==" ";)b=b.replace(b.charAt(0),"");return b}function Pb(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=Bb(b);b!=null&&pui.Dp(b)};
|
|
383
383
|
function Yb(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=Bb(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}
|
|
@@ -439,7 +439,7 @@ var g=1,l=false;if(pui["use pc listener"])g=1;if(window.HTTPS!=null&&window.HTTP
|
|
|
439
439
|
0){var o=document.getElementById("PCCommandApplet");if(!o){pui.qr=b;ed("runCommandCb");return}}var n=[],r=0;n=typeof b=="string"?[{command:b,wait:false}]:b;b=parseInt(pui["pc listener port"],10);if(isNaN(b))b="80";var p="http://localhost:"+b+"/",t="",s,w,A={url:Wb("PUI0009117.pgm"),method:"post",params:{auth:pui.appJob&&pui.appJob.auth?pui.appJob.auth:""},async:true};a()}window.runCommandCb=function(){dd(pui.qr);pui.qr=null};pui.runPCCommand=dd;
|
|
440
440
|
function Vb(b,a){if(a!=null&&typeof a!="string"&&a==true)setTimeout(function(){Vb(b)},0);else if(P=="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)}}
|
|
441
441
|
pui.isServerBusy=function(){if(typeof P=="undefined")return false;if(P=="dspf"&&pui.Nb===false||P=="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};
|
|
442
|
-
pui.showLastError=function(){if(
|
|
442
|
+
pui.showLastError=function(){if(Ua.length==0)alert("No errors have been reported.");else{var b=Ua.length-1;alert("Operation: "+Ua[b].Fl+"\nId: "+Ua[b].id+"\n\nMessage: "+Ua[b].text+"\n"+Ua[b].um)}};
|
|
443
443
|
pui.editCode=function(b,a){function c(R,N){var M=["","","","nn/n","nn/nn","nn/nn/n","nn/nn/nn","nnn/nn/nn","nn/nn/nnnn","nnn/nn/nnnn"];if(l.dateEdit==="*ymd"){M[8]="nnnn/nn/nn";M[9]="nnnnn/nn/nn"}M=M[E];R=String(R);R=R.replace(".","");R=R.replace(",","");R=R.replace("-","");R="0000000000"+R;R=R.substr(R.length-N);var W="/";if(l.dateEditSeparator!=null)W=l.dateEditSeparator;for(var Q=false,ha=0,Y="",X=0;X<M.length;X++){var y=M.substr(X,1),ea=M.substr(X+1,1);if(y==="/"||ea==="/")Q=true;if(y==="/")y=
|
|
444
444
|
W;else{y=R.substr(ha,1);ha+=1;if(y==="0")Q||(y=" ");else Q=true}Y+=y}return Y}function e(R,N,M){for(R+="";R.length<N;)R+=M;return R}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===
|
|
445
445
|
"string")o=pui.appJob.decimalFormat;var w=o==="I"||o==="J",A=o==="J";if(l.decimalEdit!=null){w=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===
|
|
@@ -500,27 +500,27 @@ b.b.appendChild(b.J)}pui.Yf.prototype.handleEvent=function(b){switch(b.type){cas
|
|
|
500
500
|
true){W=0;r()}else if(wa==13){if((wa=F.style.display=="block")&&F.children.length==1&&F.children[0].textContent.toUpperCase()===fa.currentTarget.value.toUpperCase()){W=0;r();n();return true}if(wa&&W!=null){r();n();fa.cancelBubble=true;fa.returnValue=false;fa.preventDefault&&fa.preventDefault();fa.stopPropagation&&fa.stopPropagation();return false}else{n();if(wa){fa.cancelBubble=true;fa.returnValue=false;fa.preventDefault&&fa.preventDefault();fa.stopPropagation&&fa.stopPropagation();return false}}}}
|
|
501
501
|
function e(fa){qa=false;fa=fa||window.event;fa=fa.keyCode;if(!(ga.readOnly||ga.disabled))if(Lb(ga.value)==""){if(Y)Y.value="";n()}else if(fa==8||fa>=46&&fa<=90||fa>=96&&fa<=111||fa>=186&&fa<=222||(window.zz!=null||typeof window.orientation!=="undefined")&&(fa==0||fa==229))if(ga.value.replace(/ /g,"")!="")if(kb&&d)g(Pb(ga.value.toUpperCase()));else{clearTimeout(ha);w=false;ha=setTimeout(function(){l(Pb(ga.value))},sb)}}function f(){if(!qa)if(Lb(ga.value)==""){if(Y)Y.value="";n()}else if(ga.value.replace(/ /g,
|
|
502
502
|
"")!="")if(kb&&d)g(Pb(ga.value.toUpperCase()));else{w=false;l(Pb(ga.value))}}function h(fa,wa){if(W!=null&&F.childNodes!=null&&F.childNodes[W]!=null){F.childNodes[W].className=F.childNodes[W].className.replace(" autocomplete-selected","");F.childNodes[W].className=F.childNodes[W].className.replace("autocomplete-selected","")}if(fa!=null){var pa=F.childNodes[fa];pa.className+=" autocomplete-selected";if(wa==true&&typeof pa.scrollIntoView==="function"){var fb=0;if(typeof window.pageYOffset=="number")fb=
|
|
503
|
-
window.pageYOffset;else if(document.body&&document.body.scrollTop)fb=document.body.scrollTop;else if(document.documentElement&&document.documentElement.scrollTop)fb=document.documentElement.scrollTop;var
|
|
504
|
-
if(Qa.parentNode!=null&&Qa.parentNode.grid!=null){nb+=Qa.parentNode.offsetHeight;nb+=Qa.parentNode.parentNode.offsetHeight}if(nb+pa.offsetHeight>
|
|
505
|
-
field2:
|
|
503
|
+
window.pageYOffset;else if(document.body&&document.body.scrollTop)fb=document.body.scrollTop;else if(document.documentElement&&document.documentElement.scrollTop)fb=document.documentElement.scrollTop;var Va=0;if(self.innerHeight)Va=self.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)Va=document.documentElement.clientHeight;else if(document.body)Va=document.body.clientHeight;Va=fb+Va;var nb=pa.offsetTop+pa.parentNode.offsetTop,Qa=pa.parentNode.parentNode;nb+=Qa.offsetTop;
|
|
504
|
+
if(Qa.parentNode!=null&&Qa.parentNode.grid!=null){nb+=Qa.parentNode.offsetHeight;nb+=Qa.parentNode.parentNode.offsetHeight}if(nb+pa.offsetHeight>Va||nb<fb){y=true;pa.scrollIntoView(true);setTimeout(function(){y=false},1)}if(aa&&pa.offsetTop>ma&&!y){y=true;pa.scrollIntoView(true);setTimeout(function(){y=false},1)}}}W=fa}function g(fa){if(Y)Y.value="";if(fa!=""){pb({results:[{field1:""}]});Q=[];for(var wa=0;wa<Wa.length;wa++)if(b.gw)Wa[wa][0].toUpperCase().indexOf(fa)!=-1&&Q.push({field1:Wa[wa][0],
|
|
505
|
+
field2:Wa[wa][1]});else Wa[wa][0].toUpperCase().indexOf(fa)==0&&Q.push({field1:Wa[wa][0],field2:Wa[wa][1]});if(Q.length==0)n();else if(Y&&Q.length==1&&ga.value.toUpperCase()==Q[0][M].toUpperCase()){Y.value=p(Q[0],Pa);n()}else o()}}function l(fa){if(fa=="")n();else if(!(cb&&cb(Ga,fa)==false)){X=null;fa=encodeURIComponent(yb)+"="+encodeURIComponent(fa);if(Xa!=null)fa+="&limit="+Xa;if((Xa==null||Xa=="")&&pui["Default Auto Complete Max Choices"]!=null)fa+="&limit="+encodeURIComponent(pui["Default Auto Complete Max Choices"]);
|
|
506
506
|
if(Ga)for(var wa in Ga)if(!(Ga[wa]==null&&wa==="AUTH")){fa+="&";fa+=encodeURIComponent(wa)+"="+encodeURIComponent(Ga[wa])}if(pui["read db driven data as ebcdic"]!==true)fa+="&UTF8=Y";if(Y)Ha+=1;wa=Ga.AUTH?new pui.Ajax(pui.df(ua)):new pui.Ajax(ua);wa.method="post";wa.async=true;wa.suppressAlert=true;wa.postData=fa;wa.sequence=ia;wa.onready=function(pa){if(Y)Ha-=1;if(pa.sequence!=null){if(pa.sequence<ia)return;ia++}if(pa=Kb(pa,"Generate Auto-Complete Suggestions"))if(Lb(ga.value)=="")n();else if(w)n();
|
|
507
507
|
else{pa=eval(pa);Q=pa.results;if(P==="dspf"&&typeof pa.valueField==="string"){Pa=pa.valueField;Y={value:""};ga.Ed=Y}if((Pa==null||M==null)&&Q!=null&&Q.length>0)for(var fb in Q[0]){if(Pa==null)Pa=fb;if(M==null)M=fb}if(Y&&Q!=null&&Q.length==1&&ga.value.toUpperCase()==Q[0][M].toUpperCase())Y.value=p(Q[0],Pa);else if(Y)Y.value="";if(Q!=null&&Q.length>0){pb&&pb(pa);o()}else n();da&&pui.pf(da,true,ga.id)}else da&&pui.pf(da,false,ga.id)};wa.send()}}function o(){var fa=ga.offsetWidth;if(!pui.is_old_ie||!pui.is_quirksmode)fa-=
|
|
508
|
-
2;if(db==null||db<fa)db=fa;F.style.width=db+"px";fa=Q;if(b.Nr){fa=[];for(var wa=false,pa=0;pa<b.Nr.length;pa++){var fb=ga.value,
|
|
508
|
+
2;if(db==null||db<fa)db=fa;F.style.width=db+"px";fa=Q;if(b.Nr){fa=[];for(var wa=false,pa=0;pa<b.Nr.length;pa++){var fb=ga.value,Va=kb[pa];if(fb!==null&&Va!==null){Va=Va.substr(0,fb.length);fb=fb.toUpperCase();Va=Va.toUpperCase()}if(fb==Va){fa.push(b.Nr[pa]);wa=true}else if(wa)break}}if(!qb){var nb;for(pa in fa[0]){nb=pa;break}qb='<div class="autocomplete-item">('+nb+")</div>"}F.innerHTML="";for(pa=0;pa<fa.length;pa++){nb=qb;for(var Qa in fa[pa])nb=nb.replace("("+Qa+")",fa[pa][Qa]);F.innerHTML+=nb;
|
|
509
509
|
F.lastChild.setAttribute("recordIndex",String(pa))}for(pa=0;pa<F.childNodes.length;pa++)F.childNodes[pa].addEventListener("mousemove",t,false);F.style.display="block";pa=ga;B=ga.offsetTop;G=ga.offsetLeft;if(ga.parentNode!=null&&ga.parentNode.l){B=ga.parentNode.offsetTop;G=ga.parentNode.offsetLeft;pa=ga.parentNode}Qa=pa.parentNode;if(Qa.parentNode.grid){B+=Qa.offsetTop;G+=Qa.offsetLeft;Qa=Qa.parentNode;B+=Qa.offsetTop;G+=Qa.offsetLeft;Qa=Qa.parentNode}if(Qa.getAttribute("container")=="true"){Qa=pui.layout.vf(Qa);
|
|
510
510
|
B+=Qa.y;G+=Qa.x}if(P=="genie")if(pa.parentNode.layerInfo){B+=pa.parentNode.offsetTop+pa.parentNode.clientTop;G+=pa.parentNode.offsetLeft+pa.parentNode.clientLeft}B+=ga.offsetHeight;B+=ra;G+=gb;pa=pui.Ds();if(B-pa+F.offsetHeight>pui.getWindowSize().height){Qa=B-F.offsetHeight-ga.offsetHeight-3;if(Qa-pa>=0)B=Qa}F.style.top=B+"px";F.style.left=G+"px";if(ea){F.style.height="";aa=false;if(F.clientHeight>ma){F.style.height=String(ma)+"px";aa=true}F.style.overflowY="auto"}if(rb){D.style.top=B+3+"px";D.style.left=
|
|
511
511
|
G-4+"px";D.style.width=db+10+"px";D.style.height=F.offsetHeight+2+"px";E.style.top="0px";E.style.left="0px";E.style.width="6px";if(F.offsetHeight>=6)E.style.height=F.offsetHeight-6+"px";if(F.offsetHeight>=6)R.style.top=F.offsetHeight-6+"px";R.style.left="0px";R.style.height="6px";R.style.width="6px";if(F.offsetHeight>=6)K.style.top=F.offsetHeight-6+"px";K.style.left="6px";K.style.height="6px";K.style.width=db-2+"px";C.style.top="0px";C.style.right="0px";C.style.width="6px";if(F.offsetHeight>=6)C.style.height=
|
|
512
512
|
F.offsetHeight-6+"px";if(F.offsetHeight>=6)N.style.top=F.offsetHeight-6+"px";N.style.right="0px";N.style.height="6px";N.style.width="6px";D.style.display="block"}}function n(){if(F!=null)F.style.display="none";if(rb)D.style.display="none";Q=[];W=null}function r(){if(W!=null){for(var fa in Q[W]){ga.value=Q[W][fa];break}X=Q[W];if(Y!=null)if(Q[W]!=null)Y.value=p(Q[W],Pa);if(Fb)if(pui.$b(b.qt))pui.runLogic(b.qt.routine,ga.o,ga.Yj);else try{var wa=eval(Fb);typeof wa=="function"&&wa(X,ga)}catch(pa){pui.Ea(pa,
|
|
513
513
|
"Onselect error:\n")}}}function p(fa,wa){var pa=fa[wa];if(pa==null)for(var fb in fa)pa=fa[fb];return pa}function t(fa){if(!y){fa=fa||window.event;fa=fa.target||fa.srcElement;var wa=fa.getAttribute("recordIndex");if(wa==""||wa==null){fa=fa.parentNode;wa=fa.getAttribute("recordIndex");if(wa==""||wa==null)return}h(Number(wa))}}function s(fa){if(aa&&na!=null&&F.offsetWidth!=null){var wa=fa.currentTarget.getBoundingClientRect().right-na;if(pui.Bo(fa)>wa)return true}return false}var w=false,A=this,B,G,
|
|
514
|
-
F,D,E,C,K,R,N,M,W=null,Q=[],ha,Y,X,y=false,ea=false,aa=false,na=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 wa=document.createElement("div");wa.style.height="1px";fa.appendChild(wa);wa=wa.offsetWidth;var pa=fa.offsetWidth;fa.parentElement.removeChild(fa);return pa-wa}(),ma=null,sa=false,qa=false,
|
|
515
|
-
qb,sb,Fb,cb,pb,kb,d,
|
|
516
|
-
va!="")if(va==Lb(d[Ba])){ga.value=Lb(kb[Ba]);ta=ga.xr=true}}
|
|
517
|
-
Y;ga.B=null}document.forms.main.appendChild(Y)}if(P=="dspf"){Y={value:""};ga.Ed=Y}}ra=b.cz?b.cz:0;gb=b.rx?b.rx:0;ta=b.zIndex?b.zIndex:1E5;if(typeof b.width!="undefined")db=b.width;if(b.baseParams)Ga=b.baseParams;yb=b.Jx?b.Jx:"query";if(typeof b.nl!="undefined")
|
|
514
|
+
F,D,E,C,K,R,N,M,W=null,Q=[],ha,Y,X,y=false,ea=false,aa=false,na=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 wa=document.createElement("div");wa.style.height="1px";fa.appendChild(wa);wa=wa.offsetWidth;var pa=fa.offsetWidth;fa.parentElement.removeChild(fa);return pa-wa}(),ma=null,sa=false,qa=false,Ka,ga,ua,Pa,ra,gb,ta,db,Ga,yb,Xa,rb,
|
|
515
|
+
qb,sb,Fb,cb,pb,kb,d,Wa,da,ia=0;ua=b.url;Pa=b.valueField;ga=typeof b.iq=="object"?b.iq:document.getElementById(b.iq);ga.setAttribute("autocomplete","off");Ka=b.b?b.b:ga.parentNode;if(P=="genie"){ga.setAttribute("fieldLength",ga.getAttribute("maxLength"));ga.setAttribute("maxLength","133")}if(b.choices&&b.values){ta=false;var va=Lb(ga.value);Wa=[];kb=b.choices;d=b.values;for(var Ba=0;Ba<d.length;Ba++)if(kb[Ba]!=null){Wa[Wa.length]=[];Wa[Wa.length-1][0]=Lb(kb[Ba]);Wa[Wa.length-1][1]=Lb(d[Ba]);if(!ta&&
|
|
516
|
+
va!="")if(va==Lb(d[Ba])){ga.value=Lb(kb[Ba]);ta=ga.xr=true}}Wa.sort(function(fa,wa){return fa[0].toUpperCase()<wa[0].toUpperCase()?-1:1});M="field1";Pa="field2"}if(Pa){if(P=="genie"){ta=ga.getAttribute("name");ga.removeAttribute("name");try{Y=document.createElement('<input name="'+ta+'" />')}catch(Ya){Y=document.createElement("input");Y.name=ta}Y.type="hidden";Y.value=ga.value;Y.tz=ga;if(ga.B!=null){ga.setAttribute("fieldRow",ga.B.row);ga.setAttribute("fieldCol",ga.B.col);ta=ga.B.idx;Y.B=ga.B;pui.response[ta]=
|
|
517
|
+
Y;ga.B=null}document.forms.main.appendChild(Y)}if(P=="dspf"){Y={value:""};ga.Ed=Y}}ra=b.cz?b.cz:0;gb=b.rx?b.rx:0;ta=b.zIndex?b.zIndex:1E5;if(typeof b.width!="undefined")db=b.width;if(b.baseParams)Ga=b.baseParams;yb=b.Jx?b.Jx:"query";if(typeof b.nl!="undefined")Xa=b.nl;rb=typeof b.shadow!="undefined"&&b.shadow==false?false:true;if(typeof b.beforequery=="function")cb=b.beforequery;if(typeof b.onload=="function")pb=b.onload;if(b.onselect!=null)Fb=b.onselect;if(b.rt!=null)da=b.rt;if(typeof b.template!=
|
|
518
518
|
"undefined")qb=b.template;sb=typeof b.typeAheadDelay==="number"?b.typeAheadDelay:200;if(typeof b.bu!="undefined"&&typeof b.maxHeight!="undefined"&&b.maxHeight!=null){ea=b.bu;ma=b.maxHeight}F=document.createElement("div");F.style.display="none";F.style.margin="0px";F.style.padding="0px";F.style.position="absolute";F.style.zIndex=ta;F.className="autocomplete-results "+Lb(ga.id)+"-autocomplete-results";F.addEventListener("mousedown",function(fa){sa=true;setTimeout(function(){ga.focus()},0);if(!s(fa)){r();
|
|
519
|
-
n()}},false);F.addEventListener("mouseup",function(){sa=false},false);
|
|
519
|
+
n()}},false);F.addEventListener("mouseup",function(){sa=false},false);Ka.appendChild(F);if(rb){va="";if(Fa=="ON")va="https://"+HTTP_HOST;va+=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=ta-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("+va+
|
|
520
520
|
"shadow-side.png) repeat-y scroll";D.appendChild(E);R=document.createElement("div");R.style.padding="0px";R.style.margin="0px";R.style.position="absolute";R.style.background="transparent url("+va+"shadow.png) no-repeat scroll 0px -12px";D.appendChild(R);K=document.createElement("div");K.style.padding="0px";K.style.margin="0px";K.style.position="absolute";K.style.background="transparent url("+va+"shadow.png) repeat-x scroll 0px -36px";D.appendChild(K);C=document.createElement("div");C.style.padding=
|
|
521
|
-
"0px";C.style.margin="0px";C.style.position="absolute";C.style.background="transparent url("+va+"shadow-side.png) repeat-y scroll -6px";D.appendChild(C);N=document.createElement("div");N.style.padding="0px";N.style.margin="0px";N.style.position="absolute";N.style.background="transparent url("+va+"shadow.png) no-repeat scroll 0px -6px";D.appendChild(N);
|
|
521
|
+
"0px";C.style.margin="0px";C.style.position="absolute";C.style.background="transparent url("+va+"shadow-side.png) repeat-y scroll -6px";D.appendChild(C);N=document.createElement("div");N.style.padding="0px";N.style.margin="0px";N.style.position="absolute";N.style.background="transparent url("+va+"shadow.png) no-repeat scroll 0px -6px";D.appendChild(N);Ka.appendChild(D)}ga.addEventListener("keyup",e,false);ga.addEventListener("keydown",c,false);ga.addEventListener("blur",a,false);ga.addEventListener("input",
|
|
522
522
|
f,false);if(!pui.ef||pui.ef.length==0){window.addEventListener("resize",md,false);pui.ef=[]}pui.ef.push(A);pui.Wf.push(A);this.iu=function(fa){qb=fa};this.Ti=function(){return F.style.display=="block"};this.setWidth=function(fa){db=fa};this.Wz=function(){return X};this.destroy=function(){ga.removeEventListener("keyup",e);ga.removeEventListener("keydown",c);ga.removeEventListener("blur",a);ga.removeEventListener("input",f);for(var fa=pui.ef.length-1;fa>=0;fa--)if(pui.ef[fa]===this){pui.ef.splice(fa,
|
|
523
|
-
1);break}pui.ef.length==0&&window.removeEventListener("resize",md);A=da=
|
|
523
|
+
1);break}pui.ef.length==0&&window.removeEventListener("resize",md);A=da=Wa=d=kb=pb=cb=Fb=rb=Ga=ga=Ka=X=Y=ha=Q=W=M=N=R=K=C=E=D=F=null};this.Gu=function(fa){ua=fa};this.resize=function(){this.Ti()&&o()}}
|
|
524
524
|
function pd(b,a,c){var e=$b(b["choices database file"],a,c),f=$b(b["choice options field"],a,c),h=pui.qh(f),g=$b(b["choices url"],a,c);f=$b(b["use choices url for reverse lookup"],a,c);f=g!=""&&f!=null&&(f=="true"||f==true)?true:false;var l=$b(b["choice values field"],a,c),o=$b(b["max choices"],a,c),n=$b(b["contains match"])=="true",r=$b(b.choices,a,c);r=pui.ha(r);if(r.length==0)r=[""];var p=$b(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==
|
|
525
525
|
0)p=[""];var s=Lb($b(b["results template"],a,c));if(s=="")s=null;if(e!=""&&h[0]!=""||g!=""||r.length>0&&r[0]!=""&&p[0]!=""){var w=$b(b.onselect,a,c),A;if(w!=null&&w!=""){A=w;w=A.indexOf("(");if(w!=-1)if(A.substr(w+1,1)==")")A=A.substr(0,w)}w=$b(b.ondbload,a,c);if(typeof w!="string"||w=="")w=null;var B={};if(pui.isCloud)B.workspace_id=pui.cloud.ws.id;if(pui.ba)B.AUTH=pui.ba;else if(g==""||!pui.dj){B.AUTH=pui.appJob.auth;if(typeof pui.vId!=="undefined")B.VID=pui.vId}if(g==""&&r[0]==""&&p[0]==""){n=
|
|
526
526
|
$b(b["contains match"],a,c)=="true";var G="SELECT DISTINCT ";for(t=0;t<h.length;t++){if(t!=0)G+=", ";G+=h[t]}if(l!="")G+=","+l;G+=" FROM "+e;G+=" WHERE UPPER("+h[0]+") LIKE '";if(n)G+="%";G+="!!QUERY!!%'";t=$b(b["choices selection criteria"],a,c);if(t!="")G+=" AND ("+t+")";G+=" ORDER BY "+h[0]}if(c.lc!=null&&c.lc.destroy!=null){c.lc.destroy();c.lc=null}var F;if(P=="dspf"&&Eb())F=Ib.designer.b;else{for(t=c.parentNode;t;){if(t.Ac){F=t;break}t=t.parentNode}if(F==null)F=pui.runtimeContainer}var D=function(C){C=
|
|
@@ -571,8 +571,8 @@ a[0].data,a[0].ref)=="true"&&pui.Zv();pui.Am.push(b.b)}if(!pui.Md&&pui.format)pu
|
|
|
571
571
|
true)pui.focusOnContainer();else if(pui.r.Od!="no focus on page")try{pui.W.dom.focus();if(pui.W.dom.tagName!="SELECT"&&pui.W.dom.type!="checkbox"&&pui.W.dom.type!="radio"){if(pui.is_old_ie)if(pui.W.dom.createTextRange!=null){pui.W.dom.select();var w=pui.W.dom.createTextRange();if(w!=null&&w.collapse!=null&&w.select!=null){w.collapse();w.select()}}else pui.focusOnContainer();pui["highlight on focus"]&&pui.W.dom.select()}}catch(A){pui.focusOnContainer()}},1)}else if(!pui.rj&&(pui.r.Tf==null||pui.r.Me==
|
|
572
572
|
null))pui.focusOnContainer();pui.Nb=true;pui.ku();pui.ot!=null&&pui.ot.update();pui.breakMessagesInit()}}else{document.body.innerHTML="<h1>Unrecoverable Error</h1> <p>Unrecoverable error <strong>"+b.exception+"</strong> occurred while handling an exception. The original exception id is <strong>"+b.cause+"</strong>.</p> <p>Please contact the server administrator to determine the cause of the problem.";pui.Nb=true}};
|
|
573
573
|
pui.ku=function(){for(var b=0;b<pui.Va.length;b++){var a=pui.Va[b];if(a.d!=null&&!a.au){a.d.yn!=null&&typeof a.d.yn=="function"&&a.d.yn();a.d.Nf=true;a.d.dc==1&&a.d.z();a.au=true}}};
|
|
574
|
-
pui.Hp=function(b){function a(da,ia,va){var Ba;if(R[da].root!=null&&R[da].b!=null){Ba=R[da].root;va=R[da].b}else Ba=R[da];da=Ba;var
|
|
575
|
-
ga=p+"."+
|
|
574
|
+
pui.Hp=function(b){function a(da,ia,va){var Ba;if(R[da].root!=null&&R[da].b!=null){Ba=R[da].root;va=R[da].b}else Ba=R[da];da=Ba;var Ya=va-1;if(da.gg[Ya]==null)da.gg[Ya]=[];var fa=da.P.id,wa={};for(var pa in ia)if(ia.layout!=fa||pa!="container"&&pa!="layout")if(typeof ia[pa]=="object"&&ia[pa]!=null)try{wa[pa]=JSON.parse(JSON.stringify(ia[pa]))}catch(fb){}else wa[pa]=ia[pa];da.gg[Ya].push(wa);if(ia["field type"]=="layout"||ia["field type"]=="grid")R[ia.id]={root:Ba,b:va}}function c(){Ka=pui.L(qa.fieldName);
|
|
575
|
+
ga=p+"."+Ka;if(pui.handler!=null)ga=Ka;if(b.o!=null)ga+="."+b.o}var e=vd(),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=[],w={},A=pui["strict tab control"],B=b.Fj==null&&b.ml==null;if(pui.controller!=null&&h!=null)for(var G="",F=1,D="error condition";h[D+G];){if(pui.R(h[D+G],r)=="1"){G=pui.R(h["error message"+G],r);s.push({msg:G});break}G=" "+ ++F}!f&&b.o==null&&
|
|
576
576
|
b.ml==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&&B){p=p||pui.format;pui.Z[p]={};var E=pui.handler==null?p+".":"";F=b.metaData.screen["return cursor record"];if(pui.p(F)){if(pui.Ba.record==null)pui.Ba.record={};pui.Ba.record[E+pui.L(F.fieldName)]=true}F=b.metaData.screen["return cursor field"];if(pui.p(F)){if(pui.Ba.field==null)pui.Ba.field={};pui.Ba.field[E+pui.L(F.fieldName)]=
|
|
577
577
|
true}F=b.metaData.screen["return cursor position"];if(pui.p(F)){if(pui.Ba.position==null)pui.Ba.position={};pui.Ba.position[E+pui.L(F.fieldName)]=true}F=b.metaData.screen["return cursor row"];if(pui.p(F)){if(pui.Ba.row==null)pui.Ba.row={};pui.Ba.row[E+pui.L(F.fieldName)]=true}F=b.metaData.screen["return cursor column"];if(pui.p(F)){if(pui.Ba.column==null)pui.Ba.column={};pui.Ba.column[E+pui.L(F.fieldName)]=true}F=b.metaData.screen.changed;if(pui.p(F))pui.Fk[p]=E+pui.L(F.fieldName);F=b.metaData.screen["window left"];
|
|
578
578
|
if(pui.p(F))pui.zm=E+pui.L(F.fieldName);F=b.metaData.screen["window top"];if(pui.p(F))pui.Bm=E+pui.L(F.fieldName);F=b.metaData.screen["valid command key"];if(pui.p(F))pui.xm=E+pui.L(F.fieldName);F=b.metaData.screen["back button"];if(pui.p(F))pui.qi=E+pui.L(F.fieldName);F=b.metaData.screen["dd element id"];if(pui.p(F))pui.mb.Yn=E+pui.L(F.fieldName);F=b.metaData.screen["dd record number"];if(pui.p(F))pui.mb.Zn=E+pui.L(F.fieldName);F=b.metaData.screen["target element id"];if(pui.p(F))pui.mb.fq=E+pui.L(F.fieldName);
|
|
@@ -592,8 +592,8 @@ C.Ce=null;C.maxLength=null}}}if(na=="cursor record number")pui.Hk[(pui.handler==
|
|
|
592
592
|
na=="range high")&&g[E].value&&g[E].value.dataType=="date"){Y=g[E].value;ma={};ma.dataType=Y.dataType;ma.dateFormat=Y.dateFormat;ma.formatting=Y.formatting;ma.locale=Y.locale;ma.value=G;ma.Ke=true;ma=pui.tc.format(ma);if(na=="range low")X=ma;else aa=ma}}if(g[E].grid!=null&&!f)switch(na){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":ma=
|
|
593
593
|
null;Y=Bb(g[E].grid);if(Y!=null){ma=Y.grid.Bu;if(ma!=null)if(ma.keys!=null&&ma.values!=null){Y={keys:[],values:[]};for(key in ma.keys)Y.keys.push(ma.keys[key]);for(value in ma.values)Y.values.push(pui.R(ma.values[value],r,b.ref));Y=pui.kr(g[E],Y,r,b.ref);for(ma=0;ma<Y.keys.length;ma++)G=G.replaceAll("(&"+Y.keys[ma]+")",Y.values[ma])}}}ea[na]=G}if(ea["field type"]=="tab panel"||ea["field type"]=="layout"&&ea.template=="tab panel"){G=ea.id;l.push(G);Zc[G]!=null?o.push(Zc[G]):o.push($b(ea["active tab"],
|
|
594
594
|
"",y))}for(D in ea){G=y.Gh==null?pui.Mi(K,D):pui.Mi(y.Gh,D);if(G!=null){C=ea[D];if(!f){var qa=g[E][D];if(pui.p(qa)){qa.revert=false;if(pui.is_touch&&!pui.is_mouse_capable&&D=="value"&&ea["field type"]=="textbox"&&qa.formatting=="Number")if(qa.numSep!="true"&&qa.numBlankFill!="true"&&qa.negNum!="(999.00)"&&qa.negNum!="999.00-"&&qa.negNum!="999.00 CR"&&(!qa.edtWrd||qa.edtWrd=="")&&(!qa.edtMsk||qa.edtMsk=="")&&(!qa.curSym||qa.curSym=="")&&(!qa.units||qa.units=="")&&pui.appJob.decimalFormat!="I"&&pui.appJob.decimalFormat!=
|
|
595
|
-
"J"){y.type="number";qa.maxLength>0&&T(y,"textInput",function(da){var ia=ub(da);if(!(ia==null||ia.value==null))if(da.data=="-"&&ia.validity!=null&&(ia.value!=""&&ia.validity.valid||!ia.validity.valid))vb(da);else ia.maxLength>0&&ia.value.length>=ia.maxLength&&vb(da)})}var
|
|
596
|
-
null)pui.nh[ga]=[];pui.nh[ga].push(y)}if(pui.Us(D,y)){c();if(D=="radio button group"){Y=
|
|
595
|
+
"J"){y.type="number";qa.maxLength>0&&T(y,"textInput",function(da){var ia=ub(da);if(!(ia==null||ia.value==null))if(da.data=="-"&&ia.validity!=null&&(ia.value!=""&&ia.validity.valid||!ia.validity.valid))vb(da);else ia.maxLength>0&&ia.value.length>=ia.maxLength&&vb(da)})}var Ka,ga;if(D=="changed"){c();if(pui.eh[ga]==null)pui.eh[ga]=[];pui.eh[ga].push(y)}if(D=="is blank"){c();if(pui.uh[ga]==null)pui.uh[ga]=[];pui.uh[ga].push(y)}if(D=="dup key response"&&ea["allow dup key"]=="true"){c();if(pui.nh[ga]==
|
|
596
|
+
null)pui.nh[ga]=[];pui.nh[ga].push(y)}if(pui.Us(D,y)){c();if(D=="radio button group"){Y=Ka;if(b.o!=null)Y+="."+b.o;y.name=Y;if(pui.is_old_ie){var ua;try{ua=document.createElement('<input name="'+Y+'" type="radio">')}catch(Pa){ua=document.createElement("input");ua.name=Y;ua.type="radio"}ua.style.position=y.style.position;ua.style.left=y.style.left;ua.style.top=y.style.top;ua.style.visibility=y.style.visibility;ua.style.display=y.style.display;ua.id=y.id;ua.value=y.value;ua.xc=y.xc;ua.Ld=y.Ld;ua.modified=
|
|
597
597
|
y.modified;ua.disabled=y.disabled;y.parentNode.replaceChild(ua,y);ua.checked=y.checked;ua.Wa=y.Wa;ua.eb=y.eb;ua.onblur=y.onblur;ua.onchange=y.onchange;ua.oninput=y.oninput;ua.onclick=y.onclick;ua.ondblclick=y.ondblclick;ua.onfocus=y.onfocus;ua.onkeydown=y.onkeydown;ua.onkeypress=y.onkeypress;ua.onkeyup=y.onkeyup;ua.onmousedown=y.onmousedown;ua.onmousemove=y.onmousemove;ua.onmouseout=y.onmouseout;ua.onmouseover=y.onmouseover;ua.onmouseup=y.onmouseup;ua.pui=y.pui;y=ua}y.radioValue=ea.value}Y=M!=null&&
|
|
598
598
|
M.ea()==true;if(!Y&&pui.O[ga]==null)pui.O[ga]=[];if(!Y&&pui.O[ga][0]!=null&&pui.O[ga][0].cj){pui.O[ga]=[];y.modified=true;pui.modified=true}if(D=="page down response"){pui.O[ga].push(y.grid.i.ka);pui.O[ga].push(y.grid.i.na)}else if(D=="page up response"){pui.O[ga].push(y.grid.i.xa);pui.O[ga].push(y.grid.i.oa)}else Y||pui.O[ga].push(y);if(D=="menu response")y.S="";if(D=="upload response")y.fileUpload.Yx=ga;if(D=="chart response")y.S="";if(D=="tab response")if(Y=y.tabPanel)Y.dm=true;if(D=="active tab")if(Y=
|
|
599
599
|
y.tabPanel)Y.bm=true;if(D=="response"){Y=ea["shortcut key"];if(Y!=null&&Y!=""){if(pui.Z[p]==null)pui.Z[p]={};if(pui.Z[p][Y]==null)pui.Z[p][Y]=[];pui.Z[p][Y].push(y);y.vd=Y}if(Q==null)y.S="0";if(ea.onclick==null||ea.onclick==""||pui.$b(ea.onclick)){if(pui.$b(ea.onclick))y.La=ea.onclick.routine;pui.kg(y)}}if(D=="page down response"){if(pui.Z[p].PageDown==null)pui.Z[p].PageDown=[];pui.Z[p].PageDown.push(y.grid.i.na);pui.kg(y.grid.i.ka);pui.kg(y.grid.i.na);y.grid.i.ka.N=qa;y.grid.i.na.N=qa}if(D=="page up response"){if(pui.Z[p].PageUp==
|
|
@@ -618,24 +618,24 @@ b.Es;y.pui.Bi=y.N.fieldName}if(y.comboBoxWidget!=null||y.l!=null||y.tagName=="TE
|
|
|
618
618
|
ia)});T(y,"paste",function(da){var ia=ub(da);setTimeout(function(){var va=Number(ia.maxLength);if(!isNaN(va)&&va>0&&ia.value!=null&&ia.value.length>va)ia.value=ia.value.substr(0,va)},0)});T(y,"keydown",function(da){da=da||window.event;var ia=ub(da);if(!(da.ctrlKey||ia.selectionStart!==ia.selectionEnd)){var va=da.keyCode;if(va>=48&&va<=57||va>=65&&va<=90||va==32||va>=106&&va<=111||va>=186&&va<=192||va>=219&&va<=222){va=Number(ia.maxLength);if(!isNaN(va)&&va>0&&ia.value!=null&&ia.value.length==va){vb(da);
|
|
619
619
|
return false}}}})}}if(y.mc!=null||y.Sc!=null||y.mf!=null||y.oe!=null){T(ra,"focus",pui.Td);T(ra,"keyup",pui.Td)}T(ra,"focus",pui.Kj);T(ra,"keydown",pui.Kj);T(ra,"change",gb);T(ra,"paste",gb);T(ra,"input",gb);ra.Vn=0;T(ra,"mouseup",pui.dq);T(ra,"mousedown",pui.dq);T(ra,"keyup",pui.dq);if(pui.is_touch){ra.Jl=pui.Dw(ra);T(ra,"focus",function(da){if(da.srcElement.Jl)da.srcElement.Jl.Rt=true;setTimeout(function(ia){if(ia.Jl)ia.Jl.Rt=false},1E3,da.srcElement)})}T(ra,"keydown",function(da){da=da||window.event;
|
|
620
620
|
var ia=da.keyCode;ia>=9&&ia<=45&&ia!=32||ia>=112&&ia<=145||da.ctrlKey&&ia!=88&&ia!=86||gb(da)});y.N&&y.N.Ce&&function(){var da=y.N.Ce;T(ra,"keypress",function(ia){ia=ia||window.event;pui.Ce(ia,da)});y.type=="number"&&y.N.noExtraSpaces&&T(ra,"textInput",function(ia){ia=ia||window.event;da.test(ia.data)||vb(ia)})}();if(y.N!=null&&y.N.edtMsk!=null&&y.N.edtMsk!=""){ra.yl=false;T(ra,"focus",function(da){ub(da).yl=false});T(ra,"blur",function(da){var ia=ub(da);if(ia.yl){typeof ia.onchange==="function"&&
|
|
621
|
-
ia.onchange(da);ia.yl=false}});T(ra,"keyup",function(da){pui.tn(ub(da),da)});T(ra,"keydown",function(da){da=da||window.event;var ia=da.keyCode,va=ub(da),Ba=null;if(ia==46||ia==8||ia==32){var
|
|
622
|
-
0;if(Ba!=null){va=ub(da);
|
|
621
|
+
ia.onchange(da);ia.yl=false}});T(ra,"keyup",function(da){pui.tn(ub(da),da)});T(ra,"keydown",function(da){da=da||window.event;var ia=da.keyCode,va=ub(da),Ba=null;if(ia==46||ia==8||ia==32){var Ya=false;if(typeof va.selectionStart=="number")Ya=va.selectionStart==0&&va.selectionEnd==va.value.length;else if(typeof document.selection!="undefined")Ya=document.selection.createRange().text==va.value;if(Ya){va.value="";return}}if(ia>=48&&ia<=57)Ba=ia-48;if(ia>=96&&ia<=105)Ba=ia-96;if(ia==46)Ba=0;if(ia==8)Ba=
|
|
622
|
+
0;if(Ba!=null){va=ub(da);Ya=va.value;if(Ya!=null){var fa=Ab(va);if(ia==8&&fa>0)fa-=1;va.value=Ya.substr(0,fa)+String(Ba)+Ya.substr(fa+1);ia!=46&&ia!=8&&fa++;va.yl=true;vb(da);pui.tn(va,da,fa);if(pui.is_old_ie)try{da.keyCode=0}catch(wa){}return false}}});pui.tn(ra)}}y.tagName=="SELECT"&&T(y,"keydown",function(da){da=da||window.event;var ia=da.keyCode;if(ia==38||ia==40)gb(da)});if(y.tagName=="SELECT"||y.tagName=="INPUT"&&(y.type=="checkbox"||y.type=="radio")){if(y.mc!=null||y.Sc!=null||y.mf!=null||
|
|
623
623
|
y.oe!=null){T(y,"focus",pui.Td);T(y,"keyup",pui.Td)}T(y,"focus",pui.Kj);T(y,"keydown",pui.Kj);T(y,"change",gb);if(y.tagName!="SELECT")T(y,"click",gb);else{T(y,"keydown",function(da){if(!da)da=window.event;if(da.keyCode==34){da.cancel=true;da.preventDefault&&da.preventDefault();return false}});b.o>0&&pui.is_firefox&&T(y,"keydown",function(da){da=da||window.event;if(da.keyCode==33||da.keyCode==34)vb(da)})}}if(y.mc!=null||y.Sc!=null||y.mf!=null||y.oe!=null)T(y,"click",pui.Td);T(y,"click",pui.Kj)}if(!f&&
|
|
624
624
|
!pui.pa&&pui.W.dom==null&&!y.disabled&&!y.readOnly&&ea.visibility!="hidden"){if(y.tagName=="INPUT")if(pui.Ui(y)||y.type=="checkbox"||y.type=="radio"||y.type=="file")pui.W.dom=y;if(y.tagName=="TEXTAREA"||y.tagName=="SELECT")pui.W.dom=y;if(y.comboBoxWidget!=null)pui.W.dom=y.comboBoxWidget.getBox();if(y.l!=null)pui.W.dom=y.l.getBox()}f&&ea["field type"]=="grid"&&n.Gs.push(ha);f&&ea["field type"]=="layout"&&n.hA.push(ha);X=ea["field type"];if(X!=null){Q=pui.widgets[X];Q!=null&&Q.initialize!=null&&Q.initialize({design:f,
|
|
625
|
-
properties:ea,dom:y,e:ha});if(y.pui&&y.pui.widget&&y.pui.widget)fd(y.pui.widget);else y.Ja&&y.Ja.render(b)}if(!f&&ea["field type"]=="layout"){pui.Xi.push(y.layout);if(ea["lazy load"]=="true"&&typeof y.layout.$t=="function"){R[ea.id]=y.layout;y.layout.$t(b)}}if(!f&&ea["field type"]=="grid"){ha=b.subfiles;var ta,db,Ga,yb,
|
|
625
|
+
properties:ea,dom:y,e:ha});if(y.pui&&y.pui.widget&&y.pui.widget)fd(y.pui.widget);else y.Ja&&y.Ja.render(b)}if(!f&&ea["field type"]=="layout"){pui.Xi.push(y.layout);if(ea["lazy load"]=="true"&&typeof y.layout.$t=="function"){R[ea.id]=y.layout;y.layout.$t(b)}}if(!f&&ea["field type"]=="grid"){ha=b.subfiles;var ta,db,Ga,yb,Xa;Q=pui.Ib(ea["record format name"]);if(ha!=null)ta=ha[Q];if(ta!=null)db=ta.data;if(ta!=null)Ga=ta["field names"];if(ta!=null)yb=ta.ref;if(ta!=null)Xa=ta.errors;y.grid.uo=b.fileId;
|
|
626
626
|
if(typeof pui.view!="undefined")y.grid.Ob="pui-grid-"+pui.view;else if(typeof b.file!="undefined"&&typeof b.library!="undefined")y.grid.Ob="pui-grid-"+b.library+"-"+b.file+"-"+Q;ea["persist state"]==="program only"&&ta&&ta.renderCount===1&&delete pui.uj[y.grid.Ob];if(ta!=null&&ta.useServerState&&ta.storedState!=null){y.grid.iz=true;y.grid.Yd=ta.storedState}y.grid.dataArray=db!=null?db:[];y.grid.aa=Ga!=null?Ga:[];if(pui.handler!=null&&db==null){(db=r[pui.Ib(ea["record format name"])])||(db=[]);Ga=
|
|
627
|
-
[];ta=[];Ga={};for(ha=0;ha<g.length;ha++){Q=g[ha];if(Q.grid===ea.id)for(var rb in Q){X=Q[rb];if(pui.p(X))Ga[X.fieldName]=true}}Ga=Object.keys(Ga);for(ha=0;ha<db.length;ha++){Q=[];X=db[ha];for(aa=0;aa<Ga.length;aa++){
|
|
627
|
+
[];ta=[];Ga={};for(ha=0;ha<g.length;ha++){Q=g[ha];if(Q.grid===ea.id)for(var rb in Q){X=Q[rb];if(pui.p(X))Ga[X.fieldName]=true}}Ga=Object.keys(Ga);for(ha=0;ha<db.length;ha++){Q=[];X=db[ha];for(aa=0;aa<Ga.length;aa++){Ka=Ga[aa];Q.push(X[Ka])}ta.push(Q)}y.grid.dataArray=ta;y.grid.aa=Ga;y.grid.Fs=db;ta={}}y.grid.ref=yb!=null?yb:{};if(Xa!=null)y.grid.errors=Xa;ha=g[E]["subfile message key"];Q=g[E]["subfile program message queue"];X=g[E]["subfile control program message queue"];if(ha!=null&&ha!=""&&Q!=
|
|
628
628
|
null&&Q!=""||X!=null&&X!=""){if(y.grid.d!=null)y.grid.d.EA="Message";y.grid.C.push({id:"_msgsfltext",column:"0","field type":"output field",grid:ea.id,left:"5px",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}});y.grid.C.push({id:"_msgsflhelp",column:"0","field type":"output field",grid:ea.id,left:"0px",top:"0px",visibility:"hidden",
|
|
629
629
|
value:{dataLength:"9999",dataType:"char",fieldName:"help",formatting:"Text",textTransform:"none",trimLeading:"false",trimTrailing:"true",lowerCaseField:true}});y.grid.C.push({id:"_msgsflid",column:"0","field type":"output field",grid:ea.id,left:"0px",top:"0px",visibility:"hidden",value:{dataLength:"7",dataType:"char",fieldName:"id",formatting:"Text",textTransform:"none",trimLeading:"false",trimTrailing:"true",lowerCaseField:true}});y.grid.C.push({id:"_msgsfldate",column:"0","field type":"output field",
|
|
630
630
|
grid:ea.id,left:"0px",top:"0px",visibility:"hidden",value:{dataLength:"7",dataType:"char",fieldName:"date",formatting:"Text",textTransform:"none",trimLeading:"false",trimTrailing:"true",lowerCaseField:true}});y.grid.C.push({id:"_msgsfltime",column:"0","field type":"output field",grid:ea.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(y.grid.dataArray.length==
|
|
631
631
|
0)if(pui.p(g[E]["subfile message key"])||pui.p(g[E]["subfile program message queue"]))y.grid.No();ta==null&&y.grid.No();ha=Number(ea["subfile record number"]);y.grid.mm=ha;if(isNaN(ha)){ha=1;y.grid.mm=0}if(ha<1||ha>9999){ha=1;y.grid.mm=0}if(ea["position at top"]!="true")y.grid.Fu(ha);else y.grid.j=ha;if(ea["place cursor"]=="true"){y.grid.sj=ha;pui.rj=true}y.grid.Ky();F.push(y.grid);pui.Va.push(y.grid)}if(!f&&b.o!=null){y.o=b.o;y.Yj=b.name;if(g[E].domEls==null)g[E].domEls=[];g[E].domEls[b.o-1]=y}}if((pui.controller!=
|
|
632
|
-
null||typeof pui.handler=="function")&&ea!=null&&ea["set as modified"]!="false")y.modified=true;if(!f&&b.Vb!=null)y.Vb=b.Vb;if(!f&&M!=null&&!M.expanded&&W){W=parseInt(W.style.height);if(!isNaN(W)){M=parseInt(y.style.top);if(isNaN(M))M=0;if(M>W&&(y.tagName=="INPUT"||y.tagName=="SELECT"||y.tagName=="TEXTAREA")&&!y.disabled){y.Bp=true;y.disabled=true}}}}N&&g.pop();if(!f){
|
|
633
|
-
|
|
632
|
+
null||typeof pui.handler=="function")&&ea!=null&&ea["set as modified"]!="false")y.modified=true;if(!f&&b.Vb!=null)y.Vb=b.Vb;if(!f&&M!=null&&!M.expanded&&W){W=parseInt(W.style.height);if(!isNaN(W)){M=parseInt(y.style.top);if(isNaN(M))M=0;if(M>W&&(y.tagName=="INPUT"||y.tagName=="SELECT"||y.tagName=="TEXTAREA")&&!y.disabled){y.Bp=true;y.disabled=true}}}}N&&g.pop();if(!f){Xa=pui.controller!=null&&s.length>0?s:b.errors;if(Xa!=null)if(b.o!=null){Xa=Xa[String(b.o)];Xa!=null&&pui.Zp(Xa,b.o)}else{for(r=0;r<
|
|
633
|
+
Xa.length;r++){var qb=Xa[r],sb;try{sb=JSON.parse(qb.msg)}catch(Fb){sb=false}if(sb&&typeof sb=="object")if(!(!pui.xd||pui.xd.length<=0)){t=g.find(function(da){return da.id===qb.id});s=pui.Bk(t,null,screen,b.data,b.ref);qb.msg=s.keys&&s.keys.length>0?t["error message"]:pui.xd[sb.transId]}}pui.Zp(Xa)}}for(E=0;E<l.length;E++){g=document.getElementById(l[E]);Xa=g.tabPanel;if(!Xa)Xa=g.Ja;if(Xa&&typeof Xa.Tc==="function"){if(o[E])Xa.selectedTab=o[E];Xa.Tc()}}if(f)for(E=0;E<n.Gs.length;E++)n.Gs[E].dom.grid.Xb(true);
|
|
634
634
|
F.forEach(function(da){if(pui.W!=null&&pui.W.Hg==true)da.sj=null;if(da.Ts())da.collapse(Bb(da.c.id+"_expander"));else{if(da.Pe)return;da.getData()}if(!da.Pe){da.j>1&&da.d!=null&&da.d.type=="sliding"&&da.d.td(da.j,true);if(pui.rj&&pui.r.Me==null&&pui.r.Tf==null)if(pui.W==null||pui.W.Hg!=true)setTimeout(function(){da.zt(true)},1);if(da.d!=null){!f&&da.d.type=="sliding"&&da.d.dc==1&&da.d.z();if(!f&&typeof h["record format name"]==="string"&&da.d.type=="paging"){var ia=h["record format name"],va=pui.Ib(ia);
|
|
635
635
|
if(pui.Z[ia]==null&&pui.Z[va]!=null)ia=va;if(pui.Z[ia]!=null){if(pui.Z[ia].PageDown==null)pui.Z[ia].PageDown=[];pui.Z[ia].PageDown.push(da.i.na);da.i.qp=true;if(pui.Z[ia].PageUp==null)pui.Z[ia].PageUp=[];pui.Z[ia].PageUp.push(da.i.oa);da.i.sp=true}}}if(da.nx()){da.xe.collapseAll();da.Ql()}da.pl();da.oy()}});for(var cb in R)if(n=R[cb]){g=-1;if(typeof n.wg==="function")g=n.wg();typeof n.Tl==="function"&&n.Tl(g)}if(!f){pui.onload!=null&&typeof pui.onload=="function"&&B&&b.Gj!==false&&!pui.fa&&pui.onload(b);
|
|
636
636
|
if(h!=null){if(b.Gj!==false){if(pui.clientLogic)if((cb=h["initial routine"])&&cb.routine){cb=cb.routine;try{eval('pui["routineFunction"] = function() {\r\n'+pui.clientLogic[cb]+'\r\n}; \r\npui["routineFunction"]();')}catch(pb){console.error(pb)}}cb=h.onload;if(cb!=null&&cb!="")try{eval('var format = "'+h["record format name"]+'";');eval('var file = "'+b.file+'";');eval(cb)}catch(kb){pui.Ea(kb,"Onload Error:\n")}}pui.Dl=h.onsubmit;if(h.onmessage&&typeof h["record format name"]==="string"){pui.Cl[h["record format name"].toLowerCase()]=
|
|
637
637
|
h.onmessage;if(b.msgInfo!=null&&B&&b.Gj!==false&&!pui.fa){pui.message=b.msgInfo;try{eval('var message = pui["message"];');eval(h.onmessage)}catch(d){pui.Ea(d,"Onmessage Error:\n")}}}["onkeydown","onkeypress","onkeyup"].forEach(function(da){if(B&&b.kl&&h[da]!=null&&h[da]!=""){var ia=function(va){pui.temp_event=va;eval("var event = pui.temp_event;");eval('var format = "'+h["record format name"]+'";');eval('var file = "'+b.file+'";');try{var Ba=eval(h[da]);if(typeof Ba=="function"){if(!va)va=window.event;
|
|
638
|
-
Ba(va)}}catch(
|
|
638
|
+
Ba(va)}}catch(Ya){pui.Ea(Ya,da.substr(0,1).toUpperCase()+da.substr(1)+" Error:\n")}};T(document.body,da.substr(2),ia);pui.$l.push({yw:document.body,xw:da.substr(2),ww:ia})}})}if(b.ml!=null){pui.Nb&&pui.ku();if(b.gj!=null)try{eval('var lazyContainerNum = "'+b.ml+'";');eval(b.gj)}catch(Wa){pui.Ea(Wa,"OnLazyLoad Error:\n")}}}pui["enable arrow keys"]==true&&pui.rw();e=vd(e);pui.Ul&&console.log("Format "+p+" rendered in "+e+"ms")};
|
|
639
639
|
pui.rw=function(){pui.sr.ly();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.mr(b[e])}}};
|
|
640
640
|
pui.sr=new (function(){var b=this;b.wn=false;b.ly=function(){b.wn=false};b.handler=function(a){a=a||window.event;var c=ub(a);if(!(c.lc&&c.lc.Ti())){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(Ab(f)<=0){pui.Wk(c,"left");vb(a);return false}if(e==38){pui.Wk(c,"up");vb(a);return false}if(e==39)if(Ab(f)>=f.value.length){pui.Wk(c,"right");vb(a);return false}if(e==40){pui.Wk(c,"down");vb(a);if(!b.wn&&c.className.includes("qf")&&c.nodeName===
|
|
641
641
|
"INPUT"){b.wn=true;setTimeout(function(){c.dispatchEvent(a)},50)}return false}}}});pui.mr=function(b){typeof b==="undefined"||typeof b.tagName==="undefined"||b.tagName!=="INPUT"||T(b,"keydown",pui.sr.handler)};
|
|
@@ -773,24 +773,25 @@ pui.co=function(b){if(b==null)b="pui";if(typeof b=="string")b=document.getElemen
|
|
|
773
773
|
ad(e);e+=3;c.style.top=e+"px"});T(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.zf){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=
|
|
774
774
|
location.href;if(!pui.zf){b.onclick=function(){Bb("ipadKeyboard").style.display=""};b.onblur=function(){Bb("ipadKeyboard").style.display="none"}}document.body.appendChild(b);a&&document.body.appendChild(c)}else if(pui.gf!=null){pui.Ly();pui.pa=true;pui.zf=true}}};
|
|
775
775
|
pui.gp=[{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={};
|
|
776
|
-
pui.Kv=function(b,a){function c(B){function G(
|
|
777
|
-
pui.Vc(y.parentNode);db+=yb[0];Ga+=yb[1];yb=db+y.offsetWidth;var
|
|
778
|
-
ua<pb[0]||ga>kb||ga<pb[1])cb=true}if(ra||rb>yb||sb<db||qb>
|
|
779
|
-
true;sa=ta}}ra||(sa=null);if(Pa!=sa){clearTimeout(r);if(Pa!=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=y;pui.dragDropInfo.event=
|
|
780
|
-
b.id;pui.dragDropInfo.text+=o.Da!=null?" off of row "+o.Da+" of grid "+o.id:" off of element "+o.id;l("ondragleave")}if(sa!=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=y;pui.dragDropInfo.event=
|
|
781
|
-
"ondragenter: Dragging row "+n+" of grid "+b.id:"ondragenter: Dragging element "+b.id;pui.dragDropInfo.text+=o.Da==0?" before row "+(o.Da+1)+" of grid "+o.id:o.Da!=null?" after row "+o.Da+" of grid "+o.id:" over element "+o.id;l("ondragenter");if(e()||f())if(t>=0){clearTimeout(r);r=setTimeout(h,t)}}}R||vb(
|
|
782
|
-
F)}document.onselectstart=qa;if(sa!=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=y;pui.dragDropInfo.event=B;o=g(sa);pui.dragDropInfo["target element"]=o.dom;pui.dragDropInfo["target element id"]=o.id;if(o.Da!=null)pui.dragDropInfo["target record number"]=o.Da;pui.dragDropInfo.text=n!=null?"ondrop: Dropped row "+
|
|
783
|
-
o.Da==0?" before row "+(o.Da+1)+" of grid "+o.id:o.Da!=null?" after row "+o.Da+" of grid "+o.id:" into element "+o.id;if(sa.He!=null)pui.da(sa,"grid-drop-target");else{if(sa.tagName=="IMG")sa.style.backgroundColor=sa.ff;if(sa.ff!=null)sa.style.borderColor=sa.ff}if(!(o.dom.id==b.id&&n!=null&&o.Da!=null&&(n==o.Da||n==o.Da+1))){pui.dragDropInfo.cancel=false;l("ondrop");if(pui.dragDropInfo.cancel!=true)if(pui.mb.Yn!=null||pui.mb.Zn||
|
|
784
|
-
"false";pui.La=null;pui.Nc=null;pui.Mc=null}}}if(!s&&pui.mb.cc!=true){b.style.left=na+"px";b.style.top=ma+"px"}if(w)b.grid.ko=false;n=o=null}B.pointerType&&B.stopImmediatePropagation&&B.stopImmediatePropagation();var D=ub(B),E=pui.Vc(b.parentNode),C=E[0],K=E[1],R=false;if(B)if(B.touches!=null){if(B.touches.length!=1)return;R=true}else if(B.pointerType==="touch")R=true;R&&B.preventDefault();var N;n=null;if(A)if(D.tagName=="TEXTAREA"||
|
|
785
|
-
b.grid.X;E=b.grid.cells.length-1;if(!b.grid.ea()){N=M.length-b.grid.j+1;if(E>N)E=N}N=0;if(b.grid.h)N=1;D=ub(B);if(D.tagName=="A"||D.tagName=="IMG"||D.tagName=="INPUT"||D.tagName=="SELECT"||D.tagName=="TEXTAREA")return;for(;D!=null&&(D.row==null||D.col==null);)D=D.parentNode;if(D!=null&&D.row>=N)N=D.row;else return;if(N>E)return;n=N+b.grid.j;if(b.grid.h)n-=1;if(M.length>0&&M[n-1]!==null&&M[n-1].length!=0&&M[n-1].o!=null)n=
|
|
786
|
-
for(D=0;D<E.length;D++){var Q=Bb(E[D]);if(Q!=null)if(Q.grid!=null){var ha=Q.grid.k,Y=ha.length-1;if(!Q.grid.ea()){M=Q.grid.dataArray;if(Q.grid.isFiltered())M=Q.grid.X;var X=M.length-Q.grid.j+2;if(Y>X)Y=X}Q=X=Q.grid.h?1:0;if(M.length==0)Y=X-1;for(X=X;X<ha.length;X++){if(X<=Y)Q=ha[X].as=X;else ha[X].as=Q;W.push(ha[X])}}else W.push(Q)}}var y=b;if(s){if(w){M=b.grid.cells[N];N=M[0];y=document.createElement("div");y.style.position=
|
|
787
|
-
"px";D=parseInt(b.style.width);D-=2;if(a.scrollbar!="none")D-=16;if(D<5)D=5;y.style.width=D+"px";N=parseInt(N.style.height);N-=2;if(N<5)N=5;y.style.height=N+"px";for(D=0;D<M.length;D++){N=M[D].cloneNode(true);N.style.top="0px";N.onclick=null;N.onmousedown=null;N.onmouseup=null;y.appendChild(N)}}else y=b.cloneNode(true);y.style.zIndex=701;if(!pui.pa)y.style.cursor="move";y.style.opacity=0.6;y.style.filter=
|
|
788
|
-
window.getComputedStyle(b,null).getPropertyValue("top");if(y.style.left.indexOf("calc")!==-1)y.style.left=window.getComputedStyle(b,null).getPropertyValue("left");var ea=$c(B),aa=ad(B),na=parseInt(y.style.left),ma=parseInt(y.style.top),sa=null,qa=document.onselectstart;pui.dragDropInfo={};pui.dragDropInfo["dd element"]=b;pui.dragDropInfo["dd element id"]=b.id;if(n!=null)pui.dragDropInfo["dd record number"]=
|
|
789
|
-
n+" of grid "+b.id:"ondragstart: Dragging element "+b.id;l("ondragstart");if(R){T(document,"touchmove",G);T(document,"touchend",F)}else{T(document,"mousemove",G);T(document,"mouseup",F)}document.onselectstart=ya(false)}function e(){if(o.row==null)return false;if(o.grid.Hb())return false;if(o.row==0)return true;if(o.row==
|
|
790
|
-
false;if(e()){o.grid.j-=1;o.Da-=1;B=true}else if(f()){o.grid.j+=1;o.Da+=1;B=true}if(B){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"]+
|
|
791
|
-
b.id;pui.dragDropInfo.text+=o.Da==0?" before row "+(o.Da+1)+" of grid "+o.id:" after row "+o.Da+" of grid "+o.id;l("ondragenter");clearTimeout(r);r=setTimeout(h,p+35)}}function g(B){var G=B.He;if(G==null)return{dom:B,id:B.id};else{B=B.as;var F=G.j-1+B-(G.h?1:0),D=F>0?F:0,E=G.isFiltered()?G.X:G.dataArray;if(F>
|
|
792
|
-
null&&G!="")try{if(eval(G)==false)return false}catch(F){pui.Ea(F,B+" 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(B){if(w||A){B=ub(B);if(B.tagName=="TEXTAREA"||B.tagName=="INPUT")return true}return false};
|
|
793
|
-
1;if(!b.grid.ea()){var G=b.grid.dataArray;if(b.grid.isFiltered())G=b.grid.X;G=G.length-b.grid.j+1;if(B>G)B=G}if((a.cursor==null||a.cursor=="")&&!pui.pa)for(G=b.grid.h?1:0;G<=B;G++)for(var F=b.grid.cells[G],D=0;D<F.length;D++)F[D].style.cursor="move"},1)}if(window.PointerEvent)T(b,"pointerdown",
|
|
776
|
+
pui.Kv=function(b,a){function c(B){function G(Ka){Ka.pointerType&&Ka.stopImmediatePropagation&&Ka.stopImmediatePropagation();var ga=ad(Ka),ua=$c(Ka),Pa=ga-aa,ra=ua-ea;if(ra==0&&Pa==0)return true;pui.Is(y)||document.body.appendChild(y);if(w&&b.grid.Fd){var gb=Bb(b.grid.Fd);gb.style.visibility="hidden";gb.style.display="none"}if(s){Pa+=K;ra+=C}y.style.top=ma+Pa+"px";y.style.left=na+ra+"px";R&&Ka.preventDefault();Pa=sa;ra=false;for(gb=0;gb<W.length;gb++){var ta=W[gb],db=y.offsetLeft,Ga=y.offsetTop,yb=
|
|
777
|
+
pui.Vc(y.parentNode);db+=yb[0];Ga+=yb[1];yb=db+y.offsetWidth;var Xa=Ga+y.offsetHeight;if(ta.xu==null||ta.yu==null){var rb=pui.Vc(ta.parentNode);ta.xu=rb[0];ta.yu=rb[1]}rb=ta.offsetLeft+ta.xu;var qb=ta.offsetTop+ta.yu,sb=rb+ta.offsetWidth,Fb=qb+ta.offsetHeight;if(ta.parentNode.getAttribute("container")=="true"){var cb=sb-ta.offsetWidth+ta.parentNode.offsetWidth-ta.offsetLeft;if(cb<sb)sb=cb}cb=false;if(ta.He!=null){var pb=pui.Vc(ta.He.c),kb=pb[1]+ta.He.c.offsetHeight;if(ua>pb[0]+ta.He.c.offsetWidth||
|
|
778
|
+
ua<pb[0]||ga>kb||ga<pb[1])cb=true}if(ra||rb>yb||sb<db||qb>Xa||Fb<Ga||cb)if(ta.He!=null)pui.da(ta,"grid-drop-target");else{if(ta.tagName=="IMG")if(ta.ff!=null)ta.style.backgroundColor=ta.ff;if(ta.si!=null)ta.style.borderColor=ta.si}else{if(ta.He!=null)pui.Q(ta,"grid-drop-target");else{if(ta.si==null)ta.si=ta.style.borderColor;if(ta.si==null)ta.si="";ta.style.borderColor="#9999ff";if(ta.tagName=="IMG"){if(ta.ff==null)ta.ff=ta.style.backgroundColor;if(ta.ff==null)ta.ff="";ta.style.backgroundColor="#D8F0FD"}}ra=
|
|
779
|
+
true;sa=ta}}ra||(sa=null);if(Pa!=sa){clearTimeout(r);if(Pa!=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=y;pui.dragDropInfo.event=Ka;o=g(Pa);pui.dragDropInfo["target element"]=o.dom;pui.dragDropInfo["target element id"]=o.id;if(o.Da!=null)pui.dragDropInfo["target record number"]=o.Da;pui.dragDropInfo.text=n!=null?"ondragleave: Dragging row "+n+" of grid "+b.id:"ondragleave: Dragging element "+
|
|
780
|
+
b.id;pui.dragDropInfo.text+=o.Da!=null?" off of row "+o.Da+" of grid "+o.id:" off of element "+o.id;l("ondragleave")}if(sa!=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=y;pui.dragDropInfo.event=Ka;o=g(sa);pui.dragDropInfo["target element"]=o.dom;pui.dragDropInfo["target element id"]=o.id;if(o.Da!=null)pui.dragDropInfo["target record number"]=o.Da;pui.dragDropInfo.text=n!=null?
|
|
781
|
+
"ondragenter: Dragging row "+n+" of grid "+b.id:"ondragenter: Dragging element "+b.id;pui.dragDropInfo.text+=o.Da==0?" before row "+(o.Da+1)+" of grid "+o.id:o.Da!=null?" after row "+o.Da+" of grid "+o.id:" over element "+o.id;l("ondragenter");if(e()||f())if(t>=0){clearTimeout(r);r=setTimeout(h,t)}}}R||vb(Ka)}function F(){clearTimeout(r);if(s){pui.Is(y)&&y.parentNode.removeChild(y);y=null}if(R){ac(document,"touchmove",G);ac(document,"touchend",F)}else if(B.pointerType){ac(document,"pointermove",G);
|
|
782
|
+
ac(document,"pointerup",F)}else{ac(document,"mousemove",G);ac(document,"mouseup",F)}document.onselectstart=qa;if(sa!=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=y;pui.dragDropInfo.event=B;o=g(sa);pui.dragDropInfo["target element"]=o.dom;pui.dragDropInfo["target element id"]=o.id;if(o.Da!=null)pui.dragDropInfo["target record number"]=o.Da;pui.dragDropInfo.text=n!=null?"ondrop: Dropped row "+
|
|
783
|
+
n+" of grid "+b.id:"ondrop: Dropped element "+b.id;pui.dragDropInfo.text+=o.Da==0?" before row "+(o.Da+1)+" of grid "+o.id:o.Da!=null?" after row "+o.Da+" of grid "+o.id:" into element "+o.id;if(sa.He!=null)pui.da(sa,"grid-drop-target");else{if(sa.tagName=="IMG")sa.style.backgroundColor=sa.ff;if(sa.ff!=null)sa.style.borderColor=sa.ff}if(!(o.dom.id==b.id&&n!=null&&o.Da!=null&&(n==o.Da||n==o.Da+1))){pui.dragDropInfo.cancel=false;l("ondrop");if(pui.dragDropInfo.cancel!=true)if(pui.mb.Yn!=null||pui.mb.Zn||
|
|
784
|
+
pui.mb.fq!=null||pui.mb.gq){pui.mb.cc=true;pui.G=pui.Xn;pui.cc();pui.G="false";pui.La=null;pui.Nc=null;pui.Mc=null}}}if(!s&&pui.mb.cc!=true){b.style.left=na+"px";b.style.top=ma+"px"}if(w)b.grid.ko=false;n=o=null}B.pointerType&&B.stopImmediatePropagation&&B.stopImmediatePropagation();var D=ub(B),E=pui.Vc(b.parentNode),C=E[0],K=E[1],R=false;if(B)if(B.touches!=null){if(B.touches.length!=1)return;R=true}else if(B.pointerType==="touch")R=true;R&&B.preventDefault();var N;n=null;if(A)if(D.tagName=="TEXTAREA"||
|
|
785
|
+
D.tagName=="INPUT")return;if(w){var M=b.grid.dataArray;if(b.grid.isFiltered())M=b.grid.X;E=b.grid.cells.length-1;if(!b.grid.ea()){N=M.length-b.grid.j+1;if(E>N)E=N}N=0;if(b.grid.h)N=1;D=ub(B);if(D.tagName=="A"||D.tagName=="IMG"||D.tagName=="INPUT"||D.tagName=="SELECT"||D.tagName=="TEXTAREA")return;for(;D!=null&&(D.row==null||D.col==null);)D=D.parentNode;if(D!=null&&D.row>=N)N=D.row;else return;if(N>E)return;n=N+b.grid.j;if(b.grid.h)n-=1;if(M.length>0&&M[n-1]!==null&&M[n-1].length!=0&&M[n-1].o!=null)n=
|
|
786
|
+
M[n-1].o;b.grid.ko=true}E=a["drop targets"];var W=[];if(E!=null&&E!=""){E=E.split(",");for(D=0;D<E.length;D++){var Q=Bb(E[D]);if(Q!=null)if(Q.grid!=null){var ha=Q.grid.k,Y=ha.length-1;if(!Q.grid.ea()){M=Q.grid.dataArray;if(Q.grid.isFiltered())M=Q.grid.X;var X=M.length-Q.grid.j+2;if(Y>X)Y=X}Q=X=Q.grid.h?1:0;if(M.length==0)Y=X-1;for(X=X;X<ha.length;X++){if(X<=Y)Q=ha[X].as=X;else ha[X].as=Q;W.push(ha[X])}}else W.push(Q)}}var y=b;if(s){if(w){M=b.grid.cells[N];N=M[0];y=document.createElement("div");y.style.position=
|
|
787
|
+
"absolute";y.style.left=b.style.left;y.style.top=parseInt(b.style.top)+parseInt(N.style.top)+"px";D=parseInt(b.style.width);D-=2;if(a.scrollbar!="none")D-=16;if(D<5)D=5;y.style.width=D+"px";N=parseInt(N.style.height);N-=2;if(N<5)N=5;y.style.height=N+"px";for(D=0;D<M.length;D++){N=M[D].cloneNode(true);N.style.top="0px";N.onclick=null;N.onmousedown=null;N.onmouseup=null;y.appendChild(N)}}else y=b.cloneNode(true);y.style.zIndex=701;if(!pui.pa)y.style.cursor="move";y.style.opacity=0.6;y.style.filter=
|
|
788
|
+
"alpha(opacity=60)";y.style.border="1px solid #333333"}if(y.style.top.indexOf("calc")!==-1)y.style.top=window.getComputedStyle(b,null).getPropertyValue("top");if(y.style.left.indexOf("calc")!==-1)y.style.left=window.getComputedStyle(b,null).getPropertyValue("left");var ea=$c(B),aa=ad(B),na=parseInt(y.style.left),ma=parseInt(y.style.top),sa=null,qa=document.onselectstart;pui.dragDropInfo={};pui.dragDropInfo["dd element"]=b;pui.dragDropInfo["dd element id"]=b.id;if(n!=null)pui.dragDropInfo["dd record number"]=
|
|
789
|
+
n;pui.dragDropInfo.proxy=y;pui.dragDropInfo.event=B;pui.dragDropInfo.text=n!=null?"ondragstart: Dragging row "+n+" of grid "+b.id:"ondragstart: Dragging element "+b.id;l("ondragstart");if(R){T(document,"touchmove",G);T(document,"touchend",F)}else if(B.pointerType){T(document,"pointermove",G);T(document,"pointerup",F)}else{T(document,"mousemove",G);T(document,"mouseup",F)}document.onselectstart=ya(false)}function e(){if(o.row==null)return false;if(o.grid.Hb())return false;if(o.row==0)return true;if(o.row==
|
|
790
|
+
1&&o.grid.h)return true;return false}function f(){if(o.row==null)return false;if(o.grid.Ub())return false;if(o.row==o.grid.cells.length)return true;return false}function h(){var B=false;if(e()){o.grid.j-=1;o.Da-=1;B=true}else if(f()){o.grid.j+=1;o.Da+=1;B=true}if(B){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"]+
|
|
791
|
+
" of grid "+o.id;l("ondragleave");pui.dragDropInfo["target record number"]=o.Da;pui.dragDropInfo.text=n!=null?"ondragenter: Dragging row "+n+" of grid "+b.id:"ondragenter: Dragging element "+b.id;pui.dragDropInfo.text+=o.Da==0?" before row "+(o.Da+1)+" of grid "+o.id:" after row "+o.Da+" of grid "+o.id;l("ondragenter");clearTimeout(r);r=setTimeout(h,p+35)}}function g(B){var G=B.He;if(G==null)return{dom:B,id:B.id};else{B=B.as;var F=G.j-1+B-(G.h?1:0),D=F>0?F:0,E=G.isFiltered()?G.X:G.dataArray;if(F>
|
|
792
|
+
0&&E.length>0&&E[0]&&E[0].o!=null)D=F<E.length?E[F-1].o:E[E.length-1].o;return{dom:G.c,grid:G,id:G.c.id,row:B,Da:D}}}function l(B){var G=a[B];if(pui.$b(G)){pui.G=pui.Xn;pui.runLogic(G.routine)}else if(G!=null&&G!="")try{if(eval(G)==false)return false}catch(F){pui.Ea(F,B+" 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(B){if(w||A){B=ub(B);if(B.tagName=="TEXTAREA"||B.tagName=="INPUT")return true}return false};
|
|
793
|
+
if(typeof b.style.MozUserSelect!="undefined")b.style.MozUserSelect="none";var s=a["use proxy"]=="true",w=b.grid!=null,A=a["field type"]=="html container";if(w){s=true;setTimeout(function(){var B=b.grid.cells.length-1;if(!b.grid.ea()){var G=b.grid.dataArray;if(b.grid.isFiltered())G=b.grid.X;G=G.length-b.grid.j+1;if(B>G)B=G}if((a.cursor==null||a.cursor=="")&&!pui.pa)for(G=b.grid.h?1:0;G<=B;G++)for(var F=b.grid.cells[G],D=0;D<F.length;D++)F[D].style.cursor="move"},1)}if(window.PointerEvent)T(b,"pointerdown",
|
|
794
|
+
c);else{T(b,"mousedown",c);T(b,"touchstart",c)}};pui.errorScreen={};
|
|
794
795
|
pui.errorScreen.onload=function(){function b(){h=new XMLHttpRequest;h.addEventListener("error",c);h.addEventListener("load",a);h.open("POST",Wb("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",
|
|
795
796
|
["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!=
|
|
796
797
|
null){applyProperty("NewSessionButton","value",pui.getLanguageText("runtimeText","ok"));applyProperty("NewSessionButton","onclick","pui.click();");pui.appJob!=null&&typeof pui.appJob.appjoblogkey==="string"&&pui.appJob.appjoblogkey.length>0&&applyProperty("JobLogDownload","visibility","visible")}else{sessionStorage.removeItem("joblog");f=pui.get("ESAPPJOBLOGKEY");if(f.length>0)typeof saveAs=="function"?b():pui.loadJS({path:"/jszip/FileSaver.min.js",callback:b});else console.log("Cannot download job log without job key.")}pui.formatErrorText();
|
|
@@ -931,7 +932,7 @@ transparent:b.properties["chart overlay"]!="true",Se:c})}else if(g=="")b.dom.inn
|
|
|
931
932
|
a=pui.ld(b.properties);if(a!="")l+="&"+a}else l+="&q="+pui.yb.nf(s);l+="&maxcount="+c;if(pui["read db driven data as ebcdic"]!==true)l+="&UTF8=Y";if(f)l+="&isMap=Y";if(pui.isCloud)l+="&workspace_id="+pui.cloud.ws.id;var w=new pui.Ajax(g);w.method="post";w.async=true;w.postData=l;w.suppressAlert=true;w.onsuccess=function(){if(!Eb()){var B="invalid",G=Kb(w,"Run Charting Query");if(G)B=G;if(n!=null&&typeof n=="string"&&n!=""&&B.substr(0,45)=='<?xml version="1.0" encoding="utf-8"?><chart>')B='<?xml version="1.0" encoding="utf-8"?><chart>'.substr(0,
|
|
932
933
|
44)+" "+n+B.substr(44);pui.widgets.Of({dom:b.dom,kh:h,type:e,transparent:b.properties["chart overlay"]!="true",Se:B});B=b.evalProperty("ondbload");if(typeof B!="string"||B=="")B=null;if(B){var F=true;G||(F=false);pui.pf(B,F,b.dom.id)}}};w.send()}}else if(g!="")if(pui["legacy chart data url"]==true){g=g.replace(/&/g,"%26");pui.widgets.Of({dom:b.dom,kh:h,type:e,transparent:b.properties["chart overlay"]!="true",uq:g})}else Xb({url:g,method:"get",async:true,handler:function(B){pui.widgets.Of({dom:b.dom,
|
|
933
934
|
kh:h,type:e,transparent:b.properties["chart overlay"]!="true",Se:B})}});else if(l!="")Xb({url:l,method:"get",async:true,handler:function(B){pui.widgets.Of({dom:b.dom,kh:h,type:e,transparent:b.properties["chart overlay"]!="true",jsonData:B})}});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.yb.nf(s)}l+=
|
|
934
|
-
"&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(Wb("PUI0009102.PGM"));A.method="post";A.async=true;A.postData=l;A.suppressAlert=true;A.onsuccess=function(){var B=pui.widgets.ms(n),G=Kb(A,"Custom SQL query");if(!G||G.results==null){B=
|
|
935
|
+
"&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(Wb("PUI0009102.PGM"));A.method="post";A.async=true;A.postData=l;A.suppressAlert=true;A.onsuccess=function(){var B=pui.widgets.ms(n),G=Kb(A,"Custom SQL query");if(!G||G.results==null){B=Ua.pop();if(B!=null&&typeof B=="object")if(G=Bb(h))G.innerHTML='<ul style="overflow-y:auto; white-space:normal"><li>Chart operation: '+B.Fl+"<li>Id: "+B.id+"<li>Message: "+B.text+
|
|
935
936
|
"<li>"+B.um+"</ul>";else console.log(B)}else{for(var F=f?"id":"label",D=0,E=G.results.length;D<E;D++){var C=Object.keys(G.results[D]).length,K="",R="",N=0;for(var M in G.results[D]){N++;var W=G.results[D][M];if(N<C)K+=" "+W;else R=W}B+="<set "+F+'="'+pui.Yh(Lb(K))+'" value="'+pui.Yh(Lb(R))+'" />'}B+="</chart>";pui.widgets.Of({dom:b.dom,kh:h,type:e,transparent:b.properties["chart overlay"]!="true",Se:B})}};A.send()}}}}},width:function(b){b.dom.width=b.value;var a=typeof b.properties["map type"]!="undefined";
|
|
936
937
|
b.design&&pui.widgets.Lj(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.Lj(b.dom,b.properties["chart type"],a)},"chart type":function(b){b.design&&pui.widgets.Lj(b.dom,b.value)},"map type":function(b){b.design&&pui.widgets.Lj(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.$b(b.newValue))b.dom.La=
|
|
937
938
|
b.newValue.routine}}});pui.Jr=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}};
|
|
@@ -1155,31 +1156,31 @@ parseInt(d.k[d.k.length-2].style.top)}d.Xb();d.ec();v.hide()}var v=pui.designer.
|
|
|
1155
1156
|
1].style.left);d.n[d.n.length-1].Fa=parseInt(d.n[d.n.length-1].style.top);d.n[d.n.length-1].hb=parseInt(d.n[d.n.length-1].style.left);designUtils.vk(document,"mousemove",u);designUtils.vk(document,"mouseup",z);var H=d.c.e.designer;H.ca.start("Size Grid");H.selection.qn(["left","top","number of rows","header height","column widths"]);designUtils.Ee(q)}});d.b.appendChild(m);return m}function e(){var k="",m=d.mj["padding bottom"];if(m!=null&&m!="")k+="padding-bottom:"+m+";";m=d.mj["padding left"];if(m!=
|
|
1156
1157
|
null&&m!="")k+="padding-left:"+m+";";m=d.mj["padding right"];if(m!=null&&m!="")k+="padding-right:"+m+";";m=d.mj["padding top"];if(m!=null&&m!="")k+="padding-top:"+m+";";return k}function f(k){function m(){d.sc||B(k,false)}if(!pui.pa)k.style.cursor="pointer";T(k,"click",m);k.om=m}function h(k){function m(J,I){return parseInt(J,10)===I.w}function q(J,I){return J===I.fieldName}function u(J,I){return p(I.w)}var z=d.cells[0];if(d.Qi instanceof Array){n(d.Qi,m,u);d.ea()&&d.dataProps["load all rows"]!="true"?
|
|
1157
1158
|
B(null,k):s(null,true)}else if(d.Bg instanceof Array)if(d.ea()&&d.dataProps["load all rows"]!="true"){for(i=0;i<d.Bg.length;i++)d.Rs[i]=d.getColumnIndexFromFieldName(d.Bg[i]);n(d.Rs,m,u);B(null,k)}else{n(d.Bg,q,u);s(null,true)}else if(d.Bf!=null){if(z[d.Bf])d.ea()&&d.dataProps["load all rows"]!="true"?B(z[d.Bf],k):s(z[d.Bf],true)}else if(d.Ri!=null){var v=d.getColumnIndexFromFieldName(d.Ri);if(d.ea()&&d.dataProps["load all rows"]!="true")v!=null&&B(z[v],k);else v!=null&&s(z[v],true)}else return false;
|
|
1158
|
-
return true}function g(){if(
|
|
1159
|
+
return true}function g(){if(Va!=false){var k=R();if(k!=null)if(k.cols==null||k.cols!=Kc)N({});else return k}}function l(k,m,q){m=m&&d.ea();if(d.sortable&&!m&&d.c.gh==null&&d.c.qg==null){k=k.sort;if(k!=null)if(k.columnId!=null&&k.descending!=null){var u;for(m=0;m<d.cells[0].length;m++)if(d.cells[0][m].w==k.columnId){u=d.cells[0][m];u.ra=!k.descending;break}u&&q(u,true)}else if(k.multiSort instanceof Array){Sa=[];n(k.multiSort,function(z,v){return v.w===z.columnId},function(z){return z.descending});
|
|
1159
1160
|
q(null,true)}}}function o(){var k=g();if(k!=null){l(k,false,B);var m=k.filters;if(m!=null)for(var q=0;q<m.length;q++){var u=k.filters[q].text,z=d.cells[0][Ga(k.filters[q].column)];if(z==null)return;if(u!=null&&u!=""){d.Y.w=z.w;d.Y.col=z.col;d.Y.text=u;d.im(z);z.sa=u}else{d.Y.text=null;d.zj(z);z.sa=null}}}}function n(k,m,q){for(var u=d.cells[0],z=0;z<k.length;z++)for(var v=0;v<u.length;v++){var J=u[v];if(m(k[z],J)){J.ra=q(k[z],J);Sa.push(J);break}}}function r(k,m){Sa=[];n([k],function(q,u){return u.w==
|
|
1160
1161
|
q},function(){return m})}function p(k){var m=null;if(d.Ci.length==0)return false;m=d.Ci.length==1?d.Ci[0]:d.Ci[k];if(m==null)return false;if(m.length<1)return false;m=m.substr(0,1).toUpperCase();return m=="D"}function t(k){for(var m=d.cells[0],q=0;q<m.length;q++)m[q].ra=k?p(m[q].w):!p(m[q].w)}function s(k,m){d.Yb!=null&&d.Yb.hide();if(!(k==null&&Sa.length<1)){var q;if(k!=null){q=k.ra;t(false);if(q==null)q=k.ra;r(k.w,!q)}var u;if(pc!==undefined)try{u=new Function("value1, value2, fieldName, isDescending, fieldDateFormat, fieldFormat, multiFields",
|
|
1161
1162
|
pc)}catch(z){if(z){console.log("Sort function error: ");console.error(z)}}if(d.c.gh==null&&d.c.qg==null){if(k!=null)Lc=k.w;pui.Ud={};if(!d.hc)for(var v=0;v<d.dataArray.length;v++)d.dataArray[v].o=v+1;for(v=0;v<d.dataArray.length;v++)d.dataArray[v].En=v;d.hc=true;K();var J="",I=null,H={},L=null,S=function(O){if(typeof O.fieldName==="string")J=O.fieldName.toUpperCase();if(O.dateFormat)I=O.dateFormat;if(O.gs)H=O.gs};if(k!=null)S(k);else if(pc!==undefined||typeof pui.gridSort=="function"){L=[];for(v=
|
|
1162
|
-
0;v<Sa.length;v++){S(Sa[v]);L.push({fieldName:J,fieldDateFormat:I,fieldFormat:H})}}v=function(O,V){function U(
|
|
1163
|
-
Sa[ka];U(xa.Vj,xa.dataType,xa.fieldName);if(pc!==undefined||typeof pui.gridSort=="function"){L[ka].value1=ba;L[ka].value2=Z}if(!ja&&ba!=Z){q=!xa.ra;za=ba;
|
|
1164
|
-
0)return Z?1:-1;return 0};d.dataArray.sort(v);d.isFiltered()&&d.X.sort(v);w();d.j=1;if(d.mm>0&&m)for(v=0;v<d.dataArray.length;v++)if(d.dataArray[v].o==d.mm){d.j=v+1;if(d.At)d.sj=d.j;d.Bt||d.Fu(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;F(k,q)}else{G();C()}if(
|
|
1163
|
+
0;v<Sa.length;v++){S(Sa[v]);L.push({fieldName:J,fieldDateFormat:I,fieldFormat:H})}}v=function(O,V){function U(Ja,Na,Ca){ba=O[Ja];Z=V[Ja];if(Na=="zoned"||Na=="floating"){ba=Number(ba);Z=Number(Z)}else if(Na=="reference"){Ja=d.ref[Ca];if(Ja!=null)if(Ja.dataType==7||Ja.dataType==9||Ja.dataType==10){ba=Number(ba);Z=Number(Z)}}else if(Na=="graphic"){ba=pui.formatting.hh(ba);Z=pui.formatting.hh(Z)}}var ba,Z;if(k!=null)U(k.Vj,k.dataType,k.fieldName);else{for(var ja=false,za,La,ka=0;ka<Sa.length;ka++){var xa=
|
|
1164
|
+
Sa[ka];U(xa.Vj,xa.dataType,xa.fieldName);if(pc!==undefined||typeof pui.gridSort=="function"){L[ka].value1=ba;L[ka].value2=Z}if(!ja&&ba!=Z){q=!xa.ra;za=ba;La=Z;ja=true}}if(q==null)q=true;if(za!=null)ba=za;if(La!=null)Z=La}return typeof u=="function"?ca(u,ba,Z,J,q,I,H,L):typeof pui.gridSort=="function"?ca(pui.gridSort,ba,Z,J,q,I,H,L):q&&ba<Z||!q&&ba>Z?-1:ba==Z?q&&O.o<V.o||!q&&O.o>V.o?-1:1:1};var ca=function(O,V,U,ba,Z,ja,za,La){O=O(V,U,ba,Z,ja,za,La);if(typeof O!="number")O=0;if(O>0)return Z?-1:1;if(O<
|
|
1165
|
+
0)return Z?1:-1;return 0};d.dataArray.sort(v);d.isFiltered()&&d.X.sort(v);w();d.j=1;if(d.mm>0&&m)for(v=0;v<d.dataArray.length;v++)if(d.dataArray[v].o==d.mm){d.j=v+1;if(d.At)d.sj=d.j;d.Bt||d.Fu(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;F(k,q)}else{G();C()}if(Va&&!m){S={};if(k!=null){S.columnId=k.w;S.descending=k.ra}else if(Sa.length>0){S.multiSort=[];for(v=0;v<Sa.length;v++)S.multiSort.push({columnId:Sa[v].w,descending:Sa[v].ra})}N(S,"sort")}}}
|
|
1165
1166
|
function w(){for(var k=[],m=0;m<d.dataArray.length;m++)k[d.dataArray[m].En]=m;m=pui.Ib(d.Xa)+".";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.Vb=k[u.Vb]}}function A(){function k(m,q){return m.o>q.o?1:-1}G();E();d.j=1;if(d.ea()&&d.wa==false){d.Db="";d.mask();d.Jb()}else{d.dataArray.sort(k);d.isFiltered()&&d.X.sort(k);w()}d.d!=null&&d.d.type=="sliding"&&d.d.td(d.j);d.getData();d.clearState("sort")}function B(k,m){var q;d.Yb!=null&&d.Yb.hide();
|
|
1166
|
-
if(!(k==null&&Sa.length<1)){if(k!=null){var u=cb(k.w);Lc=k.w+u;q=k.ra;t(false);if(q==null)q=k.ra;q=!q;r(k.w,q);d.Db=k.w+1+u+(q?" DESC":"")}else for(var z=d.Db="",v=0;v<Sa.length;v++){q=Sa[v].ra;if(q==null)q=p(k.w);u=cb(Sa[v].w);d.Db+=z+(Sa[v].w+1+u)+(q?" DESC":"");z=", "}d.hc=true;if(!m){d.d!=null&&d.d.type=="sliding"&&d.d.td(1);d.j=1;d.mask();d.Jb();d.getData()}if(k!=null){k.ra=q;F(k,q)}else{G();C()}if(
|
|
1167
|
+
if(!(k==null&&Sa.length<1)){if(k!=null){var u=cb(k.w);Lc=k.w+u;q=k.ra;t(false);if(q==null)q=k.ra;q=!q;r(k.w,q);d.Db=k.w+1+u+(q?" DESC":"")}else for(var z=d.Db="",v=0;v<Sa.length;v++){q=Sa[v].ra;if(q==null)q=p(k.w);u=cb(Sa[v].w);d.Db+=z+(Sa[v].w+1+u)+(q?" DESC":"");z=", "}d.hc=true;if(!m){d.d!=null&&d.d.type=="sliding"&&d.d.td(1);d.j=1;d.mask();d.Jb();d.getData()}if(k!=null){k.ra=q;F(k,q)}else{G();C()}if(Va&&!m){if(k!=null){var J={};J.columnId=k.w;J.descending=k.ra}else if(Sa.length>0){J={};J.multiSort=
|
|
1167
1168
|
[];for(v=0;v<Sa.length;v++)J.multiSort.push({columnId:Sa[v].w,descending:Sa[v].ra})}N(J,"sort")}}}function G(){d.gc!=null&&d.gc.parentNode!=null&&d.gc.parentNode.removeChild(d.gc)}function F(k,m){E();k.setAttribute("sortorder",0);if(d.gc==null)d.gc=document.createElement("div");else d.gc.parentNode!=null&&d.gc.parentNode.removeChild(d.gc);d.gc.className=m?"grid-sort-arrow-descending":"grid-sort-arrow-ascending";D(k,d.gc)}function D(k,m){var q=k;if(q.firstChild!=null&&q.firstChild.tagName=="DIV")q=
|
|
1168
1169
|
q.firstChild;q.appendChild(m)}function E(){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 C(){E();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)){vb(q);d.lu()}};D(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=
|
|
1169
1170
|
{},m=0;m<d.aa.length;m++)k[d.aa[m]]=m;var q=pui.Ib(d.Xa)+".";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 v=pui.O[u][0];if(v!=null&&v.o!=null){var J;if(!d.hc&&v.Vb!=null)if(d.dataArray[v.Vb]&&d.dataArray[v.Vb].o!=undefined&&d.dataArray[v.Vb].o!==v.Vb)for(m=0;m<d.dataArray.length;m++){if(d.dataArray[m].o===v.o){J=d.dataArray[m];break}}else J=d.dataArray[v.Vb];else for(m=0;m<d.dataArray.length;m++)if(d.dataArray[m].o===
|
|
1170
1171
|
v.o){J=d.dataArray[m];break}if(J!=null){m=v.value;if(v.comboBoxWidget!=null)m=v.comboBoxWidget.getValue();if(v.l!=null)m=v.l.getValue();if(v.M!=null){m="";if(v.M.Kd&&v.M.Dh!=null)m=v.M.Dh;else if(!v.M.Kd&&v.M.Ch!=null)m=v.M.Ch}if(v.tagName=="INPUT"&&v.type=="checkbox")m=v.checked?v.checkedValue!=null&&v.checkedValue!=""?v.checkedValue:"1":v.uncheckedValue!=null&&v.uncheckedValue!=""?v.uncheckedValue:" ";if((v.isLoading==null||v.isLoading===false)&&v.modified===true){var I=v.N.value,H=v.N.revert;v.N.value=
|
|
1171
1172
|
m;v.N.revert=true;m=pui.tc.format(v.N);v.N.value=I;v.N.revert=H;if(typeof m=="object")m="";J[z]=m}}}}}}}function R(){var k=null;if(pui.Cg()&&localStorage[d.Ob]!=null||pui.Vo()&&sessionStorage[d.Ob]!=null||Qa&&pui.uj[d.Ob]!=null)try{k=nb==true?JSON.parse(sessionStorage[d.Ob]):Qa==true?JSON.parse(pui.uj[d.Ob]):JSON.parse(localStorage[d.Ob])}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}
|
|
1172
|
-
function N(k,m){var q;if(m==null)q=k;else{q=R();if(q==null)q={};q[m]=k}q.cols=Kc;d.Yd=JSON.stringify(q);if(
|
|
1173
|
+
function N(k,m){var q;if(m==null)q=k;else{q=R();if(q==null)q={};q[m]=k}q.cols=Kc;d.Yd=JSON.stringify(q);if(Va==true)if(nb==true)sessionStorage[d.Ob]=JSON.stringify(q);else if(Qa==true)pui.uj[d.Ob]=JSON.stringify(q);else localStorage[d.Ob]=JSON.stringify(q)}function M(k,m){if(!d.designMode){var q,u=d.ro[k],z=-1;if(m!=null){z=fe(d,m-(d.h?0:1));q=d.isFiltered()?d.X:d.dataArray}if(pui.$b(u)){var v=null,J=null;if(z>=0){v=z+1;if(q[z]!=null&&q[z].o!=null)v=q[z].o;J=d.Xa}pui.runLogic(u.routine,v,J)}else if(u!=
|
|
1173
1174
|
null&&u!="")try{pui.temporary_property=d;eval("var grid = pui.temporary_property;");pui.temporary_property=d.c;eval("var dom = pui.temporary_property;");eval("var row = arguments[1];");eval("var rowNumber = arguments[1];");pui.temporary_property=d.Pp;eval("var rowclicked = pui.temporary_property");pui.temporary_property=d.Qn;eval("var columnclicked = pui.temporary_property");k=="onrowclick"&&eval("var isRightClick = arguments[2];");arguments.length>=4&&eval("var event = arguments[3]");eval("var column = arguments[4];");
|
|
1174
1175
|
if(m!=null){d.h||(m-=1);pui.temporary_property=d.cells[m];eval("var rowCells = pui.temporary_property;")}if(z>=0){v=z+1;eval("rowNumber = "+v);if(q[z]!=null&&q[z].o!=null)v=q[z].o;eval("row = "+v);eval("var rrn = "+v)}delete pui.temporary_property;if(eval(u)==false)return false}catch(I){pui.Ea(I,k.substr(0,1).toUpperCase()+k.substr(1)+" Error:\n");return false}}}function W(k,m){var q=document.createElement("div");q.style.position="absolute";q.style.left="200px";q.style.top="200px";q.style.width="16px";
|
|
1175
|
-
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.dx;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 Q(){if(d.designMode)if(
|
|
1176
|
-
1].style.top)-20}else{m=d.pc("left");k=d.pc("top")-20}
|
|
1176
|
+
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.dx;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 Q(){if(d.designMode)if(Wa!=null)if(da!=null){var k=0,m=0;k=d.k.length;if(k>0){m=parseInt(d.k[k-1].style.left);k=parseInt(d.k[k-
|
|
1177
|
+
1].style.top)-20}else{m=d.pc("left");k=d.pc("top")-20}Wa.style.left=m+"px";Wa.style.top=k+"px";k-=14;da.style.left=m+"px";da.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}ia.style.left=m+"px";ia.style.top=k+"px";m-=14;va.style.left=m+"px";va.style.top=k+"px";m=d.pc("left")-2;k=d.pc("top")-2;Ba.style.left=m+"px";Ba.style.top=k+"px";m+=d.pc("width")-2;Ya.style.left=m+"px";Ya.style.top=k+"px";k+=d.pc("height")+
|
|
1177
1178
|
1;if(d.i.ng||d.i.wd||d.i.Qh||d.i.Rh||d.i.nm)k+=25;wa.style.left=m+"px";wa.style.top=k+"px";m=d.pc("left")-2;fa.style.left=m+"px";fa.style.top=k+"px"}}function ha(k){if(k==null)return false;var m=false;if(k.selected==null)if(d.Cb!=null){if(d.am==null)for(var q=0;q<d.aa.length;q++)if(pui.L(d.Cb.fieldName)==d.aa[q]){d.am=q;break}if(d.am!=null)if(k[d.am]==d.Nh)k.selected=true}if(k.selected==true)m=true;return m}function Y(k,m,q){if(!(!d.designMode&&m!=true)){if(!d.designMode&&m==true)d.c.parentNode.onselectstart=
|
|
1178
1179
|
X;if(q!=true&&k.style.cursor!="pointer")k.style.cursor="default";T(k,"mousedown",y)}}function X(k){if(d&&d.dragging){vb(k);return false}}function y(k){function m(O){O=pui.vg(O);var V=O.y-I,U=O.x-J;if(P=="dspf"&&d.designMode){V=Math.round(V*Ib.Fm);U=Math.round(U*Ib.Fm)}if(d.h&&u.row==0){if(tb==null){tb=u.cloneNode(true);tb.style.position="absolute";tb.style.border="1px solid #999999";tb.style.zIndex=d.it;Rb=document.createElement("div");Rb.className=d.c.className;Rb.style.borderColor="transparent";
|
|
1179
|
-
u.parentNode.parentNode.appendChild(Rb);Rb.appendChild(tb);tb.style.display="none";setTimeout(function(){if(tb!=null)tb.style.display=""},150)}tb.style.top=d.c.Fa+V+"px";var ba=parseInt(u.style.left);if(isNaN(ba))ba=u.getBoundingClientRect().left;tb.style.left=d.c.hb+ba+U+"px";var Z=null;if(V>-25&&V<parseInt(d.c.style.height))for(ba=0;ba<d.n.length;ba++){var ja=d.n[ba],za=parseInt(ja.style.left),
|
|
1180
|
-
|
|
1181
|
-
"none";
|
|
1182
|
-
Rb=tb=null}var O=false;if(
|
|
1180
|
+
u.parentNode.parentNode.appendChild(Rb);Rb.appendChild(tb);tb.style.display="none";setTimeout(function(){if(tb!=null)tb.style.display=""},150)}tb.style.top=d.c.Fa+V+"px";var ba=parseInt(u.style.left);if(isNaN(ba))ba=u.getBoundingClientRect().left;tb.style.left=d.c.hb+ba+U+"px";var Z=null;if(V>-25&&V<parseInt(d.c.style.height))for(ba=0;ba<d.n.length;ba++){var ja=d.n[ba],za=parseInt(ja.style.left),La=O.x;if(d.designMode&&P=="dspf")za=Math.round(za*Ib.Zh);La-=H.x;if(Math.abs(za-La)<15){if(Za!=null&&
|
|
1181
|
+
Za.parentNode!=ja.parentNode){Za.parentNode.removeChild(Za);Za=null}if(Za==null){Za=document.createElement("img");Za.src=pui.normalizeURL("/profoundui/proddata/images/grids/column-pointer.gif");Za.style.position="absolute";Za.style.zIndex=d.it+1;d.designMode?Ib.designer.b.appendChild(Za):document.body.appendChild(Za)}O=parseInt(ja.style.top)-10;ja=parseInt(ja.style.left)-4;O+=ca.y;ja+=ca.x;Za.style.display="";Za.style.top=O+"px";Za.style.left=ja+"px";Z=ba;Za.ql=Z;break}}if(Z==null&&Za!=null){Za.style.display=
|
|
1182
|
+
"none";Za.ql=null}}else{ba=d.c.e;if(ba!=null){pui.designer.QA(O.x,O.y,ba.designer);O=ba.designer.selection;if(O.su){U+=d.c.hb;V+=d.c.Fa;U=O.Tj(U,pui.vl);V=O.Tj(V,pui.wl,P=="genie"?3:0);U-=d.c.hb;V-=d.c.Fa}}d.Hc(function(ka){ka.style.top=ka.Fa+V+"px";ka.style.left=ka.hb+U+"px"});if(ba!=null)ba.moved=true;d.setScrollBar();O=pui.designer.wj;if(O.b==null){O.b=document.body;O.init()}O.set(d.c.e);O.show()}}function q(){d.dragging=false;if(tb!=null){tb.parentNode.removeChild(tb);Rb.parentNode.removeChild(Rb);
|
|
1183
|
+
Rb=tb=null}var O=false;if(Za!=null){Za.style.display="none";if(Za.ql!=null){var V=d.c.e;V!=null&&V.designer.ca.pn("Move Column",V.designer);d.moveColumn(u.col,Za.ql);if(d.ma){var U=d.ga.map(function(ja){if(ja.showing){var za=Ga(ja.columnId);ja.currentColumn=za;ja.savedColumn=za}else ja.currentColumn=-1;return ja}),ba=[];d.cells[0].forEach(function(ja){ba.push(ja.w)});U.Ai=ba;d.ga=U}O=true;Za.ql=null;if(Va){if(!ba){ba=[];for(V=0;V<d.cells[0].length;V++)ba.push(d.cells[0][V].w)}N(ba,"colSequence");
|
|
1183
1184
|
if(d.ma){if(V=g())if(V=V.hidableColState){V.cols=U;V.headings=d.columnHeadings}else V={cols:U,headings:d.columnHeadings};else V={cols:U,headings:d.columnHeadings};var Z=d.uf().split(",").map(function(ja){return Number(ja)});N(V,"hidableColState");N(Z,"colWidths");d.ga=U}}}}if(d.designMode){V=d.c.e;if(V!=null)if(V.moved){O=V.designer;if(O.$r!=null)d.xx();else{z&&O.Ge.style.display==""&&d.yx();O.nn();d.Xb();P=="dspf"&&pui.ide.refreshRibbon()}}else O||d.c.e.designer.ca.hy();d.ec();O=pui.designer.wj;
|
|
1184
1185
|
O!=null&&O.b!=null&&O.hide();designUtils.oA(d.c.e.designer)}ac(document,"mousemove",m);ac(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=P=="dspf"&&d.c.parentNode.getAttribute("container")=="true",v=pui.vg(k),J=v.x,I=v.y;if(d.designMode){d.c.e.designer.Ko();P=="dspf"&&Ext.menu.MenuMgr.hideAll();d.Le();if(pui.Be(k)){if(d.c.e){d.c.e.designer.Uw.hide();d.c.e.designer.Ny(k)}designUtils.Ee(k);k.stopPropagation&&k.stopPropagation();
|
|
1185
1186
|
return false}d.c.e!=null&&d.c.e.designer.Mp!=null&&d.c.e.designer.Mp.hide();if(d.Ff){designUtils.Ee(k);return}d.c.e.Wy.left=d.c.style.left;d.c.e.Wy.top=d.c.style.top;designUtils.pA(d.c.e.designer,false,z,false,true,J,I,d.c.e)}else d.Yb!=null&&!pui.Be(k)&&d.Yb.hide();d.dragging=true;d.Hc(function(O){O.hb=pui.Vd(O.style.left);O.Fa=pui.Vd(O.style.top)});var H={x:0,y:0};if(d.designMode){v=pui.Vc(d.c.e.designer.b,true);H.x+=v[0]}else{v=pui.runtimeContainer.getBoundingClientRect();if(typeof window.pageXOffset==
|
|
@@ -1187,14 +1188,14 @@ return false}d.c.e!=null&&d.c.e.designer.Mp!=null&&d.c.e.designer.Mp.hide();if(d
|
|
|
1187
1188
|
T(document,"mouseup",q);vb(k);if(d.designMode&&d.c.e!=null){d.c.e.moved=false;k=d.c.e.designer;S=k.selection;v="Move Selection";if(S.Sd.length==1)v="Move Grid";if(!(d.h&&u.row==0)){k.ca.start(v);k.ca.lp=true;S.qn(["left","top","parent tab panel","parent tab panel"]);k.ca.lp=false}}}function ea(k,m){for(var q=[],u=k.firstChild;u!=null;){u.style.position=="absolute"&&!u.Wo&&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 aa(k,
|
|
1188
1189
|
m,q,u){if(d.designMode||u){var z=k[m];if(d.borderWidth!==null&&d.borderWidth<pa){z.style.borderWidth="2px";if(!q)z.style.width=parseInt(z.style.width)+2+"px"}if(!q)z.style.borderTopStyle=fb;if(q)z.style.borderRightStyle=fb;if(q)z.style.cursor="w-resize";if(!q)k[m].style.cursor="n-resize";d.Le();T(z,"mousedown",function(v){function J(U){var ba=pui.vg(U);U=ba.y-S;ba=ba.x-L;if(P=="dspf"&&d.designMode){U=Math.round(U*Ib.Fm);ba=Math.round(ba*Ib.Fm)}na(ba,U,m,q,O,ca);if(!q&&m==k.length-1&&k.length>2&&d.d!=
|
|
1189
1190
|
null&&d.d.type=="sliding"){U=U;if(U<-d.la+5)U=-d.la+5;typeof d.d.cl=="function"&&d.d.cl(U)}d.designMode?H.set(d.c.e):d.alignColumnTotals()}function I(){z.dragging=false;d.dragging=false;var U=d.borderWidth;if(U===null||U<pa)U=pa;z.style.borderWidth=U+"px";z.style.borderColor=d.borderColor;if(!q)z.style.borderTopStyle=fb;if(q)z.style.borderRightStyle=fb;if(!q&&m==k.length-1&&(m>=2||d.h&&m==1)){U=parseInt(z.style.top);if(d.cells.length>(d.h?2:1)){d.Aj();if(U>parseInt(k[k.length-1].style.top)+d.la-3){for(var ba=
|
|
1190
|
-
false;parseInt(k[k.length-1].style.top)<U;){d.af();ba=true}ba&&d.Bh()}}else d.la=parseInt(k[k.length-1].style.top)-parseInt(k[k.length-2].style.top)}if(d.designMode){d.Xb();d.ec();H.hide()}else{d.alignColumnTotals();if(q&&
|
|
1191
|
+
false;parseInt(k[k.length-1].style.top)<U;){d.af();ba=true}ba&&d.Bh()}}else d.la=parseInt(k[k.length-1].style.top)-parseInt(k[k.length-2].style.top)}if(d.designMode){d.Xb();d.ec();H.hide()}else{d.alignColumnTotals();if(q&&Va){if(d.ma)U=d.uf().split(",").map(function(ja){return Number(ja)});else{U=Array(d.cells[0].length);for(ba=0;ba<d.cells[0].length;ba++){var Z=d.cells[0][ba];U[Z.w]=Z.clientWidth}}N(U,"colWidths")}}ac(document,"mousemove",J);ac(document,"mouseup",I)}if(d.designMode){var H=pui.designer.wj;
|
|
1191
1192
|
if(H.b==null){H.b=document.body;H.init()}H.set(d.c.e);if(m==0||m==k.length-1)H.show()}if(d.designMode){d.c.e.designer.Ko();if(d.Ff){designUtils.Ee(v);return}}else d.Yb!=null&&d.Yb.hide();z.dragging=true;d.dragging=true;var L=$c(v),S=ad(v),ca=parseInt(z.style.left),O=parseInt(z.style.top);d.Le();var V=3;if(d.borderWidth>3)V=d.borderWidth;z.style.borderWidth=V+"px";z.style.borderColor="#333333";if(!q)z.style.borderTopStyle="solid";if(q)z.style.borderRightStyle="solid";T(document,"mousemove",J);T(document,
|
|
1192
1193
|
"mouseup",I);vb(v);if(d.designMode){v=d.c.e.designer;q&&v.ca.start("Size Grid Column");q||v.ca.start("Size Grid Rows");v.selection.qn(["left","top","number of rows","row height","header height","column widths"])}});T(z,"mouseover",function(){if(!d.dragging){var v=3;if(d.borderWidth>3)v=d.borderWidth;z.style.borderWidth=v+"px";z.style.borderColor="#333333";if(!q)z.style.borderTopStyle="solid";if(q)z.style.borderRightStyle="solid"}});T(z,"mouseout",function(){if(!z.dragging){var v=d.borderWidth;if(v===
|
|
1193
1194
|
null||v<pa)v=pa;z.style.borderWidth=v+"px";z.style.borderColor=d.borderColor;if(!q)z.style.borderTopStyle=fb;if(q)z.style.borderRightStyle=fb}})}}function na(k,m,q,u,z,v){var J=pui["grid column resize style"]!=="simple";if(d.kd)J=false;var I;I=u?d.n:d.k;var H=I[q];if(u)m=0;u||(k=0);m=z+m;k=v+k;if(u){if(q>0&&k<parseInt(I[q-1].style.left)+5)k=parseInt(I[q-1].style.left)+5;if(q<I.length-1&&k>parseInt(I[q+1].style.left)-5)k=parseInt(I[q+1].style.left)-5}if(!u){if(q>0&&m<parseInt(I[q-1].style.top)+5)m=
|
|
1194
1195
|
parseInt(I[q-1].style.top)+5;if(q<I.length-1&&m>parseInt(I[q+1].style.top)-6)m=parseInt(I[q+1].style.top)-6}if(!u)H.style.top=m+"px";if(u){if(J&&q!=0){z=k-H.offsetLeft;for(v=q+1;v<I.length;v++){var L=I[v];L.style.left=L.offsetLeft+z+"px"}}H.style.left=k+"px"}if(!u&&(q!=0||!d.h)&&q!=I.length-1){d.la=q<I.length-1?parseInt(I[q+1].style.top)-parseInt(I[q].style.top):parseInt(I[q].style.top)-parseInt(I[q-1].style.top);H=m;for(v=q+1;v<I.length;v++){H+=d.la;I[v].style.top=H+"px"}H=m;m=0;if(d.h)m=1;for(v=
|
|
1195
1196
|
q-1;v>=m;v-=1){H-=d.la;I[v].style.top=H+"px"}if(d.h)I[0].style.top=parseInt(I[1].style.top)-d.cb+"px"}if(!u&&q==0&&d.h&&I.length>1)d.cb=parseInt(I[1].style.top)-parseInt(I[0].style.top);if(!u&&q==1&&!d.h&&I.length==2)d.la=parseInt(I[q].style.top)-parseInt(I[q-1].style.top);if(q==0&&u){d.c.style.left=k+"px";for(H=0;H<d.k.length;H++)d.k[H].style.left=d.c.style.left}if(u&&(I.length-1==q||q==0))sa();else J&&u&&sa();if(!u){ma();qa()}if(u&&d.h)d.ma?d.fc(d.ts(d.ga)):d.fc();d.Ma();Q();d.setScrollBar()}function ma(){d.c.style.top=
|
|
1196
|
-
d.k[0].style.top;for(var k=0;k<d.n.length;k++)d.n[k].style.top=d.c.style.top}function sa(){var k=0;if(d.n.length>0){k=d.borderWidth;if(k===null||k<pa&&d.designMode)k=pa;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(
|
|
1197
|
-
d.n.length;m++)d.n[m].style.height=k+"px";d.c.style.height=k+"px"}function
|
|
1197
|
+
d.k[0].style.top;for(var k=0;k<d.n.length;k++)d.n[k].style.top=d.c.style.top}function sa(){var k=0;if(d.n.length>0){k=d.borderWidth;if(k===null||k<pa&&d.designMode)k=pa;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(Va&&d.ea()&&d.dataProps["load all rows"]=="true"&&jb.style.display=="block"){d.mask();d.Jb()}}function qa(){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<
|
|
1198
|
+
d.n.length;m++)d.n[m].style.height=k+"px";d.c.style.height=k+"px"}function Ka(k,m){var q=document.createElement("div");d.c.appendChild(q);if(!pui.pa&&d.Er!="default")q.style.cursor=d.Er;if(k>0||!d.h)q.style.kz="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&&gb(q,u,z,m);q.onmouseover=function(v){if(!d.dragging){d.h||M("onrowmouseover",k+1,null,v,m);d.h&&k!=
|
|
1198
1199
|
0&&M("onrowmouseover",k,null,v,m);if(d.Oo)if(!(pui.is_touch&&!pui.is_mouse_capable&&!d.designMode||pui.pa))if(!(k==0&&d.h)){v=d.cells[k];var J=fe(d,k);d.$c(k,true,J);if(d.qu&&!d.expanded&&(k>0||!d.h)){v=v[0];if(d.Fb==null){d.Fb=document.createElement("img");d.Fb.setAttribute("isZoomIcon","true");d.Fb.src=pui.normalizeURL("/profoundui/proddata/images/icons/zoom_in.png");d.Fb.style.position="absolute";d.Fb.style.top="6px";d.Fb.style.left="3px";if(!pui.pa)d.Fb.style.cursor="pointer"}if(d.Fb.parentNode!=
|
|
1199
1200
|
v){d.Fb.parentNode!=null&&d.Fb.parentNode.removeChild(d.Fb);v.appendChild(d.Fb)}d.Fb.style.display="";d.Fb.onclick=function(I){d.rowZoom(d.cells[k]);vb(I)}}}}};q.onmouseout=function(v){d.h||M("onrowmouseout",k+1,null,v,m);d.h&&k!=0&&M("onrowmouseout",k,null,v,m);if(!(k==0&&d.h)){v=fe(d,k);d.$c(k,false,v)}};q.onmousedown=function(v){for(var J=document.getElementsByClassName("qf"),I=[],H=0;H<J.length;H++){var L=J[H];L.tagName=="INPUT"&&I.push(L)}for(J=0;J<I.length;J++)I[J].blur();if(pui.Be(v))if(!d.designMode){I=
|
|
1200
1201
|
function(U){if(!U)U=window.event;U.preventDefault&&U.preventDefault();U.stopPropagation&&U.stopPropagation();U.cancelBubble=true;U.returnValue=false;document.body.oncontextmenu=null;return false};if(d.h&&k==0){if(d.Yb==null){d.Yb=new pui.Ou;d.Yb.grid=d;d.Yb.init()}d.Yb.Rc=q;d.Yb.clickEvent=v?v:window.event;d.Yb.show();document.body.oncontextmenu=I}else{var S;if(d.Fd)S=Bb(d.Fd);if(S!=null){S.Sj=true;document.body.oncontextmenu=I;q.onclick(v);if(v.Nw&&v.Nw()||v.cancelBubble){S.Sj=false;d.Pi()}else{I=
|
|
@@ -1220,7 +1221,7 @@ d.Db}if(J){if(pui.Pa==null)pui.Pa={};if(pui.Pa[q]==null)pui.Pa[q]={};if(pui.Pa[q
|
|
|
1220
1221
|
"&VID="+pui.vId}if(pui.secLevel>0){H.postData+="&q="+encodeURIComponent(pui.Wc(d.c));L=d.dataProps["order by"];if(d.Db!=null)L=d.Db;if(L&&L!="")H.postData+="&order="+L;else if(Fb()=="mssql")H.postData+="&order=(select null)";if(I!="")H.postData+="&"+I}else H.postData+="&q="+pui.yb.nf(k);H.postData+="&limit="+m+"&start="+q;if(z!=null&&z==true)H.postData+="&getTotal=1";if(pui["read db driven data as ebcdic"]!==true)H.postData+="&UTF8=Y";z=d.dataProps["allow any select statement"];if(z!=null&&(z=="true"||
|
|
1221
1222
|
z==true))H.postData+="&FetchCounter=Y";if(pui.isCloud)H.postData+="&workspace_id="+pui.cloud.ws.id;H.onready=function(U){d.dataProps["load fields into widgets"]!="true"&&d.unMask();var ba,Z=false;if(d.dataProps["data transform function"]&&U.xf()==200)try{ba=eval("window."+d.dataProps["data transform function"])(U.yc())}catch(ja){pui.dp(ja)}else ba=Kb(U,"Run SQL SELECT Query");if(ba){if(J){if(pui.Pa[q]==null)pui.Pa[q]={};pui.Pa[q].sql=k;pui.Pa[q].nl=m;pui.Pa[q].start=q;pui.Pa[q].jw=v;pui.Pa[q].results=
|
|
1222
1223
|
ba.results;pui.Pa[q].totalRecs=ba.totalRecs;pui.Pa[q].Ux=I;pui.Pa[q].matchRow=ba.matchRow}if(u!=null)u(ba.results,ba.totalRecs,ba.matchRow);else V=ba.results;Z=true}kd&&pui.pf(kd,Z,d.c.id);d.sc=false};d.sc=true;H.send();if(u==null)return V}function Ga(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 yb(k){for(var m=[],q=0;q<d.aa.length;q++){var u=k[d.aa[q]];u||(u="");m.push(u)}return m}
|
|
1223
|
-
function
|
|
1224
|
+
function Xa(k,m){function q(S){var ca=String(S.w+1);if(ca.length>3)ca="000";else for(;ca.length<3;)ca="0"+ca;S=S.sa.substring(0,d.rf);if(S.length<d.rf)S+=" ".repeat(d.rf-S.length);z+=ca;v+=S;J++}var u=d.cells[0];if(!(typeof k.col!="number"||k.col<0||k.col>=u.length)){if(typeof m!="string")m="";var z="",v="",J=0;k.sa=m;m.length>0&&q(k);for(var I=0;I<u.length&&J<d.se;I++){var H=u[I].w,L=u[I].sa;typeof H=="number"&&H>=0&&H!=k.w&&typeof L=="string"&&L.length>0&&q(u[I])}rb(z,v)}}function rb(k,m){if(k.length<
|
|
1224
1225
|
3*d.se)k+=" ".repeat(3*d.se-k.length);d.rg=k+m;pui.Tk=d;pui.cc();pui.Tk=null}function qb(k){if(k==null||k=="")if(d.rg!=null&&d.rg!="")k=d.rg;else return;var m=d.cells[0];d.rg=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.rf+3*d.se;z=k.substring(z,z+d.rf);z=Pb(z);if(!isNaN(u)&&u>0&&z!=""){u-=1;for(var v=0;v<m.length;v++)if(m[v].w==u){m[v].sa=z;d.im(m[v]);break}}else break}}function sb(){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])}
|
|
1225
1226
|
function Fb(){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===""&&u["default"]===true||m===u.name)return u.driver}else if(typeof pui.dbDriver!=="undefined")return pui.dbDriver}function cb(k){var m=0;if(d.dataProps["custom sql"]!=null&&d.dataProps["custom sql"]!=""){userDefinedDataFields=pb(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);
|
|
1226
1227
|
if(q!=-1)m=q-k}}return m}function pb(k){for(var m=[],q=0;q<k.length;q++){var u=k[q];for(kb in u)if(kb.substr(0,17)==="user defined data"){var z=u[kb].fieldName;z!=null&&m.push(z.toUpperCase())}}return m}pui.$h.call(this);if(pui.designer.Mu!=null){this.pg=new pui.designer.Mu;this.pg.Gw=true}else{this.pg={};this.pg.Gw=true;this.pg.oz=oa();this.pg.zA=oa();this.pg.wA=oa();this.pg.yA=oa()}this.zi=true;this.C=[];this.wa=false;this.ref={};this.Xa="";this.n=[];this.k=[];this.c=null;this.Xc="";this.cells=
|
|
@@ -1228,11 +1229,11 @@ if(q!=-1)m=q-k}}return m}function pb(k){for(var m=[],q=0;q<k.length;q++){var u=k
|
|
|
1228
1229
|
"Verdana";this.I["font size"]="13px";this.I["text align"]="center";this.I["header font color"]="#ffffff";this.I["header background"]="#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(P=="genie")this.I["odd row font color"]="";this.I["odd row background"]="#efefef";this.I["even row font color"]="#555555";if(P=="genie")this.I["even row font color"]=
|
|
1229
1230
|
"";this.I["even row background"]="#fcfcfc";this.I["hover font color"]="#555555";this.I["hover background"]="#dfe8f6";this.I["hover image"]="";this.I["selection font color"]="#ffffff";this.I["selection background"]="#6699cc";this.I["selection image"]="";this.hf={};for(var kb in this.I)this.hf[kb]=this.I[kb];this.dataProps={};this.mj={};this.ro={};this.ko=this.dragging=this.Ff=this.designMode=false;this.Ww=96;this.uy=this.jz=97;this.dx=99;this.Or=100;this.sy=701;this.it=702;this.ds=this.totalRecs=this.d=
|
|
1230
1231
|
null;this.Pt=this.ma=this.tl=this.Bw=this.Hi=this.vo=this.qf=this.Rk=false;this.so=null;this.Ei=this.singleSelection=this.Wd=this.io=false;this.xe=this.Pb=this.ye=this.Cb=null;this.xg=this.Eu=false;this.Qe=this.Uf=null;this.wm="_____puiButtonToggleTreeLevel";this.am=this.Yk=this.ll=null;this.Nh="1";this.Mh=null;this.rf=20;this.se=3;this.Cj=this.Bj=this.Ej=this.Dj=this.rg=null;this.expanded=true;this.fl=this.dl=null;this.oc=1;this.qu=false;this.sj=this.uo=null;this.Ci=[];this.Bg=this.Qi=this.Pf=this.Fi=
|
|
1231
|
-
this.Pn=this.Ri=this.Bf=null;this.Rs=[];this.Fd=null;this.Ur=false;this.Po=1;this.ab=new pui.Lm(pui.runtimeContainer,this);this.Sk=null;this.Y={w:0,col:0,text:""};this.Nl=false;this.os=Ga;this.au=false;this.Yd=this.Ob=null;this.sv=ma;this.rv=qa;this.nv=Q;this.sc=this.Bt=this.At=this.Ws=false;var d=this,
|
|
1232
|
-
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++)aa(d.n,k,true);for(k=0;k<d.k.length;k++)aa(d.k,k,false);for(k=0;k<d.cells.length;k++)for(var m=0;m<d.cells[k].length;m++)Y(d.cells[k][m]);if(
|
|
1232
|
+
this.Pn=this.Ri=this.Bf=null;this.Rs=[];this.Fd=null;this.Ur=false;this.Po=1;this.ab=new pui.Lm(pui.runtimeContainer,this);this.Sk=null;this.Y={w:0,col:0,text:""};this.Nl=false;this.os=Ga;this.au=false;this.Yd=this.Ob=null;this.sv=ma;this.rv=qa;this.nv=Q;this.sc=this.Bt=this.At=this.Ws=false;var d=this,Wa,da,ia,va,Ba,Ya,fa,wa,pa=1,fb="solid",Va=false,nb=false,Qa=false,hc=false,ld=false,Kc,Lc,pc,tb,Rb,Za,zb=null,jb=null,Nb=null,de=false,hd=false,ee=false,sc,rc,tc,kd=null,Sa=[],$a=null,ab=null;this.po=
|
|
1233
|
+
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++)aa(d.n,k,true);for(k=0;k<d.k.length;k++)aa(d.k,k,false);for(k=0;k<d.cells.length;k++)for(var m=0;m<d.cells[k].length;m++)Y(d.cells[k][m]);if(Wa==null){Wa=W("plus","Add New Row");Wa.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.Bh();d.Xb();d.Le()}}if(da==null){da=W("minus","Remove Row");da.onclick=function(){if(d.cells.length>
|
|
1233
1234
|
(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.Aj();d.Xb();d.Le()}}}if(ia==null){ia=W("plus","Add New Column");ia.onclick=function(){var q=d.c.e;if(q.properties["number of columns"]>d.Ah)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.mn();d.Ma();d.Xb();d.Le()}}}if(va==null){va=W("minus","Remove Column");va.onclick=function(){var q=
|
|
1234
1235
|
d.n.length-2;if(!(q<1))if(d.Jo(q)){q=d.Bx(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"+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");
|
|
1235
|
-
d.Fp();d.Xb();d.Le()}}}if(Ba==null)Ba=c("nw");if(
|
|
1236
|
+
d.Fp();d.Xb();d.Le()}}}if(Ba==null)Ba=c("nw");if(Ya==null)Ya=c("ne");if(fa==null)fa=c("sw");if(wa==null)wa=c("se");d.c.Az=function(){if(d.designMode){if(Ba!=null)Ba.style.visibility="";if(Ya!=null)Ya.style.visibility="";if(fa!=null)fa.style.visibility="";if(wa!=null)wa.style.visibility=""}};d.c.Tr=function(){if(Ba!=null)Ba.style.visibility="hidden";if(Ya!=null)Ya.style.visibility="hidden";if(fa!=null)fa.style.visibility="hidden";if(wa!=null)wa.style.visibility="hidden"};d.clearData();d.visibility==
|
|
1236
1237
|
"hidden"&&d.Hc(function(q){q.style.visibility=""});if(P=="genie"&&d.Fd!=null)if(k=Bb(d.Fd)){k.style.visibility="";k.style.display=""}Q();d.setScrollBar();d.i.Lv(Y);d.ec()};this.Xb=function(k){var m;if(!k)if(d.designMode&&Ib.zh)return;if(d.kd){m=d.c.parentNode;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.uf().split(","),
|
|
1237
1238
|
z=0;for(m=0;m<u.length;m++){var v=u[m];v=Number(v);u[m]=v;z+=v}q=(q-z)/u.length;q=parseInt(q);for(m=0;m<u.length;m++)u[m]+=q;d.Rf(u);if(d.h)k-=d.cb;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.io=true;d.setNumberOfRows(k);d.io=false;var J=parseInt(d.c.style.left),I=parseInt(d.c.style.top);d.Hc(function(H){H.style.left=parseInt(H.style.left)-J+"px";H.style.top=parseInt(H.style.top)-I+"px"});d.setScrollBar();d.fc()}}};this.Ts=function(){if(d.oc<=1)return false;var k=d.dl;
|
|
1238
1239
|
if(d.fl==true)k=false;if(d.dl==null&&d.fl==false)k=true;if(k==null)k=false;return k};this.Fu=function(k){var m=d.cells.length;if(d.h)m-=1;if(d.Ts())m*=d.oc;d.j=parseInt((k-1)/m)*m+1};this.nx=function(){if(d.Uf===null)return false;var k=d.Cu;if(k===undefined)k=false;return k};this.collapse=function(k){if(d.expanded)if(!(d.oc<=1)){if(d.Ta!=null)d.Ta.style.display="none";d.expanded=false;var m=d.cells.length;if(d.h)m-=1;m*=d.oc-1;if(!d.Pe){d.setProperty("row height",parseInt(d.la/d.oc));for(var q=0;q<
|
|
@@ -1242,22 +1243,22 @@ k.title=pui.getLanguageText("runtimeText","collapseAll")}}};this.toggle=function
|
|
|
1242
1243
|
event.toElement;try{if(J!=null&&J.parentNode!=null){if(J.parentNode==d.Ta)return;if(J.parentNode.parentNode==d.Ta)return}}catch(I){}d.Ta.style.display="none"};d.c.parentNode.appendChild(d.Ta)}var m=parseInt(d.c.style.width);if(d.Cc||d.Mf)m-=21;d.Ta.style.width=m+"px";d.Ta.innerHTML="";d.Ta.className=d.c.className;d.Ta.classList.add("zoomrow");d.Ta.style.top=parseInt(d.c.style.top)+parseInt(k[0].style.top)-parseInt(d.la*(d.oc-1)/2)+"px";for(m=0;m<k.length;m++){var q=k[m].cloneNode(true);q.style.top=
|
|
1243
1244
|
"0px";q.style.height=parseInt(d.Ta.style.height)+2+"px";if(!pui.pa)q.style.cursor="pointer";for(var u=0;u<q.childNodes.length;u++){var z=q.childNodes[u];if(z.getAttribute("isZoomIcon")=="true")z.style.display="none";if(z.tagName=="INPUT"){var v=z.className;if(v==null)v=null;v+=" PR";z.className=Lb(v);z.readOnly=true}if(z.tagName=="SELECT")z.disabled=true}d.Ta.appendChild(q)}d.Ta.style.display=""}};this.exportXLSX=function(k){return d.exportCSV(k,true)};this.exportCSV=function(k,m){var q,u,z,v,J,I,
|
|
1244
1245
|
H,L,S,ca;if(!d.i.Xh&&(pui["csv exports xlsx"]===true||pui["csv exports xlsx"]==="true"))m=true;var O;if(typeof pui["csv separator"]=="string")O=pui["csv separator"];else{O=",";if(pui.appJob!=null&&(pui.appJob.decimalFormat=="I"||pui.appJob.decimalFormat=="J"))O=";"}var V='"';if(typeof pui["csv string delimiter"]=="string")V=pui["csv string delimiter"];if(!d.designMode){if(k==null)k=d.ds;if(k==null||k=="")k=d.c.id;if(d.ea()&&d.wa==false)m?d.zw(k):d.getData(k);else if(P=="genie"&&!pui.fa)pui.alert('In 5250 mode, the "csv export" feature requires an SQL-driven subfile.');
|
|
1245
|
-
else{k=encodeURIComponent(k);var U=[],ba=[],Z=[],ja=[],za=[],
|
|
1246
|
+
else{k=encodeURIComponent(k);var U=[],ba=[],Z=[],ja=[],za=[],La=[],ka=[],xa=[],Ja=[];K();S=d.n.length-1;if(d.ma&&!d.qf)S=d.ga.length;for(I=0;I<S;I++){U.push(-1);ba.push(false);Z.push(false);ja.push(false);za.push(false);La.push(false);ka.push(false);xa.push(-1);Ja.push(null)}var Na=0;I=0;for(S=d.C.length;I<S;I++){var Ca=d.C[I];if(Ca.visibility!="hidden"){q=Number(Ca.column);if(!isNaN(q)&&q>=0&&q<U.length&&U[q]==-1){Ja[q]=Ca;if(pui.p(Ca.visibility))ja[q]=Ca.visibility;H=Ca.value;if(Ca["radio button group"])H=
|
|
1246
1247
|
Ca["radio button group"];if(Ca["field type"]=="html container")H=Ca.html;if(Ca["field type"]=="image"&&m)H=Ca["image source"];if(Ca["field type"]=="hyperlink"){var Ea=Ca["hyperlink reference"];ka[q]={};if(pui.p(Ea)&&Ea.dataType!="indicator"&&Ea.dataType!="expression"){z=pui.L(Ea.fieldName);v=0;for(L=d.aa.length;v<L;v++)if(z==d.aa[v]){ka[q].ct=v;break}if(!pui.p(H)||H.dataType=="indicator"||H.dataType=="expression"){ka[q].value=H;H=Ea}}else if(Ea!=null&&Ea.length>0)ka[q].link=Ea}if(pui.p(H)&&H.dataType!=
|
|
1247
|
-
"indicator"&&H.dataType!="expression"){z=pui.L(H.fieldName);v=0;for(L=d.aa.length;v<L;v++)if(z==d.aa[v]){xa[q]=Ca.columnId;U[q]=v;Na++;if(H.formatting=="Number")ba[q]=true;za[q]=H;if(H.dataType=="graphic")Z[q]=true;if(m)if(Ca["field type"]=="image"){
|
|
1248
|
+
"indicator"&&H.dataType!="expression"){z=pui.L(H.fieldName);v=0;for(L=d.aa.length;v<L;v++)if(z==d.aa[v]){xa[q]=Ca.columnId;U[q]=v;Na++;if(H.formatting=="Number")ba[q]=true;za[q]=H;if(H.dataType=="graphic")Z[q]=true;if(m)if(Ca["field type"]=="image"){La[q]={left:2,top:2,height:16,width:16};if(Ca.domEls!=null&&Ca.domEls.length>0)for(v=0;v<Ca.domEls.length;v++)if(Ca.domEls[v]&&Ca.domEls[v].offsetWidth>0&&Ca.domEls[v].offsetHeight>0){La[q]={left:Ca.domEls[v].offsetLeft,top:Ca.domEls[v].offsetTop,height:Ca.domEls[v].offsetHeight,
|
|
1248
1249
|
width:Ca.domEls[v].offsetWidth};break}}else if(Ca["field type"]=="hyperlink")if(ka[q].value==null)ka[q].VA=true;break}}}}}if(d.ma&&!d.qf){ca=[];J=[];I=function(Ta){return Ta.columnId==u};q=0;for(S=xa.length;q<S;q++){u=xa[q];v="";L=100;if(u>=0)if(Ca=d.ga.find(I)){v=Ca.blankHeader?"":Ca.name;L=pui.Vd(Ca.orginalWidth)}J[q]=v;ca[q]=L}}xa="";var Ra,Jb,Oa;q=false;if(m){Ra=new pui.Em(Na);Jb=new pui.Dm(Ra);Ra.$n=d.la;Oa=[];if(!d.ma||d.qf)ca=d.uf().split(",");for(I=0;I<U.length&&I<ca.length;I++)U[I]>-1&&Oa.push(Number(ca[I]));
|
|
1249
1250
|
Ra.Rf(Oa);Oa=new pui.tq;for(I=Na=0;I<U.length;I++)if(U[I]>-1){nc(Ra,za[I],Na);Na++}}ca=0;if(d.h&&d.Rk){m&&mc(Ra);for(I=0;I<U.length;I++){H=U[I];if(H>-1){v="";v=d.ma&&!d.qf?J[I]:Oc(d.cells[0][I]);v=v.replace(/<br>/g," ");m&&oc(Ra,Pb(v),ca++);v=v.replace(/"/g,'""');v=v.replace("\n","");v=v.replace("\r","");if(xa!="")xa+=O;xa+=V+v+V}}if(m)Ra.th=d.cb}xa="\ufeff"+xa;J=d.dataArray;if(d.isFiltered())J=d.X;I=0;for(S=J.length;I<S;I++){Na="";Ca=J[I];if(!(Ca.rc!=null&&Ca.rc==true)){z={};if(Ca==null||Ca.length==
|
|
1250
1251
|
0)z.empty=true;else for(v=0;v<d.aa.length;v++)z[d.aa[v]]=Ca[v];m&&mc(Ra);v=ca=0;for(L=U.length;v<L;v++){H=U[v];if(H>-1){H=Ca[H];if(ka[v]!=null&&ka[v].value!=null)H=ka[v].value;if(Z[v]&&(d.dataProps==null||d.dataProps["load fields into widgets"]!=="true"))H=pui.formatting.hh(H);if(!m&&ba[v]&&pui.appJob!=null&&(pui.appJob.decimalFormat=="I"||pui.appJob.decimalFormat=="J")){if(typeof H!=="string")H=String(H);H=H.replace(".",",")}Ea=za[v];if(typeof Ea==="object"&&Ea!==null){var eb=Ea.formatting;if(eb===
|
|
1251
|
-
"Date"||eb==="Time"||eb==="Time Stamp")H=pui.R(Ea,z,d.ref)}if(ja[v]!==false)if(pui.R(ja[v],z,d.ref)=="hidden")H="";if(typeof pui["process export value"]==="function"){Ea=pui["process export value"]({value:H,"bound value formatting":Ea,"item properties":
|
|
1252
|
-
V;if(m){if(typeof
|
|
1252
|
+
"Date"||eb==="Time"||eb==="Time Stamp")H=pui.R(Ea,z,d.ref)}if(ja[v]!==false)if(pui.R(ja[v],z,d.ref)=="hidden")H="";if(typeof pui["process export value"]==="function"){Ea=pui["process export value"]({value:H,"bound value formatting":Ea,"item properties":Ja[v],"grid properties":d.c.pui.properties,"record number":I+1});if(Ea!=null)H=Ea}Ea=H;if(typeof Ea==="string"&&Ea.length>0)try{Ea=Ea.replace(/[^\x20-\x7E]/g," ")}catch(Cb){}if(typeof H==="string")H=H.replace(/"/g,'""');if(Na!="")Na+=O;Na+=V+Pb(H)+
|
|
1253
|
+
V;if(m){if(typeof La[v]=="object"&&La[v]!=null){q=true;oc(Ra,"",ca);typeof Ea==="string"&&Ea.length>0&&zc(Oa,Ra.nd,ca,Ea,La[v])}else{H=null;if(typeof ka[v]=="object"&&ka[v]!=null)if(ka[v].link!=null)H=ka[v].link;else if(ka[v].ct!=null)H=Ca[ka[v].ct];oc(Ra,Pb(Ea),ca,H)}ca++}}}if(xa!="")xa+="\n";xa+=Na}}if(m){if(q&&d.i.Lu){Ra.Hu=true;Jb.Uc=Oa;Jb.Jc=d.i;$d(d.i,pui.getLanguageText("runtimeMsg","downloading x",["..."]));d.i.$p()}gc(Jb,k)}else pui.Pk("text/csv",k+".csv",xa)}}};this.zw=function(k){function m(I){var H=
|
|
1253
1254
|
new XMLHttpRequest;H.open("POST",z,true);H.setRequestHeader("Content-type","application/x-www-form-urlencoded");var L={data:{}};L.append=function(V,U){L.data[V]=encodeURIComponent(U)};L.get=function(){var V="",U="";for(var ba in L.data){V+=U+ba+"="+L.data[ba];U="&"}return V};if(pui.ba)L.append("AUTH",pui.ba);else{L.append("AUTH",pui.appJob.auth);typeof pui.vId!=="undefined"&&L.append("VID",pui.vId)}L.append("q",encodeURIComponent(pui.Wc(d.c)));pui.ld(d.dataProps,null,L);L.append("limit",u);L.append("start",
|
|
1254
1255
|
"1");typeof d.Lc==="string"&&d.Lc.length>0&&d.Lc.substring(1).split("&").forEach(function(V){V=V.split("=");L.append(V[0],decodeURIComponent(V[1]))});pui["read db driven data as ebcdic"]!==true&&L.append("UTF8","Y");var S=d.dataProps["order by"];if(d.Db!=null)S=d.Db;if(S&&S!="")L.append("order",S);else Fb()=="mssql"&&L.append("order","(select null)");S=d.dataProps["allow any select statement"];if(S!=null&&(S=="true"||S==true))L.append("FetchCounter","Y");pui.isCloud&&L.append("workspace_id",pui.cloud.ws.id);
|
|
1255
1256
|
Zd(d.i,"cancel","cancel");$d(d.i,pui.getLanguageText("runtimeMsg","downloading x",["..."]));d.i.$p(pui.getLanguageText("runtimeMsg","cancelled"),function(){H.abort();d.unMask()});H.onreadystatechange=function(){if(!(H.readyState!=4||H.status==0))try{if(H.status!=200)throw"XMLHTTPRequest status: "+H.status;var V=eval("("+H.responseText+")");if(!V)throw"Failed";if(V.success!=true){if(V.errorText)throw"Failed: "+V.errorText;throw"Failed";}var U=V.response;if(U==null||U.results==null)throw"Invalid Response";
|
|
1256
1257
|
if(d.dataProps["data transform function"])try{U=eval("window."+d.dataProps["data transform function"])(H.responseText)}catch(ba){pui.dp(ba)}if(I!=null)U.fields=I;if(U.results.length>0)q(U);else{Zd(d.i,"","");$d(d.i,pui.getLanguageText("runtimeMsg","no data"));d.i.$p();ae(d.i)}d.unMask()}catch(Z){V=pui.getLanguageText("runtimeText","excel export text");console.warn(V,Z);pui.alert(V+":\n"+Z.toString());d.unMask();d.i.z()}};var ca=0,O=0;H.addEventListener("progress",function(V){var U=pui.wo(V.loaded,
|
|
1257
|
-
1),ba=V.timeStamp-ca;if(ca==0)ca=V.timeStamp;else if(ba>0){var Z=V.loaded/ba*1E3;ba=Math.round(ba/1E3);U+=" ("+pui.wo(Z,0)+"/s; "+ba+"s)";if(V.timeStamp-O<250)return}$d(d.i,pui.getLanguageText("runtimeMsg","downloading x",[U]));O=V.timeStamp});H.send(L.get());d.mask();d.Jb()}function q(I){function H(ka){return ka.field==L}var L,S,ca,O,V,U=[];if((d.tl||d.ma)&&Array.isArray(d.ga)&&d.ga.length>0){var ba=d.ga.filter(function(ka){return ka.showing||d.qf!=true});ba.sort(function(ka,xa){var
|
|
1258
|
-
if(
|
|
1259
|
-
var Z=new pui.Em(S);ba=new pui.Dm(Z);ba.Jc=d.i;I.fields!=null&&U.forEach(function(ka,xa){L=ka.fieldName;var
|
|
1260
|
-
undefined&&oc(Z,ca,S);else oc(Z,ca,S)}Z.th=d.cb}V=0;for(O=I.results.length;V<O;V++){mc(Z);ca=I.results[V];for(var ja=S=0,za=U.length;ja<za;ja++){L=U[ja];if(L!=null){var
|
|
1258
|
+
1),ba=V.timeStamp-ca;if(ca==0)ca=V.timeStamp;else if(ba>0){var Z=V.loaded/ba*1E3;ba=Math.round(ba/1E3);U+=" ("+pui.wo(Z,0)+"/s; "+ba+"s)";if(V.timeStamp-O<250)return}$d(d.i,pui.getLanguageText("runtimeMsg","downloading x",[U]));O=V.timeStamp});H.send(L.get());d.mask();d.Jb()}function q(I){function H(ka){return ka.field==L}var L,S,ca,O,V,U=[];if((d.tl||d.ma)&&Array.isArray(d.ga)&&d.ga.length>0){var ba=d.ga.filter(function(ka){return ka.showing||d.qf!=true});ba.sort(function(ka,xa){var Ja=ka.currentColumn;
|
|
1259
|
+
if(Ja<0)Ja=999+ka.columnId;var Na=xa.currentColumn;if(Na<0)Na=999+xa.columnId;return Ja-Na});S=0;for(V=ba.length;S<V;S++){O=ba[S];if(O.field)U.push({fieldName:O.field,name:O.blankHeader?"":O.name});else if(!O.field){O.field=d.C[S].value.fieldName;U.push({fieldName:O.field,name:O.blankHeader?"":O.name})}}}else for(L in I.results[0])U.push({fieldName:L,Hz:L});S=0;if(I.colWidths!=null){S=I.colWidths.length;ba=pb(d.C);S-=ba.length}else S=Object.keys(I.results[0]).length;if(U.length>0&&U.length<S)S=U.length;
|
|
1260
|
+
var Z=new pui.Em(S);ba=new pui.Dm(Z);ba.Jc=d.i;I.fields!=null&&U.forEach(function(ka,xa){L=ka.fieldName;var Ja=I.fields.find(H);nc(Z,Ja?{dataType:Ja.type,decPos:Ja.decPos}:{dataType:"char"},xa)});if(d.h&&d.Rk){S=0;mc(Z);if(d.ma){if(Array.isArray(d.ga)&&d.ga.length>0)for(V=U.length;S<V&&(O=U[S]);S++){L=O.fieldName;ca=(ca=d.ga.find(H))?ca.name:"";oc(Z,ca,S)}}else if(d.cells[0]instanceof Array&&d.cells[0].length>0)for(O=U.length;S<O;S++){ca=d.cells[0][S]?Pb(Oc(d.cells[0][S])):"";if(d.qf)d.cells[0][S]!==
|
|
1261
|
+
undefined&&oc(Z,ca,S);else oc(Z,ca,S)}Z.th=d.cb}V=0;for(O=I.results.length;V<O;V++){mc(Z);ca=I.results[V];for(var ja=S=0,za=U.length;ja<za;ja++){L=U[ja];if(L!=null){var La=ca[L.fieldName];if(La==null&&L.fieldName)La=ca[L.fieldName.toUpperCase()];if(d.qf)d.cells[0][S]!==undefined&&oc(Z,La,S,null,I.fields==null);else oc(Z,La,S,null,I.fields==null);S++}}}gc(ba,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=Wb("PUI0009102.PGM"),
|
|
1261
1262
|
v=d.dataProps["data url"];if(v=="")v=null;if(v){z=pui.df(v);if(typeof pui.vId!=="undefined")z+="&VID="+pui.vId;m()}else if(d.dataProps["database file"]&&d.dataProps["database file"].length>0){v="";var J=d.dataProps["database file"].split("/");if(J.length>1){v=J[0];J=J[1]}else J=J[0];cc({url:Wb("PUI0009101.pgm"),method:"post",params:{context:"genie",file:J,library:v,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,
|
|
1262
1263
|
handler:function(I){var H=null;if(I!=null&&I.fields!=null)H=I.fields;m(H)},suppressAlert:true,onfail:function(){console.log("Failed to fetch column data types for formatting. All cells in the XLSX file will contain character data.");m()}});d.mask();d.Jb()}else m()}};this.Jo=function(k){if(P=="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.Wo)return true;
|
|
1263
1264
|
u=u.nextSibling}return false};this.Bx=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],v=0;v<z.children.length;v++){var J=z.children[v].id;if(!(J==""||J==null)){J=" "+J;m.push(J)}}return m};this.Iw=function(){for(var k=[],m=d.c.e.designer.items,q=0;q<m.length;q++){var u=m[q];u.Tz()==d&&k.push(u)}return k};this.Do=function(){var k=d.k.length-1;if(d.h)k-=1;return k};this.Eg=function(k){if(!(P=="genie"&&!pui.fa))if(d.designMode){var m,
|
|
@@ -1271,26 +1272,26 @@ m++;var q=d.cells[m];setTimeout(function(){ua(q)},100)}},1)}};this.Ub=function()
|
|
|
1271
1272
|
if(d.j<1)d.j=1}}else{var m=d.dataArray;if(d.isFiltered())m=d.X;if(m.length<k&&d.d!=null){d.j=d.j-k+m.length;if(d.j<1)d.j=1}}if(d.Cc){d.d.td(d.j);if(pui.is_touch&&!pui.is_mouse_capable||pui.pa)d.getData()}else d.getData();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(){ua(u)},100)}},1)}};this.getRecNum=function(){return d.j};this.unMask=function(){if(zb!=null)zb.style.display="none";if(Nb!=null)Nb.style.display=
|
|
1272
1273
|
"none";if(jb!=null)jb.style.display="none"};this.Jb=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(zb==null)zb=document.createElement("div");zb.style.display="block";if(d.h){q+=d.cb;k-=d.cb}zb.style.left=m+"px";zb.style.top=q+"px";zb.style.width=u+"px";zb.style.height=k+"px";zb.className="pui-grid-loading";d.c.parentNode.appendChild(zb);d.Oy()}}};
|
|
1273
1274
|
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==null)jb=document.createElement("div");jb.style.display="block";if(d.h){q+=d.cb;k-=d.cb}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.Oy=function(){if(!(d.designMode||
|
|
1274
|
-
jb==null||jb.style.display=="none"))if(d.c.style.visibility!="hidden")if(d.c.parentNode!=null){var k=parseInt(zb.style.width)-2,m=parseInt(zb.style.height)-5;if(Nb==null)Nb=document.createElement("div");Nb.style.display="block";if(d.h)m-=d.cb;if(m>100){m=100;if(k<100)m=k-5}if(m<35)m=35;Nb.style.width=m+"px";Nb.style.height=m+"px";Nb.className="pui-animation pui-grid-animation";zb.appendChild(Nb)}};this.getData=function(k){function m(ka,xa,
|
|
1275
|
-
xa;d.saveFieldNames=d.aa;d.aa=[];d.X=[];d.clear(false);d.hc=false;d.dataProps["load all rows"]=="true"&&t(false);if(ka.length>=1){for(var Na in ka[0])d.aa.push(pui.L(Na));d.saveFieldNames=d.aa;for(xa=0;xa<ka.length;xa++){d.dataArray[xa]=[];d.X[xa]=[];var Ca=ka[xa],Ea=0;for(Na in Ca){var Ra=Ca[Na];d.dataArray[xa][Ea]=Ra;d.X[xa][Ea]=Ra;Ea++}}}d.wa=true;d.getData();if(d.dataProps["load all rows"]=="true"&&d.isFiltered()&&
|
|
1276
|
-
ka.filters[xa].column;Ea=ka.filters[xa].text;Ea==null||Ea==""?d.removeFilter(Ca):d.setFilter(Ca,Ea)}d.sc=true}}if(d.dataProps["load all rows"]=="true"&&d.h&&d.cells.length>0){ka=d.cells[0];for(xa=0;xa<ka.length;xa++)if(ka[xa].Vj)ka[xa].Vj=null;d.pl(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.Sa=d.totalRecs;
|
|
1277
|
-
true)}if(d.c.style.visibility!="hidden"&&d.d!=null){d.d.z();typeof d.d.rh=="function"&&d.d.rh()}d.zi=false}}function q(ka,xa,
|
|
1275
|
+
jb==null||jb.style.display=="none"))if(d.c.style.visibility!="hidden")if(d.c.parentNode!=null){var k=parseInt(zb.style.width)-2,m=parseInt(zb.style.height)-5;if(Nb==null)Nb=document.createElement("div");Nb.style.display="block";if(d.h)m-=d.cb;if(m>100){m=100;if(k<100)m=k-5}if(m<35)m=35;Nb.style.width=m+"px";Nb.style.height=m+"px";Nb.className="pui-animation pui-grid-animation";zb.appendChild(Nb)}};this.getData=function(k){function m(ka,xa,Ja){if(!(d==null||d.cells==null)){if(xa!=null)d.totalRecs=
|
|
1276
|
+
xa;d.saveFieldNames=d.aa;d.aa=[];d.X=[];d.clear(false);d.hc=false;d.dataProps["load all rows"]=="true"&&t(false);if(ka.length>=1){for(var Na in ka[0])d.aa.push(pui.L(Na));d.saveFieldNames=d.aa;for(xa=0;xa<ka.length;xa++){d.dataArray[xa]=[];d.X[xa]=[];var Ca=ka[xa],Ea=0;for(Na in Ca){var Ra=Ca[Na];d.dataArray[xa][Ea]=Ra;d.X[xa][Ea]=Ra;Ea++}}}d.wa=true;d.getData();if(d.dataProps["load all rows"]=="true"&&d.isFiltered()&&Va){ka=g();Na=ka.filters;if(Na!=null){d.sc=false;for(xa=0;xa<Na.length;xa++){Ca=
|
|
1277
|
+
ka.filters[xa].column;Ea=ka.filters[xa].text;Ea==null||Ea==""?d.removeFilter(Ca):d.setFilter(Ca,Ea)}d.sc=true}}if(d.dataProps["load all rows"]=="true"&&d.h&&d.cells.length>0){ka=d.cells[0];for(xa=0;xa<ka.length;xa++)if(ka[xa].Vj)ka[xa].Vj=null;d.pl(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.Sa=d.totalRecs;Ja>0&&d.d.td(d.j,
|
|
1278
|
+
true)}if(d.c.style.visibility!="hidden"&&d.d!=null){d.d.z();typeof d.d.rh=="function"&&d.d.rh()}d.zi=false}}function q(ka,xa,Ja){function Na(Gb){return Gb.columnId===Ra}if(!(d==null||d.cells==null)){if(xa!=null)d.totalRecs=xa;if(Ja>0){d.j=Ja;d.clearData()}xa=e();for(var Ca=Array(d.cells[0].length),Ea=0;Ea<d.cells[0].length;Ea++)Ca[d.cells[0][Ea].w]=Ea;if((d.tl||d.ma)&&ka.length>0&&d.ga.length){var Ra=0;for(var Jb in ka[0]){if(Ea=d.ga.find(Na))Ea.field=Jb;Ra++}}for(Ea=d.sf=0;Ea<ka.length;Ea++){if(d.sf==
|
|
1278
1279
|
0)d.sf=Ea+1+(d.j-1);d.Vi=Ea+1+(d.j-1);var Oa=ka[Ea],eb=0,Cb=d.cells[Ea+(d.h?1:0)];if(Cb!=null)for(Jb in Oa){var Ta=Cb.length;if(d.ma&&d.ga.length)Ta=d.ga.length;if(eb<Ta){Ta=Oa[Jb];var bc="";Ra=pui.secLevel>0?Ca[eb]:eb;if(d.ma){if(Ra==undefined){eb++;continue}if(d.I["text align"]){var Sb=d.I["text align"].split(",");if(Sb[eb])bc=" text-align:"+Sb[eb]}}else if(Cb[Ra].style.textAlign!=null&&Cb[Ra].style.textAlign!="")bc=" text-align:"+Cb[Ra].style.textAlign;if(pui.appJob.decimalFormat=="J"&&Ta.charAt(0)==
|
|
1279
|
-
","&&Ta.length>1&&!Number.isNaN(Number.parseInt(Ta.substring(1))))Ta="0"+Ta;Cb[Ra].innerHTML='<div style="'+xa+bc+'" class="dbd">'+Ta+"</div>";if(d.Y!=null&&d.Y.text!=""&&(Ra===d.Y.col||d.Y.col==="*all"))if(Cb[Ra].tagName=="DIV"){pui.Zk(Cb[Ra],d.Y.text);Cb[Ra].$k=true}}eb++}}ka=d.cells.length;if(d.h)ka-=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.Sa=d.totalRecs;
|
|
1280
|
+
","&&Ta.length>1&&!Number.isNaN(Number.parseInt(Ta.substring(1))))Ta="0"+Ta;Cb[Ra].innerHTML='<div style="'+xa+bc+'" class="dbd">'+Ta+"</div>";if(d.Y!=null&&d.Y.text!=""&&(Ra===d.Y.col||d.Y.col==="*all"))if(Cb[Ra].tagName=="DIV"){pui.Zk(Cb[Ra],d.Y.text);Cb[Ra].$k=true}}eb++}}ka=d.cells.length;if(d.h)ka-=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.Sa=d.totalRecs;Ja>0&&d.d.td(d.j,true)}if(d.c.style.visibility!=
|
|
1280
1281
|
"hidden"&&d.d!=null){d.d.z();typeof d.d.rh=="function"&&d.d.rh()}if(d.i!=null){d.i.Il=parseInt((d.j+ka*2-2)/ka)+d.Po-1;d.i.z()}d.zi=false}}function u(){var ka=null;if(d.xg&&d.Uf!==null){if(d.Pb)if(d.Pb.length<1&&d.kd)d.Pb=null;if(d.Pb==null){d.Pb=[];for(ka=0;ka<d.dataArray.length;ka++){var xa={kq:d.getDataValue(ka+1,d.Uf),Du:false};d.Pb.push(xa)}d.xe=new pui.wq;d.xe.load(d.Pb)}if(!d.Eu){d.Eu=true;d.Sr=null;ka=d.Sw();for(xa=0;xa<d.C.length;xa++)if(d.C[xa].columnId==ka){ka=d.C[xa].left;if(ka===undefined)ka=
|
|
1281
|
-
"10px";ka=ka.substring(0,ka.indexOf("px"));ka=parseInt(ka);d.Sr=ka;break}}ka=d.c.id;ka={id:ka+d.wm,"field type":"graphic button",left:"10px",top:"0px","css class":"pui-button-tree-level","icon position":"left",onclick:'myFunction = function (event, elem) {\n getObj("'+ka+'").grid.toggleTreeLevel(rrn);\n}\n\n',grid:ka,visibility:"visible"};ka.columnId=d.Qe;ka.column=ka.columnId.toString()}return ka}function z(ka){var xa=
|
|
1282
|
-
if(d.Pb[xa].Du)ka.icon="fontAwesome-solid:plus-square-tree-level";for(var
|
|
1282
|
+
"10px";ka=ka.substring(0,ka.indexOf("px"));ka=parseInt(ka);d.Sr=ka;break}}ka=d.c.id;ka={id:ka+d.wm,"field type":"graphic button",left:"10px",top:"0px","css class":"pui-button-tree-level","icon position":"left",onclick:'myFunction = function (event, elem) {\n getObj("'+ka+'").grid.toggleTreeLevel(rrn);\n}\n\n',grid:ka,visibility:"visible"};ka.columnId=d.Qe;ka.column=ka.columnId.toString()}return ka}function z(ka){var xa=La-1;ka.icon="fontAwesome-solid:minus-square-tree-level";ka.visibility="visible";
|
|
1283
|
+
if(d.Pb[xa].Du)ka.icon="fontAwesome-solid:plus-square-tree-level";for(var Ja=d.Pb[xa].kq,Na=0;Na<d.C.length;Na++)if(d.C[Na].columnId==ka.columnId){ka.column=d.C[Na].column;var Ca=d.Sr+(Ja-1)*10;ka.left=Ca+"px";d.C[Na].left=Ca+20+"px";break}if(xa+1>=d.Pb.length||d.Pb[xa+1].kq<=Ja)ka.visibility="hidden"}d.Pi();if(d.c.disabled!=true)if(!d.designMode){var v=d.cells.length;if(d.h)v-=1;if(!(v<1)){if(d.wa==false){if(d.ea()){if(!de){hd=de=true;h(true);hd=false}if(!ee){o();ee=true}}var J=d.dataProps["custom sql"],
|
|
1283
1284
|
I="";if(J==null||J==""){var H=d.dataProps["database file"],L=d.dataProps["database fields"],S=d.dataProps["selection criteria"];I=d.dataProps["order by"];if(d.Db!=null)I=d.Db;if(L!=null&&L!=""&&H!=null&&H!=""){J="SELECT "+L+" FROM "+H;if(S&&S!="")J+=" WHERE "+S;if(I&&I!="")J+=" ORDER BY "+I}}else if(d.Db!=null)J+=" ORDER BY "+d.Db}H=d.dataProps["data url"];if(H=="")H=null;if(J==null)J="";if(d.wa==false&&(J!=""||H!=null))if(k!=null){if(!(J==null||J=="")){var ca=",";v=".";var O='"';if(pui.appJob!=null&&
|
|
1284
|
-
(pui.appJob.decimalFormat=="I"||pui.appJob.decimalFormat=="J")){ca=";";v=","}if(typeof pui["csv separator"]=="string")ca=pui["csv separator"];if(typeof pui["csv string delimiter"]=="string")O=pui["csv string delimiter"];var V=document.createElement("form");V.action=Wb("PUI0009107.pgm");V.method="post";var U=function(ka,xa){var
|
|
1285
|
+
(pui.appJob.decimalFormat=="I"||pui.appJob.decimalFormat=="J")){ca=";";v=","}if(typeof pui["csv separator"]=="string")ca=pui["csv separator"];if(typeof pui["csv string delimiter"]=="string")O=pui["csv string delimiter"];var V=document.createElement("form");V.action=Wb("PUI0009107.pgm");V.method="post";var U=function(ka,xa){var Ja=Yb("input",ka);Ja.type="hidden";Ja.value=xa;V.appendChild(Ja)};pui.isCloud&&U("workspace_id",pui.cloud.ws.id);U("delimiter",ca);U("stringDelimiter",O===""?"*NONE":O);pui["read db driven data as ebcdic"]!==
|
|
1285
1286
|
true&&U("UTF8","Y");U("decType",v);U("fileName",k+".csv");if(pui.secLevel>0){U("q",encodeURIComponent(pui.Wc(d.c)));v={};pui.ld(d.dataProps,v);for(var ba in v)U(ba,encodeURIComponent(v[ba]));if(I&&I!="")U("order",I);else Fb()=="mssql"&&U("order","(select null)")}else U("q",pui.yb.nf(J));U("AUTH",pui.ba?pui.ba:pui.appJob.auth);pui.ba||typeof pui.vId!=="undefined"&&U("VID",pui.vId);if(d.h&&d.Rk){if(d.ma){var Z="";d.ga.forEach(function(ka){var xa=ka.name;if(ka.blankHeader)xa="";xa=xa.replace(/"/g,'""');
|
|
1286
1287
|
if(Z)Z+=ca;Z+=O+xa+O})}else{Z="";for(I=0;I<d.cells[0].length;I++){v=Oc(d.cells[0][I]);v=v.replace(/"/g,'""');if(Z!="")Z+=ca;Z+=O+v+O}}U("headings",Z)}typeof d.Lc==="string"&&d.Lc.length>0&&d.Lc.substring(1).split("&").forEach(function(ka){ka=ka.split("=");U(ka[0],decodeURIComponent(ka[1]))});document.body.appendChild(V);pui.skipConfirm=true;V.submit();setTimeout(function(){V.parentNode.removeChild(V);pui.skipConfirm=false},0)}}else{if(d.d!=null){if(d.d.type=="paging")d.d.Hb=d.j==1;d.c.style.visibility!=
|
|
1287
1288
|
"hidden"&&d.d.z()}var ja=d.j;if(sc!=null&&rc!=null&&tc>0)ja=tc;else d.clearData();var za=q;v=v;if(jb==null||jb.style.display=="none"){d.mask();d.Jb()}if(d.dataProps["load fields into widgets"]=="true"){za=m;if(d.dataProps["load all rows"]=="true")v=-1}P=="genie"?db(J,v,ja,za,d.totalRecs==null,H,false):db(J,v,ja,za,d.totalRecs==null,H,true)}else if(P=="dspf"||pui.fa){J=d.dataArray;if(d.isFiltered())J=d.X;if(!d.c.lf)d.c.lf=0;I=d.j;if(J[d.j-1]&&J[d.j-1].o!=null)I=J[d.j-1].o;d.c.Wt=I;if(d.uo!=null&&!d.Ws)pui.vm["toprrn."+
|
|
1288
1289
|
d.uo]=I;d.clearData();ba=d.h?1:0;k=d.j+v-1;if(d.wa==false&&J.length<k&&(d.isFiltered()||d.d!=null)){d.j=d.j-k+J.length;if(d.j<1)d.j=1;k=J.length}d.bx();I=d.j;if(d.wa==true&&d.dataProps["load all rows"]!="true"){I=1;k=v}H=u();d.sf=0;d.ll=null;for(I=I;I<=k;I++){if(d.Fs)ja=d.Fs[I-1];ja||(ja={});L={};za=J[I-1];if(za==null||za.length==0)L.empty=true;else for(S=0;S<d.aa.length;S++)L[d.aa[S]]=za[S];if(d.dataProps["load fields into widgets"]=="true"){L.__pui_show=true;L.__pui_skipdecode=true}za=d.Wd||d.Dj!=
|
|
1289
|
-
null||d.Bj!=null;if(L.empty!=true){var
|
|
1290
|
-
null){L=pui.Ib(d.Xa)+"."+pui.L(d.ye.fieldName)+"."+
|
|
1290
|
+
null||d.Bj!=null;if(L.empty!=true){var La=J[I-1].o;if(La==null)La=I;za&&d.$c(ba,false,I-1);H!==null&&z(H);if(d.sf==0)d.sf=La;d.Vi=La;pui.Hp({designMode:false,name:pui.Ib(d.Xa),metaData:{items:d.C},data:L,Es:ja,ref:d.ref,errors:d.errors,Fj:ba,o:La,Vb:I-1,Y:d.Y,lq:H});if(d.Wd&&d.Cb!=null){L=pui.Ib(d.Xa)+"."+pui.L(d.Cb.fieldName)+"."+La;if(pui.O[L]==null){J[I-1].selection={modified:false,type:"grid selection",value:d.Cb.dataType=="indicator"?"0":" ",o:La,N:d.Cb};pui.O[L]=[];pui.O[L].push(J[I-1].selection)}}if(d.ye!=
|
|
1291
|
+
null){L=pui.Ib(d.Xa)+"."+pui.L(d.ye.fieldName)+"."+La;if(pui.O[L]==null){J[I-1].ze={modified:false,type:"grid hidden field",value:"0",o:La,N:d.ye};pui.O[L]=[];pui.O[L].push(J[I-1].ze)}}}else za&&d.$c(ba);ba++}if(za&&k<v)for(ja=k+1;ja<=v;ja++)d.$c(ja);if(d.xg&&d.Uf!==null&&d.ll!==null){ja=Bb(d.c.id+d.wm+"."+d.ll);ja!==null&&ja.focus()}if(d.ea()&&d.dataProps["load all rows"]!="true"){d.sf+=d.j-1;d.Vi+=d.j-1}if(d.d!=null&&d.d.type=="sliding")d.d.Sa=d.wa&&d.dataProps["load all rows"]!="true"?d.totalRecs:
|
|
1291
1292
|
J.length;if(d.c.style.visibility!="hidden"&&d.d!=null){d.d.z();typeof d.d.rh=="function"&&d.d.rh()}if(d.i!=null){d.i.Il=parseInt((d.j+v*2-2)/v)+d.Po-1;d.i.z()}d.zi=false;d.unMask()}}}};this.clearData=function(){if(!d.zi){var k;if(d.d!=null)k=d.d.Au;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.Jh=true;d.c.appendChild(z)}else u.removeChild(z);z=u.firstChild}d.zi=true}};this.bx=function(){for(var k in d.qq)d.qq[k].ax()};
|
|
1292
|
-
this.destroy=function(){d.Fd&&ac(document,"click",d.Pi);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!=null&&d.k[k].parentNode.removeChild(d.k[k]);d.d!=null&&d.d.destroy();d.i!=null&&d.i.destroy();d.Yb!=null&&d.Yb.destroy();Ba!=null&&Ba.parentNode.removeChild(Ba);
|
|
1293
|
-
da!=null&&da.parentNode.removeChild(da);ia!=null&&ia.parentNode.removeChild(ia);va!=null&&va.parentNode.removeChild(va);
|
|
1293
|
+
this.destroy=function(){d.Fd&&ac(document,"click",d.Pi);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!=null&&d.k[k].parentNode.removeChild(d.k[k]);d.d!=null&&d.d.destroy();d.i!=null&&d.i.destroy();d.Yb!=null&&d.Yb.destroy();Ba!=null&&Ba.parentNode.removeChild(Ba);Ya!=null&&Ya.parentNode.removeChild(Ya);fa!=null&&fa.parentNode.removeChild(fa);wa!=null&&wa.parentNode.removeChild(wa);Wa!=null&&Wa.parentNode.removeChild(Wa);
|
|
1294
|
+
da!=null&&da.parentNode.removeChild(da);ia!=null&&ia.parentNode.removeChild(ia);va!=null&&va.parentNode.removeChild(va);Za!=null&&Za.parentNode.removeChild(Za);ab=$a=Sa=Za=null;try{Zb(this);d=null}catch(m){}};this.uf=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.Rf=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=
|
|
1294
1295
|
d.Wr,z=q-1;if(z<k.length)u=pui.Vd(k[z],50);m+=u;d.n[q].style.left=m+"px"}sa();d.designMode&&d.Ma();Q();d.setScrollBar();d.fc();d.ec(true)}};this.Le=function(){if(!d.io)if(d.designMode){var k=d.c.e;if(k!=null){k.designer.Cf.update();var m=k.designer.selection;if(m.Sd.length==1&&m.Sd[0].e==k)d.ec();else{m.clear();m.add(k);d.ec(true)}}}};this.ec=function(k){if(d.designMode)if(!Ib.zh){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"]!==
|
|
1295
1296
|
"#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 v=false;v=ce(d,m,"number of rows",u)||v;v=ce(d,m,"number of columns",z)||v;v=ce(d,m,"row height",d.la)||v;v=ce(d,m,"header height",d.cb)||v;v=ce(d,m,"column widths",d.uf())||v;v=ce(d,m,"left",d.c.style.left)||v;v=ce(d,m,"top",d.c.style.top)||v;v=ce(d,m,"height",q)||v;if(v=ce(d,m,"width",d.c.style.width)||v){m.designer.fp();P==="dspf"&&pui.ide.refreshRibbon()}if(v||
|
|
1296
1297
|
k)m.designer.ob.refresh()}}};this.fc=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 v=q[u],J=false,I=null;if(d.designMode==false){if(v.nc!=null){J=true;d.zj(v)}if(v.Zc!=null){I=v.Zc;I.parentNode!=null&&I.parentNode.removeChild(I)}}if(d.columnHeadings.length<=u)v.innerHTML="";else{var H="";if(v.style.textAlign!=null&&v.style.textAlign!="")H=" text-align:"+v.style.textAlign;var L="<div";if(d.Oc)L+=' class="qf"';L+=' style="'+m+H+'">';if(d.ma&&k&&k[u])L+=
|
|
@@ -1321,8 +1322,8 @@ if(d.k.length<=k)return;q=parseInt(d.k[k].style.top);for(k=k+1;k<d.k.length;k++)
|
|
|
1321
1322
|
0;q<k;q++)ea(d.cells[1][q],d.cells[0][q]);d.Bh()}if(d.k.length>1){d.k[0].style.top=parseInt(d.k[1].style.top)-d.la+"px";ma();qa();d.designMode&&d.Ma();Q();d.setScrollBar()}d.designMode&&d.sd()}if(!d.h&&(m==true||m=="true"||m=="")){d.cells.length<=1&&d.af();d.h=true;if(P=="dspf"||pui.fa){k=d.n.length-1;for(q=0;q<k;q++)ea(d.cells[0][q],d.cells[1][q]);d.Bh()}if(d.k.length>1){d.k[0].style.top=parseInt(d.k[1].style.top)-d.cb+"px";ma();qa();d.designMode&&d.Ma();Q();d.setScrollBar()}d.sd();d.fc()}break;
|
|
1322
1323
|
case "show quick filters":d.Oc=m==true||m==="true";if(d.Oc){if(!d.h){d.Wm=d.h;d.setProperty("has header","true")}if(d.ii==null)d.ii=d.cb;ie(d)}else{if(d.ii!=null){d.cb=d.ii;delete d.ii;ie(d)}if(d.Wm===false){delete d.Wm;d.setProperty("has header","false")}}d.fc();break;case "column widths":d.Rf(m);break;case "column headings":if(!pui.p(m)&&!pui.Kb(m))d.columnHeadings=pui.ha(m);d.fc();if(!d.designMode&&!d.ma&&d.ga instanceof Array)for(k=0;k<d.ga.length&&k<d.columnHeadings.length;k++)d.ga[k].name=d.columnHeadings[k];
|
|
1323
1324
|
if(d.ma){d.ga=[];d.setProperty("hide columns option",true)}break;case "sortable columns":d.sortable=m=="true";P=="genie"&&d.pl();if(d.xg)d.sortable=false;break;case "default sort order":if(!d.designMode)d.Ci=m==null?[]:m.split(",");break;case "initial sort column":if(!d.designMode){d.Bf=parseInt(m);if(isNaN(d.Bf))d.Bf=null;if(typeof m==="string"){d.Qi=m.split(",");if(d.Qi.length<=1)d.Qi=null}}break;case "initial sort field":if(!d.designMode){d.Ri=m.trim();if(typeof m==="string"){d.Bg=m.split(",");
|
|
1324
|
-
if(d.Bg.length<=1)d.Bg=null}}break;case "resizable columns":if(!d.designMode&&(m==true||m=="true")){this.my=ld=true;for(k=0;k<d.n.length;k++)aa(d.n,k,true,true)}break;case "movable columns":if(!d.designMode&&d.h&&(m==true||m=="true")){this.tl=hc=true;k=d.cells[0];if(k==null){d.af();k=d.cells[0];if(k==null){d.af();k=d.cells[0]}}for(q=0;q<k.length;q++)Y(k[q],true)}break;case "persist state":if(m=="true"||m==true)
|
|
1325
|
-
nb=d.designMode==false&&pui.Vo()}else if(m==="program only"){
|
|
1325
|
+
if(d.Bg.length<=1)d.Bg=null}}break;case "resizable columns":if(!d.designMode&&(m==true||m=="true")){this.my=ld=true;for(k=0;k<d.n.length;k++)aa(d.n,k,true,true)}break;case "movable columns":if(!d.designMode&&d.h&&(m==true||m=="true")){this.tl=hc=true;k=d.cells[0];if(k==null){d.af();k=d.cells[0];if(k==null){d.af();k=d.cells[0]}}for(q=0;q<k.length;q++)Y(k[q],true)}break;case "persist state":if(m=="true"||m==true)Va=d.designMode==false&&pui.Cg();else if(m==="session only"){Va=d.designMode==false&&pui.Vo();
|
|
1326
|
+
nb=d.designMode==false&&pui.Vo()}else if(m==="program only"){Va=d.designMode==false;Qa=true}break;case "expand to layout":k=m==true||m=="true";if(k!=d.kd){d.kd=k;if(d.kd)if(d.designMode){d.Xb();d.c.e.properties["expand to layout"]="true";d.c.e.pb["expand to layout"]=true;d.c.e.designer.ob.Kh("expand to layout")}}break;case "find option":d.vo=m==true||m=="true";break;case "filter option":d.Hi=m==true||m=="true";break;case "filter by value option":d.Bw=m==true||m=="true";break;case "hide columns option":d.ma=
|
|
1326
1327
|
m==true||m=="true";u=d.n.length-1;z=d.uf().split(",").map(function(I){return Number(I)});for(k=0;k<u;k++){q=d.columnHeadings[k];var v=false;if(!q||typeof q==="string"&&!q.trim()){q="Column "+(k+1);v=true}q={name:q,columnId:k,currentColumn:k,width:z[k],orginalWidth:z[k],showing:true,blankHeader:v};d.ga.push(q)}break;case "reset option":d.Pt=m==true||m=="true";break;case "export option":d.so=m==true||m=="true"?true:m==false||m=="false"?false:null;break;case "export only visible columns":d.qf=m==true||
|
|
1327
1328
|
m=="true"?true:false;break;case "context menu id":if(!d.designMode){ac(document,"click",d.Pi);k=Lb(m);if(k!="")d.Fd=k;if(pui.is_touch){d.c.onselectstart=ya(false);if(typeof d.c.style.MozUserSelect!="undefined")d.c.style.MozUserSelect="none";if(typeof d.c.style.webkitUserSelect!="undefined")d.c.style.webkitUserSelect="none"}T(document,"click",d.Pi)}break;case "show paging controls":d.i.wd=m==true||m=="true";if(d.designMode){d.i.z();Q()}break;case "show page number":d.i.Qh=m==true||m=="true";if(d.designMode){d.i.z();
|
|
1328
1329
|
Q()}break;case "initial page number":k=Number(m);if(isNaN(k))k=1;d.i.Il=k;d.Po=k;if(d.designMode){d.i.z();Q()}break;case "show record number range":d.i.Rh=m==true||m=="true";if(d.designMode){d.i.z();Q()}break;case "show bar":d.i.nm=m==true||m=="true";if(d.designMode){d.i.z();Q()}break;case "page down condition":d.i.ut=m;break;case "subfile end":d.uu=m==true||m=="true";break;case "page up condition":d.i.vt=m;break;case "page up response":if(m!=null&&m!=""){d.i.oj=true;d.i.sp=true}break;case "page down response":if(m!=
|
|
@@ -1334,7 +1335,7 @@ q;if(parseInt(d.n[k-1].style.left)+5>q)q=parseInt(d.n[k-1].style.left)+5;if(P===
|
|
|
1334
1335
|
5;u=0;if(d.h)u=1;for(k=k-1;k>=u;k-=1){q-=d.la;d.k[k].style.top=q+"px"}if(d.h)d.k[0].style.top=parseInt(d.k[1].style.top)-d.cb+"px"}ma();qa();d.designMode&&d.Ma();Q();d.setScrollBar();d.ec();break;case "z index":m=parseInt(m);if(isNaN(m))m="";d.c.style.zIndex=m;d.i!=null&&d.i.position();break;case "border color":d.yy(m);break;case "border width":d.zy(m);break;case "padding bottom":case "padding left":case "padding right":case "padding top":d.mj[k]=m;d.fc();break;case "visibility":d.visibility=m;if(!d.designMode){d.Hc(function(I){I.style.visibility=
|
|
1335
1336
|
m});if(d.d!=null)m=="hidden"?d.d.hide():d.d.z()}if(d.designMode)if(m=="hidden"){d.c.style.filter="alpha(opacity=30)";d.c.style.opacity=0.3}else{d.c.style.filter="";d.c.style.opacity=""}break;case "locked in place":d.Ff=m==true||m=="true"?true:false;break;case "css class":if(d.designMode){d.Xc=m;d.Cc&&d.d.fm(m)}d.i!=null&&d.i.fm(m);break;case "css class 2":case "css class 3":case "css class 4":case "css class 5":case "css class 6":case "css class 7":case "css class 8":case "css class 9":break;case "tool tip":d.c.title=
|
|
1336
1337
|
m;break;case "parent tab panel":case "parent tab":case "parent field set":break;case "onrowclick":case "onrowdblclick":case "onrowmouseover":case "onrowmouseout":case "onpagedown":case "onpageup":case "onscroll":case "onfilterchange":d.ro[k]=typeof q=="undefined"?m:q;break;case "ondbload":kd=m;break;case "propagate scroll events":d.Nl=m===true||m==="true"?true:false;break;case "sort function":if(m)pc=m;break;case "grid row translation placeholders":break;case "grid row translation placeholder key":break;
|
|
1337
|
-
case "grid row translation placeholder value":break;case "row clicked":break;case "column clicked":break;case "subfile program message queue":d.Ws=true;break;default:if(typeof k==="string"&&k.substr(0,17)==="user defined data")break;pui.alert("Grid property not handled: "+k)}}};this.Hc=function(k){for(var m=0;m<d.n.length;m++){var q=d.n[m];k(q)}for(m=0;m<d.k.length;m++){q=d.k[m];k(q)}k(d.c);
|
|
1338
|
+
case "grid row translation placeholder value":break;case "row clicked":break;case "column clicked":break;case "subfile program message queue":d.Ws=true;break;default:if(typeof k==="string"&&k.substr(0,17)==="user defined data")break;pui.alert("Grid property not handled: "+k)}}};this.Hc=function(k){for(var m=0;m<d.n.length;m++){var q=d.n[m];k(q)}for(m=0;m<d.k.length;m++){q=d.k[m];k(q)}k(d.c);Wa!=null&&k(Wa);da!=null&&k(da);ia!=null&&k(ia);va!=null&&k(va);Ba!=null&&k(Ba);Ya!=null&&k(Ya);fa!=null&&k(fa);
|
|
1338
1339
|
wa!=null&&k(wa)};this.gm=function(k){k=fe(d,k);if(k>=0){var m=d.isFiltered()?d.X:d.dataArray;if(!d.c.Yt)d.c.lf=m[k]==null||m[k].length==0?0:m[k].o!=null?m[k].o:k+1}};this.setCursorRecordNumber=function(k){if(typeof k=="number"&&k>0&&k<9999)d.c.lf=k};this.zt=function(k){var m=d.sj;d.sj=null;if(m!=null){m=m-d.j;if(!(m<0)){d.h&&m++;if(!(m>d.cells.length-1)){var q=d.cells[m];k==true?setTimeout(function(){ua(q)},1):ua(q)}}}};this.Ky=function(){for(var k=0;k<d.dataArray.length;k++){var m=d.dataArray[k];
|
|
1339
1340
|
m=m;var q=false;if(m.rc==null)if(d.ye!=null){if(d.Yk==null)for(var u=0;u<d.aa.length;u++)if(pui.L(d.ye.fieldName)==d.aa[u]){d.Yk=u;break}if(d.Yk!=null)if(m[d.Yk]=="1"&&!m.rc)q=m.rc=true}if(q){d.Mb=0;d.X=[];for(u=0;u<d.dataArray.length;u++){m=d.dataArray[u];if(m.o==null)m.o=u+1;d.Mj(m);!m.te&&!m.rc&&d.X.push(m);m.rc&&d.Mb++}}}d.X=[];for(k=d.Mb=0;k<d.dataArray.length;k++){m=d.dataArray[k];if(m.o==null)m.o=k+1;d.Mj(m);!m.te&&!m.rc&&d.X.push(m);m.rc&&d.Mb++}};this.isRowSelected=function(k){k=b(k,true);
|
|
1340
1341
|
return ha(k)};this.getSelectedRows=function(){var k=[],m=d.dataArray;if(d.isFiltered())m=d.X;for(var q=0;q<m.length;q++)if(ha(m[q])){var u=q+1;if(typeof d.hc!="undefined"&&d.hc===true||d.isFiltered())u=m[q].o;k.push(u)}return k};this.$c=function(k,m,q){function u(ca,O,V){if(O==null)O="";else{var U=O.split(",");if(U.length>1)O=V<U.length?U[V]:U[0]}ca.style.color=O;if(P=="genie"&&!pui.fa)for(V=0;V<ca.childNodes.length;V++)ca.childNodes[V].style.color=O}function z(ca,O,V){if(O==null)O="";else{var U=
|
|
@@ -1350,7 +1351,7 @@ true,u);if(d.j!=null&&!isNaN(d.j)&&d.j>0)d.Mh=k+d.j-1+(d.h?0:1)}}else if((d.sing
|
|
|
1350
1351
|
null&&d.dataProps["data url"]!=""||d.dataProps["database file"]!=null&&d.dataProps["database file"]!=""?true:false};this.yy=function(k){if(!k)k=d.borderColor;for(var m=0;m<d.n.length;m++)d.n[m].style.borderRightColor=k;for(m=0;m<d.k.length;m++)d.k[m].style.borderTopColor=k;d.borderColor=k};this.zy=function(k){if(k==null)k=d.borderWidth;k=parseInt(k);if(isNaN(k)||k<pa&&d.designMode)k=pa;for(var m=0;m<d.n.length;m++)d.n[m].style.borderRightWidth=k+"px";for(m=0;m<d.k.length;m++)d.k[m].style.borderTopWidth=
|
|
1351
1352
|
k+"px";d.borderWidth=k;sa();d.setScrollBar()};this.hide=function(){d.Hc(function(k){k.style.visibility="hidden"});d.d!=null&&d.d.hide();d.i!=null&&d.i.hide()};this.No=function(){d.Pe=true;if(d.h){for(var k=1;k<d.cells.length;k++)for(var m=0;m<d.cells[k].length;m++)d.cells[k][m].style.display="none";for(k=2;k<d.k.length;k++)d.k[k].style.display="none";for(k=0;k<d.n.length;k++)d.n[k].style.display="none";d.d!=null&&d.d.hide();d.i!=null&&d.i.hide()}else d.hide()};this.show=function(){d.Hc(function(u){u.style.visibility=
|
|
1352
1353
|
""});var k=false,m=d.c.e;if(m!=null){var q=m.designer.selection;if(q.Sd.length==1&&q.Sd[0].e==m)k=true}!k&&d.c.Tr&&d.c.Tr();d.setScrollBar()};this.mn=function(k){var m=d.n.length,q=document.createElement("div");q.className="grid-vline";if(d.Xc!="")q.className+=" "+d.Xc+"-vline";if(!d.designMode)q.He=d;q.style.position="absolute";var u=parseInt(d.c.style.left);if(m>0)u=parseInt(d.n[m-1].style.left)+d.Wr;q.style.left=u+"px";q.style.top=d.c.style.top;u=0;if(d.k.length>0)u=parseInt(d.k[d.k.length-1].style.top)-
|
|
1353
|
-
parseInt(d.c.style.top);q.style.height=u+"px";u=d.borderWidth;if(u===null||u<pa&&d.designMode)u=pa;q.style.borderRightStyle="solid";q.style.borderRightWidth=u+"px";q.style.borderRightColor=d.borderColor;q.style.fontSize="0px";q.style.padding="0px";q.style.zIndex=d.jz;q.oncontextmenu=ya(false);d.b.appendChild(q);d.n[m]=q;sa();aa(d.n,m,true);if(m>0){m=m-1;for(q=1;q<d.k.length;q++){u=
|
|
1354
|
+
parseInt(d.c.style.top);q.style.height=u+"px";u=d.borderWidth;if(u===null||u<pa&&d.designMode)u=pa;q.style.borderRightStyle="solid";q.style.borderRightWidth=u+"px";q.style.borderRightColor=d.borderColor;q.style.fontSize="0px";q.style.padding="0px";q.style.zIndex=d.jz;q.oncontextmenu=ya(false);d.b.appendChild(q);d.n[m]=q;sa();aa(d.n,m,true);if(m>0){m=m-1;for(q=1;q<d.k.length;q++){u=Ka(q-1,m);u.w=d.ma&&(k||k==0)?k:m;Y(u)}}Q();d.setScrollBar()};this.removeColumn=function(k){d.ma?d.hideColumn(k):d.Np(k)};
|
|
1354
1355
|
this.Np=function(k){if(d.n.length-2<1)pui.alert(pui.getLanguageText("runtimeMsg","cannot rmv last col"));else{if(d.designMode)k=k;else{k=Ga(k);if(k<0){pui.alert(pui.getLanguageText("runtimeMsg","cannot find col"));return}}d.moveColumn(k,d.cells[0].length);d.Fp();d.Xb();d.Le()}};this.Fp=function(){var k=d.n.length;if(!(k<=0)){k-=1;d.n[k].parentNode.removeChild(d.n[k]);d.n[k]=null;d.n.splice(k,1);if(k>0)for(var m=0;m<d.cells.length;m++){d.cells[m][k-1].parentNode.removeChild(d.cells[m][k-1]);d.cells[m][k-
|
|
1355
1356
|
1]=null;d.cells[m].splice(k-1,1)}sa();Q();d.setScrollBar()}};this.moveColumn=function(k,m,q){function u(O,V,U,ba){if(O>V){if(U>V&&U<O)ba-=1;if(U==V)ba=O-1}if(V>O){if(U>=O&&U<V)ba+=1;if(U==V)ba=O}return ba}for(var z=0;z<d.cells.length;z++){var v,J=v=d.cells[z][k];if(d.cells[z].length>m){var I=d.cells[z][m];J.parentNode&&I&&I.parentNode&&J.parentNode.insertBefore(J,I)}else{var H=d.cells[z][d.cells[z].length-1];J.parentNode&&I&&I.parentNode&&J.parentNode.insertBefore(J,H.nextSibling)}d.cells[z].splice(m,
|
|
1356
1357
|
0,v);v=k;m<=k&&v++;d.cells[z].splice(v,1);for(J=0;J<d.cells[z].length;J++){v=d.cells[z][J];v.col=J}}for(z=1;z<d.n.length-1;z++)d.n[z].style.left=pui.Vd(d.n[z-1].style.left)+pui.Vd(d.cells[0][z-1].style.width)+"px";if(d.designMode){var L=false,S=d.c.e,ca=JSON!=null&&typeof JSON.parse=="function"&&typeof JSON.stringify=="function";z=function(O){var V=S.properties[O];if(!(V==null||V==""||pui.p(V))){var U=pui.Kb(V);if(U){if(!ca)return;var ba=JSON.parse(V.designValue)}else ba=V.split(",");if(!(ba.length==
|
|
@@ -1358,7 +1359,7 @@ this.Np=function(k){if(d.n.length-2<1)pui.alert(pui.getLanguageText("runtimeMsg"
|
|
|
1358
1359
|
z("font size");z("font style");z("font weight");z("letter spacing");z("text align");z("text decoration");z("text transform");z("word spacing");z("header font family");z("header font size");z("header font style");z("header font weight");z("header text align");z("header font color");z("header background");z("column headings");I=d.c.e.properties["column headings"];if(pui.Kb(I)&&ca)d.columnHeadings=JSON.parse(I.designValue);else{if(I==null||typeof I!="string")I="";d.columnHeadings=I.split(",")}z("odd row font color");
|
|
1359
1360
|
z("odd row background");z("even row font color");z("even row background");z("row font color");z("row background");z("column widths");if(L){S.designer.fp();S.designer.ob.refresh();P=="dspf"&&pui.ide.refreshRibbon()}}d.Ma();if(!d.designMode){if(d.ea()){z=d.dataProps["database fields"];if(z!=null&&z!=""){z=z.split(",");z.splice(m,0,z[k]);v=k;m<=k&&v++;z.splice(v,1);d.dataProps["database fields"]=z.join(",")}}if(d.C.length>0)for(z=0;z<d.C.length;z++){S=d.C[z];I=J=Number(S.column);I=d.ma&&q?S.columnId==
|
|
1360
1361
|
q.columnId?m:J>=m&&J<k+1?I+1:u(m,k,J,I):u(m,k,J,I);if(J!=I)S.column=String(I)}d.columnHeadings.splice(m,0,d.columnHeadings[k]);v=k;m<=k&&v++;d.columnHeadings.splice(v,1);d.alignColumnTotals()}};this.af=function(){var k=d.k.length,m=document.createElement("div");m.className="grid-hline";if(d.Xc!="")m.className+=" "+d.Xc+"-hline";if(!d.designMode)m.He=d;m.style.position="absolute";m.style.left=d.c.style.left;var q=parseInt(d.c.style.top);if(k>0){q=d.la;if(k==1&&d.h)q=d.cb;q=parseInt(d.k[k-1].style.top)+
|
|
1361
|
-
q}m.style.top=q+"px";q=0;if(d.n.length>0){q=d.borderWidth;q=parseInt(d.n[d.n.length-1].style.left)-parseInt(d.c.style.left)+q}m.style.width=q+"px";q=d.borderWidth;if(q<pa&&d.designMode)q=pa;if(q!==null)m.style.borderTopWidth=q+"px";m.style.zIndex=d.Ww;if(d.c.style.visibility=="hidden")m.style.visibility="hidden";m.oncontextmenu=ya(false);d.b.appendChild(m);d.k[k]=m;qa();aa(d.k,k,false);if(k>0)for(m=1;m<d.n.length;m++){q=m-1;var u=
|
|
1362
|
+
q}m.style.top=q+"px";q=0;if(d.n.length>0){q=d.borderWidth;q=parseInt(d.n[d.n.length-1].style.left)-parseInt(d.c.style.left)+q}m.style.width=q+"px";q=d.borderWidth;if(q<pa&&d.designMode)q=pa;if(q!==null)m.style.borderTopWidth=q+"px";m.style.zIndex=d.Ww;if(d.c.style.visibility=="hidden")m.style.visibility="hidden";m.oncontextmenu=ya(false);d.b.appendChild(m);d.k[k]=m;qa();aa(d.k,k,false);if(k>0)for(m=1;m<d.n.length;m++){q=m-1;var u=Ka(k-1,q);u.w=q;Y(u)}Q();d.setScrollBar()};this.Aj=function(){var k=
|
|
1362
1363
|
d.k.length;if(!(k<=0)){k-=1;d.k[k].parentNode.removeChild(d.k[k]);d.k[k]=null;d.k.splice(k,1);k=d.cells.length-1;if(k>=0){for(var m=d.cells[k].length-1;m>=0;m-=1){d.cells[k][m].parentNode.removeChild(d.cells[k][m]);d.cells[k][m]=null;d.cells[k].splice(m,1)}d.cells.splice(k,1)}qa();Q();d.setScrollBar()}};this.alignColumnTotals=function(){var k=0;if(d.h)k=1;k=d.cells[k];for(var m=0;m<k.length;m++)for(var q=k[m],u=q.children,z=0;z<u.length;z++){var v=u[z],J=v.id;J=J.split(".")[0]+"_total";J=Bb(J);if(J!=
|
|
1363
1364
|
null)J.style.left=parseInt(d.c.style.left)+parseInt(q.style.left)+parseInt(v.style.left)+"px"}};this.scrollToRow=function(k){k=parseInt(k,10);if(isNaN(k))console.log("scrollToRow cannot parseInt:",k);else{if(k<1)k=1;if(d.Cc)d.d.td(k);else{d.j=k;d.getData()}return d.getRRN(k)}};this.setNumberOfRows=function(k){d.setProperty("number of rows",String(k));d.Ma();d.sd();d.Rt||d.getData()};this.render=function(){d.Ma();d.sd();d.fc();d.Pe&&d.No()};this.refresh=function(){d.j=1;d.totalRecs=null;d.wa=false;
|
|
1364
1365
|
if(d.Cc)d.d.Sa=d.totalRecs;pui.Pa=null;d.getData()};this.getRecordCount=function(){var k;k=d.ea()?d.totalRecs:d.dataArray.length;if(k==null)k=0;return k};this.expandTreeLevel=function(k){if(k===0)d.xe.expandAll();else{var m=d.Pb[k-1].node;je(d.xe,m)}d.Ql(m)};this.collapseTreeLevel=function(k){if(k===0)d.xe.collapseAll();else{var m=d.Pb[k-1].node;ke(d.xe,m)}d.Ql(m)};this.toggleTreeLevel=function(k){k=d.Pb[k-1].node;var m=d.xe;if(k.Gd==="expanded"){ke(m,k);k.Gd="collapsed"}else{je(m,k);k.Gd="expanded"}d.Ql(k)};
|
|
@@ -1375,9 +1376,9 @@ null&&pui.L(u.longName)==k)){q=Number(q.column);if(q!=null&&!isNaN(q))return q}}
|
|
|
1375
1376
|
d.ab.vc.placeholder=m;be(d.ab,k);if(d.ea())d.ab.interval=250;d.Qj(k);d.Y.w=k.w;d.Y.col=k.col;d.ab.show();d.ab.clear();d.ab.focus()}};this.clearHighlighting=function(){d.Y.text="";d.getData()};this.find=function(k,m,q){if(!d.sc){var u=d.Sk,z=k,v=m;if(typeof k=="number"){u=d.cells[0][Ga(k)];if(u==null)return;z=m;v=q;d.Y.w=u.w;d.Y.col=u.col;d.Qj(u)}d.Y.text="";if(z=="")d.getData();else if(d.ea()&&d.wa==false){sc=d.Y.text=z;rc=u.w+1;tc=1;if(v)tc=d.j+1;d.mask();d.Jb();d.getData();tc=rc=sc=null}else{q=
|
|
1376
1377
|
0;if(v)q=d.j;v=z.toLowerCase();k=u.Ij;var J=false;m=d.dataArray;if(d.isFiltered())m=d.X;for(q=q;q<m.length;q++){for(var I=0;I<k.length;I++){var H=m[q][k[I]];if(u.pui&&u.pui.formats&&u.pui.formats[I]!=null&&typeof u.pui.formats[I]=="object"){u.pui.formats[I].value=H;H=pui.tc.format(u.pui.formats[I])}if(H.toLowerCase().indexOf(v)>=0){d.Y.text=z;J=q+1;if(d.j!=J)if(d.d!=null&&d.d.type=="sliding")d.d.td(J,false)===false&&d.getData();else if(d.i){I=d.getRecordCount()-d.Do()+1;J>I?d.scrollToRow(I):d.scrollToRow(J)}else d.getData();
|
|
1377
1378
|
else d.getData();J=true;break}}if(J)break}J||d.getData()}}};this.startFilter=function(k){if(typeof k=="number")k=d.cells[0][Ga(k)];if(k!=null){d.Sk=k;d.ab.type=d.ak()?"pgfilter":"filter";d.ab.Lf=d.nw;var m=pui.getLanguageText("runtimeText","filter text")+"...";d.ab.vc.placeholder=m;d.Oc||be(d.ab,k);if(d.ea())d.ab.interval=250;d.Qj(k);d.Y.w=k.w;d.Y.col=k.col;if(!d.Oc){d.ab.show();d.ab.clear()}if(k.sa!=null&&k.sa!=""){d.ab.setText(k.oh?"":k.sa);d.Y.text=k.sa;d.getData()}if(d.Oc)(k=k.querySelector("input.qf"))&&
|
|
1378
|
-
k.focus();else d.ab.focus()}};this.nw=function(k){var m=d.Sk;k==""?d.removeFilter(m):d.setFilter(m,k)};this.setFilter=function(k,m){if(!d.sc){var q=false;if(k==="*all"){q=true;k=d.cells[0][0]}else!d.cells[0][0].nc&&d.cells[0][0].oh&&d.removeFilter(d.cells[0][0]);if(typeof k=="number")k=d.cells[0][Ga(k)];if(k!=null){if(d.ak())return
|
|
1379
|
+
k.focus();else d.ab.focus()}};this.nw=function(k){var m=d.Sk;k==""?d.removeFilter(m):d.setFilter(m,k)};this.setFilter=function(k,m){if(!d.sc){var q=false;if(k==="*all"){q=true;k=d.cells[0][0]}else!d.cells[0][0].nc&&d.cells[0][0].oh&&d.removeFilter(d.cells[0][0]);if(typeof k=="number")k=d.cells[0][Ga(k)];if(k!=null){if(d.ak())return Xa(k,m);d.Qj(k,q);d.Y.w=k.w;d.Y.col=q?"*all":k.col;d.Y.text=m;if(q){for(var u=d.cells[0],z=0;z<u.length;z++){d.zj(u[z]);u[z].sa=null}k.oh=true}else d.im(k);k.sa=m;if(d.Oc)if(z=
|
|
1379
1380
|
k.querySelector("input.qf"))z.value=m;if(d.ea()&&d.wa==false){d.totalRecs=null;d.j=1;d.mask();d.Jb()}else{u=k.Ij;var v=k.w;d.X=[];for(z=0;z<d.dataArray.length;z++){var J=d.dataArray[z];if(q)J.Hd=[];if(J.o==null)J.o=z+1;for(var I=0;I<u.length;I++){var H=J[u[I]],L=false;if(k.pui!=null){if(k.pui.formats!=null&&k.pui.formats[I]!=null&&typeof k.pui.formats[I]=="object"){var S=k.pui.formats[I];S.value=H;H=pui.tc.format(S)}if(k.pui.rd!=null&&k.pui.rd[I]!=null&&d.C[k.pui.rd[I]]!=null&&typeof d.C[k.pui.rd[I]]==
|
|
1380
|
-
"object"){S=d.C[k.pui.rd[I]];var ca=parseInt(S.left,10),O=parseInt(S.top,10);if(S.visibility=="hidden"||!isNaN(ca)&&!isNaN(O)&&ca<0&&O<0)L=true}}if(J.Hd==null)J.Hd=[];J.Hd[v]=true;if(!L&&d.bz(H,m)){J.Hd[v]=false;break}}d.Mj(J);!J.te&&!J.rc&&d.X.push(J)}}d.getData();
|
|
1381
|
+
"object"){S=d.C[k.pui.rd[I]];var ca=parseInt(S.left,10),O=parseInt(S.top,10);if(S.visibility=="hidden"||!isNaN(ca)&&!isNaN(O)&&ca<0&&O<0)L=true}}if(J.Hd==null)J.Hd=[];J.Hd[v]=true;if(!L&&d.bz(H,m)){J.Hd[v]=false;break}}d.Mj(J);!J.te&&!J.rc&&d.X.push(J)}}d.getData();Va&&d.Zt(q,m);M("onfilterchange")}}};this.Zt=function(k,m){var q=[];if(k)q.push({text:m,column:"*all",curCol:"*all"});else for(var u=d.cells[0],z=0;z<u.length;z++){var v=u[z];v.sa!=null&&v.sa!=""&&q.push({text:v.sa,column:v.w,curCol:v.col})}q.length<
|
|
1381
1382
|
1?d.clearState("filters"):N(q,"filters")};this.getFilter=function(k){var m=false;if(k==="*all"){k=0;m=true}if(typeof k=="number")k=d.cells[0][m?0:Ga(k)];if(k==null||typeof k.sa=="undefined")return null;if(m&&!k.oh||!m&&k.oh)return null;return k.sa};this.bz=function(k,m){function q(I){if(u){var H=I.split(".").join("").replace(",",".");if(!isNaN(H))return H}if(I.indexOf(",")!=-1){H=I.split(",").join("");if(!isNaN(H))return H}return I}var u=pui.appJob!=null&&(pui.appJob.decimalFormat=="I"||pui.appJob.decimalFormat==
|
|
1382
1383
|
"J");if(m.substr(0,8).toLowerCase()=="between "){var z=m.substr(8).toLowerCase().split(" ");if(z.length==3&&z[1]=="and"){var v=z[0];z=z[2];if(!isNaN(v)&&!isNaN(z)){v=Number(v);z=Number(z);k=Number(k)}else k=k.toLowerCase();return k>=v&&k<=z}}if(m.substr(0,7).toLowerCase()=="values "){m=m.substr(7).toLowerCase();if(m=="")return true;v=m.split(",");for(z=0;z<v.length;z++){m=Lb(v[z]).toLowerCase();if(m==" "&&k=="")return true;if(Lb(k).toLowerCase()==m)return true}return false}else if(m.substr(0,8).toLowerCase()==
|
|
1383
1384
|
"jvalues "){m=m.substr(8).toLowerCase();if(m=="")return true;try{v=JSON.parse(m);if(!Array.isArray(v))return false}catch(J){return false}for(z=0;z<v.length;z++){m=Lb(v[z]).toLowerCase();if(m==" "&&k=="")return true;if(Lb(k).toLowerCase()==m)return true}return false}else if(m.substr(0,12).toLowerCase()=="starts with "){m=m.substr(12).toLowerCase();return m==k.substr(0,m.length).toLowerCase()}else if(m.substr(0,2)=="=="){m=m.substr(2);if(m==" "&&k=="")return true;if(m=="")return true;return m.toLowerCase()==
|
|
@@ -1386,37 +1387,37 @@ m.substr(1);if(m==" "&&k=="")return true;if(m=="")return true;return m.toLowerCa
|
|
|
1386
1387
|
m.toUpperCase();var u=m.match(/^BETWEEN (.+) AND (.+)$/);if(u!=null&&u.length==3)q="&fltrtype"+k+"=BET&fltrval"+k+"_0="+encodeURIComponent(u[1])+"&fltrval"+k+"_1="+encodeURIComponent(u[2]);else if(m.substr(0,7)=="VALUES "){u=m.substr(7);if(u!=""){u=u.split(",");if(u.length>0){q="&fltrtype"+k+"=VAL&fltrcnt"+k+"="+String(u.length);for(var z=0;z<u.length;z++)q+="&fltrval"+k+"_"+String(z)+"="+encodeURIComponent(Lb(u[z]))}}}else if(m.substr(0,8)=="JVALUES "){u=m.substr(8);if(u!=""){try{u=JSON.parse(u);
|
|
1387
1388
|
Array.isArray(u)||(u=[])}catch(v){u=[]}if(u.length>0){q="&fltrtype"+k+"=VAL&fltrcnt"+k+"="+String(u.length);for(z=0;z<u.length;z++)q+="&fltrval"+k+"_"+String(z)+"="+encodeURIComponent(Lb(u[z]))}}}else q=m.substr(0,12)=="STARTS WITH "?"&fltrtype"+k+"=STW&fltrval"+k+"="+encodeURIComponent(m.substr(12)):m.substr(0,2)=="=="?"&fltrtype"+k+"=%3D&fltrval"+k+"="+encodeURIComponent(m.substr(2)):m.substr(0,1)=="="?"&fltrtype"+k+"=%3D&fltrval"+k+"="+encodeURIComponent(m.substr(1)):m.substr(0,2)==">="?"&fltrtype"+
|
|
1388
1389
|
k+"=%3E%3D&fltrval"+k+"="+encodeURIComponent(m.substr(2)):m.substr(0,2)=="<="?"&fltrtype"+k+"=%3C%3D&fltrval"+k+"="+encodeURIComponent(m.substr(2)):m.substr(0,2)=="!="||m.substr(0,2)=="<>"?"&fltrtype"+k+"=!%3D&fltrval"+k+"="+encodeURIComponent(m.substr(2)):m.substr(0,1)==">"?"&fltrtype"+k+"=%3E&fltrval"+k+"="+encodeURIComponent(m.substr(1)):m.substr(0,1)=="<"?"&fltrtype"+k+"=%3C&fltrval"+k+"="+encodeURIComponent(m.substr(1)):"&fltrtype"+k+"=CON&fltrval"+k+"="+encodeURIComponent(m);return q};this.Mj=
|
|
1389
|
-
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][Ga(k)];if(k!=null){d.Y.text="";d.zj(k);k.sa=null;if(d.Oc){var m=k.querySelector("input.qf");if(m)m.value=""}if(d.ak())return
|
|
1390
|
-
null)q.Hd[k]=false;d.Mj(q);!q.te&&!q.rc&&d.X.push(q)}}d.getData();
|
|
1390
|
+
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][Ga(k)];if(k!=null){d.Y.text="";d.zj(k);k.sa=null;if(d.Oc){var m=k.querySelector("input.qf");if(m)m.value=""}if(d.ak())return Xa(k,"");else if(d.ea()&&d.wa==false){d.totalRecs=null;d.j=1;d.mask();d.Jb()}else{k.oh&&delete k.oh;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!=
|
|
1391
|
+
null)q.Hd[k]=false;d.Mj(q);!q.te&&!q.rc&&d.X.push(q)}}d.getData();Va&&d.Zt();M("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.zj(q);q.sa=null;if(d.Oc)if(q=q.querySelector("input.qf"))q.value=""}if(d.ak())return rb("","");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.Jb()}d.getData();d.clearState("filters");
|
|
1391
1392
|
M("onfilterchange")}};this.ss=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.rg!=null)return false;if(!k&&d.Mb>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.im=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");
|
|
1392
1393
|
k.style.cursor="pointer";k.nc.onclick=function(q){if(!pui.Be(q)){d.startFilter(k);vb(q)}};var m=k;if(m.firstChild!=null&&m.firstChild.tagName=="DIV")m=m.firstChild;if(d.gc!=null&&d.gc.parentNode===m)m.insertBefore(k.nc,d.gc);else k.Zc!=null&&k.Zc.parentNode===m?m.insertBefore(k.nc,k.Zc):m.appendChild(k.nc)}};this.zj=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=
|
|
1393
1394
|
true;return m};this.ak=function(){return d.c.js!=null};this.hideColumn=function(k){return d.Hs(k,false)};this.showColumn=function(k){return d.Hs(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.ys=function(k,m){var q=m,u=true;if(typeof d.hc!="undefined"&&d.hc===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<
|
|
1394
1395
|
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.ys(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.Hs=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===
|
|
1395
1396
|
m?true:d.Lo(z)}return false};this.Lo=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,v=k.currentColumn,J=q.Ai,I=[],H=d.cells[0],L=0,S=pui["grid column resize style"]!=="simple",ca=d.uf().split(",").map(function(ba){return Number(ba)}),O=0;O<q.length;O++){if(k===q[O]){q[O].showing=u;if(!u){var V=Ga(q[O].columnId);q[O].width=ca[V]}k=q[O]}if(q[O].showing){V=Ga(q[O].columnId);
|
|
1396
1397
|
if(V>-1)q[O].width=ca[V];I.push(q[O])}else L+=q[O].width-(q[O].lastAdjustment||0)}if(u){d.mn(z);V=Ga(z);O=0;if(hc&&J)if(v==-1)O=V;else{if(J[v]===z){v=v-1;for(ca=J[v];ca>=0;){ca=Ga(ca);if(ca!=-1){if(ca<=v)O=ca+1;break}else{v-=1;ca=J[v]}}}}else if(z>0){O=I.filter(function(ba){return ba.columnId<z}).reduce(function(ba,Z){return Z.columnId>=ba?Z.columnId:ba},0);O=Ga(O)+1}d.moveColumn(V,O,k);d.Ma();d.sd()}else d.Np(z);if(!m&&(u||d.ea()))d.getData();d.sortable&&d.pl(true);var U=[];u=I.sort(function(ba,
|
|
1397
|
-
Z){return Ga(ba.columnId)>Ga(Z.columnId)?1:-1}).map(function(ba){ba.blankHeader?U.push(""):U.push(ba.name);if(d.kd||S){if(d.my)return ba.width;return ba.orginalWidth}for(var Z=Math.floor(L/I.length),ja=ba.lastAdjustment||0,za=0;za<q.length;za++)if(q[za].columnId===ba.w){q[za].lastAdjustment=Z;break}Z=ba.width+Z-ja;return Z<0?ba.width:Z});if(
|
|
1398
|
-
N(u,"colWidths");N(J,"colSequence")}d.Rf(u);d.Ma();d.sd();if(hc)for(O=0;O<H.length;O++)Y(H[O],true,d.sortable);if(ld)for(O=0;O<d.n.length;O++)aa(d.n,O,true,true);d.kd&&d.Xb();d.columnHeadings=U;d.fc();sb();if(hc&&
|
|
1399
|
-
z;if(d.designMode&&m.currentColumn!=null&&q.currentColumn!=null){u=m.currentColumn;z=q.currentColumn}else{u=Ga(m.columnId);z=Ga(q.columnId)}return u>z?1:-1}).map(function(m){if(m.blankHeader)return"";return m.name})};this.lu=function(){function k(Z){Z=Z.target;if(Z.tagName=="TD")Z=Z.parentNode;if(Z.tagName!="TR")return null;return Z}function m(Z){var ja=k(Z);if(ja){Z.stopPropagation()
|
|
1400
|
-
"move_origin")
|
|
1401
|
-
if(ja.parentNode==za.tHead){vb(Z);Z.dataTransfer.dropEffect="move";pui.Q(za.tHead.lastChild,"move_valid")}else if(ja
|
|
1402
|
-
|
|
1403
|
-
"pui-material-icons";L.innerHTML="close";T(L,"click",function(){
|
|
1398
|
+
Z){return Ga(ba.columnId)>Ga(Z.columnId)?1:-1}).map(function(ba){ba.blankHeader?U.push(""):U.push(ba.name);if(d.kd||S){if(d.my)return ba.width;return ba.orginalWidth}for(var Z=Math.floor(L/I.length),ja=ba.lastAdjustment||0,za=0;za<q.length;za++)if(q[za].columnId===ba.w){q[za].lastAdjustment=Z;break}Z=ba.width+Z-ja;return Z<0?ba.width:Z});if(Va){q=q.map(function(ba){if(ba.showing)ba.savedColumn=Ga(ba.columnId);return ba});V={cols:q,headings:U};if(Va){O=R();if(O!=null)J=O.colSequence}N(V,"hidableColState");
|
|
1399
|
+
N(u,"colWidths");N(J,"colSequence")}d.Rf(u);d.Ma();d.sd();if(hc)for(O=0;O<H.length;O++)Y(H[O],true,d.sortable);if(ld)for(O=0;O<d.n.length;O++)aa(d.n,O,true,true);d.kd&&d.Xb();d.columnHeadings=U;d.fc();sb();if(hc&&Va)if(J!=null){H=Array(J.length);for(O=0;O<H.length;O++)H[O]=d.cells[0][J[O]];for(O=0;O<H.length;O++)d.moveColumn(H[O].col,O)}return true};this.ts=function(k){if(typeof k!=="object")return d.columnHeadings.split(",");return k.filter(function(m){return m.showing}).sort(function(m,q){var u,
|
|
1400
|
+
z;if(d.designMode&&m.currentColumn!=null&&q.currentColumn!=null){u=m.currentColumn;z=q.currentColumn}else{u=Ga(m.columnId);z=Ga(q.columnId)}return u>z?1:-1}).map(function(m){if(m.blankHeader)return"";return m.name})};this.lu=function(){function k(Z){Z=Z.target;if(Z.tagName=="TD")Z=Z.parentNode;if(Z.tagName!="TR")return null;return Z}function m(Z){var ja=k(Z);if(ja){Z.stopPropagation();$a.If=ja;pui.Q(ja,"move_origin");try{Z.dataTransfer.setData("text/plain",ja.w)}catch(za){}}}function q(Z){if(Z=k(Z)){pui.da(Z,
|
|
1401
|
+
"move_origin");$a.If=null}}function u(Z){vb(Z);if(Z=k(Z)){var ja=Z.parentNode.parentNode;Z.parentNode==ja.tHead?pui.da(ja.tHead.lastChild,"move_valid"):pui.da(Z,"move_valid");if($a.If==null)console.log("Origin row not set.");else{var za=Z.sectionRowIndex;if(Z.parentNode==ja.tHead)za=-1;za++;Z=ja.tBodies[0].rows[za];if($a.If!==Z){ja.tBodies[0].removeChild($a.If);ja.tBodies[0].insertBefore($a.If,Z)}I(ja.tBodies[0])}}}function z(Z){if($a.If!=null){var ja=k(Z);if(ja!=null){var za=ja.parentNode.parentNode;
|
|
1402
|
+
if(ja.parentNode==za.tHead){vb(Z);Z.dataTransfer.dropEffect="move";pui.Q(za.tHead.lastChild,"move_valid")}else if(ja!=$a.If&&ja.sectionRowIndex!=$a.If.sectionRowIndex-1){vb(Z);Z.dataTransfer.dropEffect="move";pui.Q(ja,"move_valid")}}}}function v(Z){vb(Z);if(Z=k(Z)){var ja=Z.parentNode.parentNode;if(Z.parentNode==ja.tHead)Z=ja.tHead.lastChild;pui.da(Z,"move_valid")}}function J(Z){I(Z.target.parentNode.parentNode.parentNode)}function I(Z){for(var ja=0,za=0;za<Z.rows.length;za++){var La=Z.rows[za],ka=
|
|
1403
|
+
La.cells[1],xa=La.cells[3].children[0];if(La.cells[0].children[0].checked){La.Lb=ja;ka.innerHTML=ja;ja++;xa.style.visibility=""}else{La.Lb=-1;ka.innerHTML="";xa.style.visibility="hidden"}}}if(d.c.parentNode!=null){if($a==null){$a=document.createElement("div");$a.className="grid-multisort"+(d.Xc!=""?" "+d.Xc+"-multisort":"");$a.style.top=d.c.offsetTop+"px";$a.style.left=d.c.offsetLeft+"px";var H=document.createElement("div");new pui.Ue({yk:H,move:$a});var L=document.createElement("button");L.className=
|
|
1404
|
+
"pui-material-icons";L.innerHTML="close";T(L,"click",function(){$a.style.display="none"});H.appendChild(L);L=document.createElement("button");L.className="pui-material-icons";L.innerHTML="check";T(L,"click",function(){$a.style.display="none";for(var Z=[],ja=0;ja<S.tBodies[0].rows.length;ja++){var za=S.tBodies[0].rows[ja];za.Lb>=0&&Z.push({Lr:za.w+0,lw:za.ra})}d.jt(Z)});H.appendChild(L);H.appendChild(document.createTextNode(pui.getLanguageText("runtimeText","sort multiple")));$a.appendChild(H);var S=
|
|
1404
1405
|
document.createElement("table");H=S.createTHead().insertRow();H.ondrop=u;H.ondragover=z;H.ondragleave=v;var ca=H.insertCell();ca.innerHTML=pui.getLanguageText("runtimeText","sort");ca=H.insertCell();ca.innerHTML=pui.getLanguageText("runtimeText","order");ca=H.insertCell();ca.innerHTML=pui.getLanguageText("runtimeText","column");ca=H.insertCell();ca.innerHTML=pui.getLanguageText("runtimeText","direction");var O=document.createElement("tbody");S.appendChild(O);var V=d.cells[0].map(function(Z){for(var ja=
|
|
1405
1406
|
-1,za=0;za<Sa.length;za++)if(Z===Sa[za]){ja=za;break}za=Z.ra;if(za==null)za=p(Z.w);return{w:Z.w,name:Z.textContent,ra:za,Lb:ja}});V.sort(function(Z,ja){if(Z.Lb>=0&&ja.Lb>=0)return Z.Lb-ja.Lb;if(Z.Lb>=0&&ja.Lb<0)return-1;if(Z.Lb<0&&ja.Lb>=0)return 1;return 0});for(var U=0;U<V.length;U++){L=V[U].name;ca=V[U].w;var ba=V[U].ra;H=O.insertRow();H.draggable=true;H.w=ca;H.ra=ba;H.Lb=V[U].Lb;H.ondragstart=m;H.ondragend=q;H.ondrop=u;H.ondragover=z;H.ondragleave=v;ca=H.insertCell();ba=document.createElement("input");
|
|
1406
1407
|
ba.type="checkbox";ba.name=L+"_sort";ba.onclick=J;ba.checked=H.Lb>=0;ca.appendChild(ba);ca=H.insertCell();ca.innerHTML=H.Lb>=0?H.Lb:" ";ca=H.insertCell();ca.innerHTML=L;ca.draggable=true;ca=H.insertCell();L=document.createElement("button");L.className="pui-material-icons";L.innerHTML=H.ra?"arrow_downward":"arrow_upward";L.style.visibility=H.Lb>=0?"":"hidden";T(L,"click",function(Z){var ja=Z.target.parentNode.parentNode;if(Z.target.innerHTML=="arrow_downward"){Z.target.innerHTML="arrow_upward";
|
|
1407
|
-
ja.ra=false}else{Z.target.innerHTML="arrow_downward";ja.ra=true}});L.enabled=false;ca.appendChild(L)}
|
|
1408
|
-
"arrow_upward";V=true;break}if(!V)H.childNodes[0].firstChild.checked=false}I(O)}
|
|
1409
|
-
Z}function q(){ba=V.entries();za=V.size;for(var Oa=za<50?za:50,eb=0;eb<Oa;eb++){U=ba.next().value;Z=U[0];ja=U[1];m();
|
|
1408
|
+
ja.ra=false}else{Z.target.innerHTML="arrow_downward";ja.ra=true}});L.enabled=false;ca.appendChild(L)}$a.appendChild(S);d.c.parentNode.appendChild($a)}else if($a.style.display==""){$a.style.top=d.c.offsetTop+"px";$a.style.left=d.c.offsetLeft+"px"}else{O=$a.querySelector("table").tBodies[0];for(U=0;U<O.childNodes.length;U++){H=O.childNodes[U];V=false;for(L=0;L<Sa.length;L++)if(H.w==Sa[L].w){H.ra=Sa[L].ra;H.childNodes[0].firstChild.checked=true;if(V=H.childNodes[3].firstChild)V.innerHTML=H.ra?"arrow_downward":
|
|
1409
|
+
"arrow_upward";V=true;break}if(!V)H.childNodes[0].firstChild.checked=false}I(O)}$a.style.display="";if(d.c.parentNode.getAttribute("container")=="true"&&d.c.parentNode.offsetHeight>0)if($a.offsetHeight>d.c.parentNode.offsetHeight-54)$a.style.height=d.c.parentNode.offsetHeight-54+"px"}};this.Py=function(k){function m(){H=S.insertRow();H.w=ca;H.onclick=u;L=H.insertCell();var Oa=document.createElement("input");Oa.type="checkbox";Oa.name=Z+"_filter";Oa.checked=ja;L.appendChild(Oa);L=H.insertCell();L.innerHTML=
|
|
1410
|
+
Z}function q(){ba=V.entries();za=V.size;for(var Oa=za<50?za:50,eb=0;eb<Oa;eb++){U=ba.next().value;Z=U[0];ja=U[1];m();La++}ab.appendChild(I);d.c.parentNode.appendChild(ab)}function u(Oa){if(Oa.target.localName=="td")if(this.cells[0].children[0].checked==false)ja=this.cells[0].children[0].checked=true;else ja=this.cells[0].children[0].checked=false;if(Oa.target.localName=="input")if(this.cells[0].children[0].checked==true)ja=this.cells[0].children[0].checked=true;else ja=this.cells[0].children[0].checked=
|
|
1410
1411
|
false;Z=this.cells[1].innerHTML;Z!=null&&V.has(Z)&&V.set(Z,ja)}function z(Oa,eb,Cb,Ta,bc){d.mask();d.Jb();if(Oa==null)Oa=-1;if(eb==null)eb=1;var Sb=null;Sb=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 Te=cb(uc.w);d.Lc+="&fltrcol"+String(nd)+"="+(uc.w+1+Te);d.Lc+=d.Dt(String(nd),uc.sa);Sb+=d.Lc;nd++}}if(d.dataProps["data url"]!=null&&d.dataProps["data url"]!=""&&d.Db!=null)Sb+="&order="+d.Db;Gb=Wb("PUI0009102.PGM");
|
|
1411
1412
|
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.Db!=null)Gb=d.Db;if(Gb&&Gb!="")Ta.postData+="&order="+Gb;else if(Fb()=="mssql")Ta.postData+="&order=(select null)";if(Sb!="")Ta.postData+="&"+Sb;Ta.postData+="&limit="+Oa+"&start="+eb;if(Cb!=null&&Cb==true)Ta.postData+=
|
|
1412
1413
|
"&getTotal=1";if(pui["read db driven data as ebcdic"]!==true)Ta.postData+="&UTF8=Y";Oa=d.dataProps["allow any select statement"];if(Oa!=null&&(Oa=="true"||Oa==true))Ta.postData+="&FetchCounter=Y";if(pui.isCloud)Ta.postData+="&workspace_id="+pui.cloud.ws.id;Ta.onready=function(ic){var Hb,jc,Ob;if(Hb=Kb(ic,"Run SQL SELECT Query")){d.mask();d.Jb();ic=Hb.results;var Tb=Hb.totalRecs;if(Tb!=null)d.totalRecs=Tb;if(ic.length>=1){var Db=pb(d.C);Tb=[];for(Ob in Hb.results[0])Db.indexOf(Ob)==-1&&Tb.push(Ob);
|
|
1413
1414
|
Ob=Tb;Hb=[];for(Db=0;Db<d.C.length;Db++)if(d.C[Db]&&d.C[Db].value&&d.C[Db].value.fieldName){var Nc=d.C[Db].value.fieldName;Ob.indexOf(Nc)!=-1&&Hb.push(Nc)}Tb=Hb.length===0?Tb:Hb;for(Hb=0;Hb<ic.length;Hb++){Db=ic[Hb];if(bc.fieldName!=null)for(jc in Db){if(jc.toUpperCase()==bc.fieldName.toUpperCase()){Ob=Db[jc];V.set(Ob,false)}}else{d.dataArray=ic;d.sc=false;d.wa=true;Nc=Tb[bc.w];for(jc in Db)if(jc==Nc){Ob=Db[jc];V.set(Ob,false)}}}if(V.size>0){q();d.unMask()}}}};d.sc=true;Ta.send()}if(d.c.parentNode!=
|
|
1414
|
-
null)if(!pui.is_ie){d.mask();d.Jb()
|
|
1415
|
-
move
|
|
1416
|
-
ja==true&&Oa.push(Z)}ka="JVALUES "+JSON.stringify(Oa);if(d.sc==true)d.sc=false;if(d.wa==true&&d.dataProps["load all rows"]!="true")d.wa=false;ka==null||Oa.length==0?d.removeFilter(ca):d.setFilter(k,ka);d.unMask()
|
|
1417
|
-
L.innerHTML=pui.getLanguageText("runtimeText","filter data");var S=document.createElement("tbody");I.appendChild(S);if(k!=null){var ca=k.w;d.Qj(k);var O=k.Ij}rows=d.dataArray.length;var V=new Map,U=[],ba=[],Z,ja=false,za=0,
|
|
1418
|
-
xa[O[
|
|
1419
|
-
"true"&&d.c.parentNode.offsetHeight>0)if(
|
|
1415
|
+
null)if(!pui.is_ie){d.mask();d.Jb();ab&&ab.parentNode.removeChild(ab);ab=document.createElement("div");ab.className="grid-multifilter"+(d.Xc!=""?" "+d.Xc+"-multifilter":"");if(k!=null){ab.style.top=d.c.offsetTop+k.offsetHeight+"px";ab.style.left=d.c.offsetLeft+k.offsetLeft+"px";if(ab.style.top==null||ab.style.left==null){ab.style.top=d.c.offsetTop+"px";ab.style.left=d.c.offsetLeft+"px"}}else{ab.style.top=d.c.offsetTop+"px";ab.style.left=d.c.offsetLeft+"px"}var v=document.createElement("div");new pui.Ue({yk:v,
|
|
1416
|
+
move:ab});var J=document.createElement("button");J.className="pui-material-icons";J.innerHTML="close";T(J,"click",function(){ab.style.display="none";if(d.sc==true)d.sc=false;ab=null;if(d.wa==true&&d.dataProps["load all rows"]!="true")d.wa=false});v.appendChild(J);J=document.createElement("button");J.className="pui-material-icons";J.innerHTML="check";T(J,"click",function(){ab.style.display="none";d.mask();d.Jb();ba=V.entries();za=V.size;for(var Oa=[],eb=0;eb<za;eb++){U=ba.next().value;Z=U[0];ja=U[1];
|
|
1417
|
+
ja==true&&Oa.push(Z)}ka="JVALUES "+JSON.stringify(Oa);if(d.sc==true)d.sc=false;if(d.wa==true&&d.dataProps["load all rows"]!="true")d.wa=false;ka==null||Oa.length==0?d.removeFilter(ca):d.setFilter(k,ka);d.unMask();ab=null});v.appendChild(J);v.appendChild(document.createTextNode(pui.getLanguageText("runtimeText","filter multiple")));ab.appendChild(v);var I=document.createElement("table"),H=I.createTHead().insertRow(),L=H.insertCell();L.innerHTML=pui.getLanguageText("runtimeText","filter check");L=H.insertCell();
|
|
1418
|
+
L.innerHTML=pui.getLanguageText("runtimeText","filter data");var S=document.createElement("tbody");I.appendChild(S);if(k!=null){var ca=k.w;d.Qj(k);var O=k.Ij}rows=d.dataArray.length;var V=new Map,U=[],ba=[],Z,ja=false,za=0,La=0,ka=k.sa;if(d.ea()&&d.dataProps["load all rows"]!="true"){O=d.dataProps["data url"];if(O=="")O=null;z(-1,1,d.totalRecs==null,O,k)}else{v=d.dataArray;if(d.isFiltered()&&d.X!=null&&d.X.length>0)v=d.X;for(J=0;J<v.length;J++){var xa=v[J];if(xa.o==null)xa.o=J+1;for(var Ja=0;Ja<O.length;Ja++){var Na=
|
|
1419
|
+
xa[O[Ja]],Ca=false;if(k.pui!=null)if(k.pui.formats!=null&&k.pui.formats[Ja]!=null&&typeof k.pui.formats[Ja]=="object"){var Ea=k.pui.formats[Ja];Ea.value=Na;Na=pui.tc.format(Ea)}if(k.pui.rd!=null&&k.pui.rd[Ja]!=null&&d.C[k.pui.rd[Ja]]!=null&&typeof d.C[k.pui.rd[Ja]]=="object"){Ea=d.C[k.pui.rd[Ja]];var Ra=parseInt(Ea.left,10),Jb=parseInt(Ea.top,10);if(Ea.visibility=="hidden"||!isNaN(Ra)&&!isNaN(Jb)&&Ra<0&&Jb<0)Ca=true}Ca||V.set(Na,ja);ja=false}}if(V.size>0){q();d.unMask()}}ab.style.display="";if(d.c.parentNode.getAttribute("container")==
|
|
1420
|
+
"true"&&d.c.parentNode.offsetHeight>0)if(ab.offsetHeight>d.c.parentNode.offsetHeight-54)ab.style.height=d.c.parentNode.offsetHeight-54+"px";I.onscroll=function(){var Oa,eb=za-La;if(!(za<=50||eb==0))if(ab.scrollTop>=ab.scrollHeight-ab.offsetHeight)if(eb<=50)for(Oa=0;Oa<eb;Oa++){U=ba.next().value;Z=U[0];ja=U[1];m();La++}else for(Oa=0;Oa<50;Oa++){U=ba.next().value;Z=U[0];ja=U[1];m();La++}}}}};pui.ek.prototype=Object.create(pui.$h.prototype);
|
|
1420
1421
|
pui.$h.Ni=function(){var b=[{name:"Identification",category:true},{name:"id",maxLength:75,V:"id",a:"id",help:"Specifies the ID that is used to access the grid from client-side code.",bind:false,va:false},{name:"record format name",displayName:pui.nodedesigner?"name":undefined,a:"blank",help:"Specifies the name that is used to access this grid from server code.",maxLength:pui.viewdesigner||pui.nodedesigner?null:10,bind:false,context:"dspf",va:false},{name:"description",a:"blank",help:"Describes the grid.",
|
|
1421
1422
|
bind:false,context:"dspf"},{name:"parent window",V:"parentWindow",a:"blank",help:"Sets the window that this field belongs to.",context:"genie"},{name:"screen identifier",choices:["true","false"],je:false,a:"false",help:"If set to true, this element will be used to detect the screen. The identifier element should be a static output field that is unique to this screen. For example, if the screen has a unique heading, it can be used as the identifier. At least one element on the screen must be marked as an identifier before you can save the screen. When appropriate, you can use a combination of several elements to uniquely identify the screen.",
|
|
1422
1423
|
context:"genie"},{name:"field type",displayName:"widget type",choices:["grid"],je:false,a:"widget",help:"Determines the type of control that is used to render the element.",bind:false,va:false},{name:"value",a:"blank",help:"Sets the initialization value for the current element."},{name:"Subfile Settings",category:true,context:"dspf"},{name:"display subfile",choices:["true","false"],g:true,f:["indicator","expression"],a:"true",help:"This property tells the system when to display grid records. It represents the SFLDSP keyword.",
|
|
@@ -1536,14 +1537,14 @@ var C=E.relatedTarget;if(C==null)C=E.toElement;for(;C!=null&&(C.tagName=="TABLE"
|
|
|
1536
1537
|
""){F.style.backgroundImage="url('"+F.Ab+"')";F.style.backgroundRepeat=f.repeat}else F.style.backgroundImage="";if(f.yg!=null&&f.yg!=""){F.pi=false;if(f.animate){var R=function(N){N-=10;if(N<40){if(!F.pi)F.style.backgroundColor="";F.pi=true}if(F.pi)N=100;F.style.filter="alpha(opacity="+N+")";F.style.opacity=N/100;F.pi||setTimeout(function(){R(N)},60)};R(100)}else F.style.backgroundColor=""}else F.className=""};if(pui.is_touch&&!pui.is_mouse_capable&&F.children.length>0)F.addEventListener("touchend",
|
|
1537
1538
|
D,false);else F.onclick=D;F.ondblclick=function(E){if(Eb()&&F.orientation=="vertical"&&F.yh==0){var C=designUtils.getTarget(E);for(E=C.parentNode;E.tagName!="DIV";)E=E.parentNode;var K=Ib.designer.ph(E);if(!pui.p(K.properties.choices)&&!pui.Kb(K.properties.choices)&&typeof C.Kr==="number"){K.designer.Cf.op=function(R){var N=K.properties.choices;if(N=="")N="Option 1,Option 2,Option 3";N=N.split(",");N[C.Kr]=R;N=N.join(",");R=Dc().choices;K.designer.ca.add(K,R.name);Pc(R,K.properties,K.dom,N,true,K,
|
|
1538
1539
|
null);K.pb.choices=true;K.hd=true;K.designer.jd[K.designer.Na.ub]=true;K.designer.ob.Kh("choices")};K.designer.Cf.show(K,C,"menu")}}}}var o=g.b,n=g.Kx;if(o.Sj==undefined)o.Sj=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.xo);var t,s=f.borderColor;if(s!=""&&s!=null){s=pui.mt(s);r.style.borderTop=
|
|
1539
|
-
"1px solid "+s;r.style.borderLeft="1px solid "+s}for(var w=g.xo;w<=g.zu;w++)if(a(w)==p){
|
|
1540
|
-
if(f.paddingLeft!=null&&f.paddingLeft.length>0)G.style.paddingLeft=f.paddingLeft;if(s!=""&&s!=null){G.style.borderRight="1px solid "+s;G.style.borderBottom="1px solid "+s}if(f.animate){G.style.filter="alpha(opacity=100)";G.style.opacity=1}if(f.Ab!=null&&f.Ab!=""){G.Ab=f.Ab;if(f.kj.length>1)G.Ab=f.kj[w]!=null?f.kj[w]:"";if(G.Ab!="")G.style.backgroundImage="url('"+pui.normalizeURL(G.Ab,true)+"')";if(f.repeat!=null&&f.repeat.length>0){G.style.backgroundRepeat=f.repeat;
|
|
1541
|
-
"left center"}}else G.style.backgroundImage="";if(c(w)){G.Xj=w+1;G.qm=w+1;for(A=a(w+1);G.qm<f.choices.length-1&&a(G.qm+1)>=A;)G.qm+=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.Xo=true;B=document.createElement("span");B.innerHTML=" ";B.Xo=true;
|
|
1542
|
-
function a(g){g=f.choices[g];var l=0;if(g==null)return l;for(var o=0;o<g.length;o++)if(g.substr(o,1)=="-")l+=1;else break;return l}function c(g){if(g>=f.choices.length-1)return false;if(a(g)+1==a(g+1))return true;return false}function e(g){for(g=g;g;){if(g.tagName=="TABLE")return g;g=g.parentElement}return false}var f=this,h=[];this.b=null;this.choices=[];this.me=[];this.zg=this.yg=null;this.animate=true;this.Ab=this.paddingLeft=this.padding=
|
|
1543
|
-
this.orientation="vertical";this.z=function(){b({b:f.b,orientation:f.orientation,xo:0,zu:f.choices.length-1})};this.Qy=function(g){if(g.Xj!=null){for(var l=g;l.tagName!="TABLE";)l=l.parentNode;var o=l.parentNode;if(g.vb==null){g.vb=document.createElement("div");g.vb.className=o.className;var n=g.vb.style,r=o.style;n.backgroundColor=r.backgroundColor;n.letterSpacing=r.letterSpacing;n.wordSpacing=r.wordSpacing;n.textAlign=r.textAlign;n.textDecoration=
|
|
1544
|
-
n.fontVariant=r.fontVariant;n.fontWeight=r.fontWeight;n.fontSize=r.fontSize;n.fontFamily=r.fontFamily;n.color=r.color;n.zIndex=r.zIndex;n.position="absolute";if(!pui.pa)n.cursor=r.cursor;f.b.parentNode.appendChild(g.vb)}if(g.orientation=="vertical"){g.vb.style.top=o.offsetTop+g.offsetTop+"px";g.vb.style.left=o.offsetLeft+o.offsetWidth-1-(o.offsetWidth-o.clientWidth)+"px"}else{g.vb.style.top=o.offsetTop+g.offsetTop+g.offsetHeight-1+"px";g.vb.style.left=
|
|
1545
|
-
"";o.style.display="";b({b:g.vb,orientation:"vertical",xo:g.Xj,zu:g.qm,Kx:l});l=100;if(g.orientation=="horizontal"&&g.yh==0&&g.offsetWidth>l)l=g.offsetWidth;if(g.vb.offsetWidth<l){g.vb.style.width=l+"px";l=g.vb.firstChild;l.style.width="100%"}l=true;for(o=0;o<h.length;o++)if(h[o]==g){l=false;break}l&&h.push(g)}};this.Gp=function(g){if(g.vb!=null){for(var l=0;l<h.length;l++)if(h[l]==g){h.splice(l,1);break}g.vb.parentNode.removeChild(g.vb);g.vb=null}};
|
|
1546
|
-
for(l=0;l<g.length;l++)f.Gp(g[l])}};
|
|
1540
|
+
"1px solid "+s;r.style.borderLeft="1px solid "+s}for(var w=g.xo;w<=g.zu;w++)if(a(w)==p){var A=f.choices[w];if(typeof A=="string")for(;A.substr(0,1)=="-";)A=A.substr(1);var B=f.me[w];if(B==null)B=A;t=t==null||g.orientation=="vertical"?r.insertRow(r.rows.length):t;var G=t.insertCell(t.cells.length);if(A==null||A==""||Lb(A)=="")A=" ";G.innerHTML=A;G.fh=B;G.yh=p;if(Eb())G.Kr=w;G.tx=f.b.id;G.orientation=g.orientation;if(f.padding!=null&&f.padding.length>0)G.style.paddingTop=G.style.paddingBottom=
|
|
1541
|
+
G.style.paddingRight=f.padding;if(f.paddingLeft!=null&&f.paddingLeft.length>0)G.style.paddingLeft=f.paddingLeft;if(s!=""&&s!=null){G.style.borderRight="1px solid "+s;G.style.borderBottom="1px solid "+s}if(f.animate){G.style.filter="alpha(opacity=100)";G.style.opacity=1}if(f.Ab!=null&&f.Ab!=""){G.Ab=f.Ab;if(f.kj.length>1)G.Ab=f.kj[w]!=null?f.kj[w]:"";if(G.Ab!="")G.style.backgroundImage="url('"+pui.normalizeURL(G.Ab,true)+"')";if(f.repeat!=null&&f.repeat.length>0){G.style.backgroundRepeat=f.repeat;
|
|
1542
|
+
if(f.repeat=="no-repeat")G.style.backgroundPosition="left center"}}else G.style.backgroundImage="";if(c(w)){G.Xj=w+1;G.qm=w+1;for(A=a(w+1);G.qm<f.choices.length-1&&a(G.qm+1)>=A;)G.qm+=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.Xo=true;B=document.createElement("span");B.innerHTML=" ";B.Xo=true;
|
|
1543
|
+
G.appendChild(B);G.appendChild(A)}}l(G);t=t}o.appendChild(r)}function a(g){g=f.choices[g];var l=0;if(g==null)return l;for(var o=0;o<g.length;o++)if(g.substr(o,1)=="-")l+=1;else break;return l}function c(g){if(g>=f.choices.length-1)return false;if(a(g)+1==a(g+1))return true;return false}function e(g){for(g=g;g;){if(g.tagName=="TABLE")return g;g=g.parentElement}return false}var f=this,h=[];this.b=null;this.choices=[];this.me=[];this.zg=this.yg=null;this.animate=true;this.Ab=this.paddingLeft=this.padding=
|
|
1544
|
+
this.borderColor=this.repeat=null;this.kj=[];this.jj=null;this.orientation="vertical";this.z=function(){b({b:f.b,orientation:f.orientation,xo:0,zu:f.choices.length-1})};this.Qy=function(g){if(g.Xj!=null){for(var l=g;l.tagName!="TABLE";)l=l.parentNode;var o=l.parentNode;if(g.vb==null){g.vb=document.createElement("div");g.vb.className=o.className;var n=g.vb.style,r=o.style;n.backgroundColor=r.backgroundColor;n.letterSpacing=r.letterSpacing;n.wordSpacing=r.wordSpacing;n.textAlign=r.textAlign;n.textDecoration=
|
|
1545
|
+
r.textDecoration;n.textTransform=r.textTransform;n.fontVariant=r.fontVariant;n.fontWeight=r.fontWeight;n.fontSize=r.fontSize;n.fontFamily=r.fontFamily;n.color=r.color;n.zIndex=r.zIndex;n.position="absolute";if(!pui.pa)n.cursor=r.cursor;f.b.parentNode.appendChild(g.vb)}if(g.orientation=="vertical"){g.vb.style.top=o.offsetTop+g.offsetTop+"px";g.vb.style.left=o.offsetLeft+o.offsetWidth-1-(o.offsetWidth-o.clientWidth)+"px"}else{g.vb.style.top=o.offsetTop+g.offsetTop+g.offsetHeight-1+"px";g.vb.style.left=
|
|
1546
|
+
o.offsetLeft+g.offsetLeft+"px"}g.vb.style.display="";o.style.display="";b({b:g.vb,orientation:"vertical",xo:g.Xj,zu:g.qm,Kx:l});l=100;if(g.orientation=="horizontal"&&g.yh==0&&g.offsetWidth>l)l=g.offsetWidth;if(g.vb.offsetWidth<l){g.vb.style.width=l+"px";l=g.vb.firstChild;l.style.width="100%"}l=true;for(o=0;o<h.length;o++)if(h[o]==g){l=false;break}l&&h.push(g)}};this.Gp=function(g){if(g.vb!=null){for(var l=0;l<h.length;l++)if(h[l]==g){h.splice(l,1);break}g.vb.parentNode.removeChild(g.vb);g.vb=null}};
|
|
1547
|
+
this.Mt=function(){for(var g=[],l=0;l<h.length;l++)g.push(h[l]);for(l=0;l<g.length;l++)f.Gp(g[l])}};
|
|
1547
1548
|
pui.widgets.add({name:"menu",lg:false,defaults:{width:"200px",height:"200px",choices:"Option 1,Option 2,Option 3,Option 4,Option 5",color:"#333366","border color":"#EEEEEE","font family":"Arial","font size":"12px","background color":"#FFFFFF","hover background color":"#6699FF","hover text color":"#FFFFFF",animate:"true"},propertySetters:{"field type":function(b){b.dom.v=new pui.Su;b.dom.v.nq=pui.$b(b.properties.onoptionclick);if(b.dom.v.nq)b.dom.v.routine=b.properties.onoptionclick.routine;var a=
|
|
1548
1549
|
b.evalProperty("choices");b.dom.v.choices=a!=null&&a!=""?pui.ha(a):["Option 1","Option 2","Option 3"];if(pui["onoptionclick value is text"]!==true){a=b.evalProperty("choice values");b.dom.v.me=a!=null&&a!=""?pui.ha(a):[]}b.dom.v.b=b.dom;b.dom.v.zg=b.properties["hover text color"];b.dom.v.yg=b.properties["hover background color"];b.dom.v.borderColor=b.properties["border color"];b.dom.v.Ab=b.properties["option image"];b.dom.v.kj=b.dom.v.Ab==null||b.dom.v.Ab==""?[]:pui.ha(b.dom.v.Ab);b.dom.v.jj=b.properties["option hover image"];
|
|
1549
1550
|
b.dom.v.repeat=b.properties["background repeat"];b.dom.v.padding=b.properties["menu option padding"];b.dom.v.paddingLeft=b.properties["menu option indent"];b.dom.v.animate=b.properties.animate!="false";a=b.properties.orientation;if(a!="horizontal"&&a!="vertical")a="vertical";b.dom.v.orientation=a;b.dom.v.z()},choices:function(b){if(b.dom.v!=null){var a=b.value;b.dom.v.choices=a!=null&&a!=""?pui.ha(a):["Option 1","Option 2","Option 3"];b.dom.v.z()}},"choice values":function(b){if(b.dom.v!=null){var a=
|
|
@@ -1555,8 +1556,8 @@ pui.widgets.add({name:"output field",md:true,propertySetters:{"field type":funct
|
|
|
1555
1556
|
function(){var f=c.getAttribute("type")==="password"?"text":"password";c.setAttribute("type",f);e.classList.toggle("fa-eye-slash")})}else{a=b.id.replace("Password","PasswordEye");e=document.getElementById(a);if(e!==null){e.remove();c.style.zIndex=""}}}
|
|
1556
1557
|
function ve(b){if(b.properties["show visibility eye"]==="true"){var a=b.dom;b=document.getElementById(a.id);a=a.id.replace("Password","PasswordEye");a=document.getElementById(a);if(a!==null){a.style.top=b.offsetTop+(b.offsetHeight/2-9)+"px";a.style.left=b.offsetLeft+(b.offsetWidth-35)+"px"}}}
|
|
1557
1558
|
pui.widgets.add({name:"password field",tag:"input",inputType:"password",newId:"Password",propertySetters:{"field type":function(b){b.dom.value=b.evalProperty("value");if(!b.design){if(pui.pa&&!pui.zf){T(b.dom,"focus",function(){Bb("ipadKeyboard").style.display=""});T(b.dom,"blur",function(){Bb("ipadKeyboard").style.display="none"})}if(b.dom.getAttribute("autocomplete")==null&&(P!="genie"||!pui.F.config.$g)){b.dom.setAttribute("autocomplete","off");P=="dspf"&&b.dom.setAttribute("name",pui.Rd())}P==
|
|
1558
|
-
"dspf"&&T(b.dom,"click",function(a){if(pui["highlight on focus"]){a.target.focus();a.target.select()}})}},value:function(b){b.dom.value=b.value},top:function(b){ve(b)},left:function(b){ve(b)},width:function(b){ve(b)},height:function(b){ve(b)},"browser auto complete":function(b){if(!b.design){b.dom.setAttribute("autocomplete",b.value);if(P=="dspf")b.value=="off"?b.dom.setAttribute("name",pui.Rd()):b.dom.removeAttribute("name")}},"show visibility eye":function(b){if(b.properties["parent tab"]===
|
|
1559
|
-
b.value;ue(b)}else pui.alert("Cannot turn property to true when password field is contained in a Tab Panel control. Please use a Tab Layout control.")}},qc:function(b){b.propertyName=="field type"&&b.za&&b.za.l!=null&&b.dom&&b.dom.l==null&&pui.sg(b.dom)}});pui.widgets.add({name:"radio button",tag:"input",inputType:"radio",Zo:"label",resizable:false,defaults:{label:"Radio Button"},propertySetters:{"field type":function(b){if(b.design&&!pui.is_quirksmode)if(!pui.is_old_ie)b.dom.style.margin="2px";if(!b.design){var a=b.evalProperty("label");if(a!=""){if(b.properties.left!=null)b.dom.style.left=b.properties.left;if(b.properties.top!=null)b.dom.style.top=b.properties.top;pui.Cr(b.dom,a)}if(P=="dspf"){var c=b.evalProperty("value");a=b.evalProperty("radio button group");
|
|
1559
|
+
"dspf"&&!Eb()&&T(b.dom,"click",function(a){if(pui["highlight on focus"]){a.target.focus();a.target.select()}})}},value:function(b){b.dom.value=b.value},top:function(b){ve(b)},left:function(b){ve(b)},width:function(b){ve(b)},height:function(b){ve(b)},"browser auto complete":function(b){if(!b.design){b.dom.setAttribute("autocomplete",b.value);if(P=="dspf")b.value=="off"?b.dom.setAttribute("name",pui.Rd()):b.dom.removeAttribute("name")}},"show visibility eye":function(b){if(b.properties["parent tab"]===
|
|
1560
|
+
undefined){b.properties["show visibility eye"]=b.value;ue(b)}else pui.alert("Cannot turn property to true when password field is contained in a Tab Panel control. Please use a Tab Layout control.")}},qc:function(b){b.propertyName=="field type"&&b.za&&b.za.l!=null&&b.dom&&b.dom.l==null&&pui.sg(b.dom)}});pui.widgets.add({name:"radio button",tag:"input",inputType:"radio",Zo:"label",resizable:false,defaults:{label:"Radio Button"},propertySetters:{"field type":function(b){if(b.design&&!pui.is_quirksmode)if(!pui.is_old_ie)b.dom.style.margin="2px";if(!b.design){var a=b.evalProperty("label");if(a!=""){if(b.properties.left!=null)b.dom.style.left=b.properties.left;if(b.properties.top!=null)b.dom.style.top=b.properties.top;pui.Cr(b.dom,a)}if(P=="dspf"){var c=b.evalProperty("value");a=b.evalProperty("radio button group");
|
|
1560
1561
|
if(c!=null&&a!=null)if(c==a||!isNaN(Number(c))&&!isNaN(Number(a))&&Number(c)==Number(a)){if(pui.is_old_ie)b.dom.name="radio";b.dom.checked=true}T(b.dom,"click",function(){if(b.dom.readOnly)if(b.dom.checked==false)b.dom.checked=true;else if(b.dom.checked==true)b.dom.checked=false});T(b.dom,"keydown",function(f){switch(true){case f.keyCode==9&&f.shiftKey==false:var h=b.dom.nextSibling,g=h.nextSibling;if(h.Vs==true&&g&&g.type=="radio"){f.preventDefault();g.focus()}break;case f.keyCode==9&&f.shiftKey==
|
|
1561
1562
|
true:h=b.dom.previousSibling;g=h.previousSibling;if(h.Vs==true&&g&&g.type=="radio"){f.preventDefault();g.focus()}break;default:break}})}else if(P=="genie"){a=b.evalProperty("related field");var e=false;if(b.dom.B)c=b.dom.B;else if(a!="")if(b.dom.cy){if(b.dom.cy.B)c=related.B}else e=true;if(c)if(c.bypass){b.dom.disabled=true;c=c.attr;e=c=="27"||c=="2F"||c=="37"||c=="3F"}if(e){b.dom.style.visibility="hidden";if(b.dom.Ld)b.dom.Ld.style.visibility="hidden"}}}},visibility:function(b){if(!b.design&&b.dom.Ld)b.dom.Ld.style.visibility=
|
|
1562
1563
|
b.value=="hidden"?"hidden":""},"css class":function(b){if(b.design&&b.e.label){b.e.label.className="label-for";var a=Lb(b.value.split(" ")[0]);a!=""&&pui.Q(b.e.label,"label-for-"+a)}}}});pui.cp=function(b,a,c){b=pui.ha(b);var e=pui.ha(a);c.choices={};for(var f=0;f<b.length;f++){var h=b[f],g=e[f];if(g==null||a=="")g=h;if(c.tagName=="SELECT"){var l=new Option(h,g);c.options[c.options.length]=l}c.choices[g]=h}};
|
|
@@ -1666,9 +1667,9 @@ W)==0)N=true;else{W.moveEnd("character",-1);if(W.text==X)y+="\r\n";else N=true}i
|
|
|
1666
1667
|
s-=1}n=n.substr(0,s-1)+n.substr(s);if(s<=l[0])F=1;s-=1;b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();b.cancelBubble=true;b.returnValue=false;w=s}else if(A==46&&B=="keydown"){g.Yr=true;if(s<=l[0])g.cs=true}else if(A==46&&B=="keyup"){delete g.Yr;delete g.cs}else if(B=="input"){G=g.Yr===true;F=g.cs===true?1:0}if(A==13&&B=="keydown"){var D=0;for(o=0;o<r;o++){var E=n.charAt(o);E=="\n"&&D++}if(D+1>=l.length){b.preventDefault&&b.preventDefault();b.returnValue=false}else{b.stopPropagation&&
|
|
1667
1668
|
b.stopPropagation();b.cancelBubble=true}}var C,K=false;if(g.qd!=null&&g.qd[0]!=null&&g.qd[0].B!=null&&g.qd[0].B.wrapped!==true&&(B=="input"||B=="keydown"&&A==8)){h();for(o=E=0;o<p.length;o++){if(s>=E&&s<E+p[o].length){C=o;break}E+=p[o].length}if(s==E)C=p.length-1}else if(B!="paste"){D=false;for(o=0;o<r;o++){E=n.charAt(o);if(E=="\n"||E=="\r"){if(o<w)s-=1;if(E=="\n"){if(!D&&!c())break;D=false}}else{if(a(t)>=l[t]){if(!c())break;D=true}p[t]+=E}if(w==o)C=t}}if(w==r)C=t;E="";for(o=0;o<=t;o++){E+=p[o];if(o!=
|
|
1668
1669
|
t){E+="\n";if(E.length-1<s&&B!="paste"&&!K)s+=1}}D=g.value.replace(/\r/g,"");if(B=="keydown"&&!g.Pr&&g.selectionStart===g.selectionEnd&&e(A))if(p.length>=l.length&&C!=null){var R=true;for(o=C;o<l.length;o++)if(p[o].length<l[o]){R=false;break}if(R){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();b.cancelBubble=true;b.returnValue=false;return}}if(E!=D&&g.qd[0]!=null){if(B=="paste"){g.value=E;f(g,s,s)}if(A==8){g.value=E;f(g,w,w)}}if(E!=D&&!g.qd){g.value=E;f(g,s,s)}}}};
|
|
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.tt)b.dom.tt=b.za.tt;if(b.za.qd)b.dom.qd=b.za.qd;if(b.za.Yi)b.dom.Yi=b.za.Yi;P=="dspf"&&!b.design&&T(b.dom,"keydown",function(a){a=a||window.event;if(a.keyCode==13)a.cancelBubble=true});if(b.design)b.dom.aq=false;if(P=="dspf")T(b.dom,"click",function(a){if(pui["highlight on focus"]){a.target.focus();
|
|
1670
|
+
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.tt)b.dom.tt=b.za.tt;if(b.za.qd)b.dom.qd=b.za.qd;if(b.za.Yi)b.dom.Yi=b.za.Yi;P=="dspf"&&!b.design&&T(b.dom,"keydown",function(a){a=a||window.event;if(a.keyCode==13)a.cancelBubble=true});if(b.design)b.dom.aq=false;if(P=="dspf"&&!Eb())T(b.dom,"click",function(a){if(pui["highlight on focus"]){a.target.focus();
|
|
1670
1671
|
a.target.select()}});else if(typeof pui["allow spellcheck"]=="boolean")b.dom.aq=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.sg(b.dom);b.dom&&b.dom.l!=null&&pui.ip(b)}});pui.widgets.add({name:"textbox",tag:"input",newId:"TextBox",defaults:{"css class":"input"},wt:true,Ls:"pui-prompt",propertySetters:{"field type":function(b){b.dom.value=b.evalProperty("value");if(!b.design){pd(b.properties,b.originalValue,b.dom);if(pui.pa&&!pui.zf&&b.dom.id.indexOf(".")==-1){T(b.dom,"focus",function(){Bb("ipadKeyboard").style.display=""});T(b.dom,"blur",function(){Bb("ipadKeyboard").style.display="none"})}if(typeof pui["allow spellcheck"]=="boolean")b.dom.aq=pui["allow spellcheck"];
|
|
1671
|
-
b.dom.calimg&&pui.Dp(b.dom);if(b.dom.getAttribute("autocomplete")==null&&(P!="genie"||!pui.F.config.$g)){b.dom.setAttribute("autocomplete","off");P=="dspf"&&b.dom.setAttribute("name",pui.Rd())}}var a=b.evalProperty("prompt icon");if(b.design){b.dom.readOnly=true;b.dom.aq=false;var c=b.e;c.Ml=null;if(a)c.Ml=a;b.dom.sizeMe=function(){c.mh();c.Eg()}}else b.dom.sizeMe=function(){pui.hp(b.dom)};b.dom.ge=true;a&&!b.design&&pui.Cv(b);P=="dspf"&&T(b.dom,"click",function(e){if(pui["highlight on focus"]){e.target.focus();
|
|
1672
|
+
b.dom.calimg&&pui.Dp(b.dom);if(b.dom.getAttribute("autocomplete")==null&&(P!="genie"||!pui.F.config.$g)){b.dom.setAttribute("autocomplete","off");P=="dspf"&&b.dom.setAttribute("name",pui.Rd())}}var a=b.evalProperty("prompt icon");if(b.design){b.dom.readOnly=true;b.dom.aq=false;var c=b.e;c.Ml=null;if(a)c.Ml=a;b.dom.sizeMe=function(){c.mh();c.Eg()}}else b.dom.sizeMe=function(){pui.hp(b.dom)};b.dom.ge=true;a&&!b.design&&pui.Cv(b);P=="dspf"&&!Eb()&&T(b.dom,"click",function(e){if(pui["highlight on focus"]){e.target.focus();
|
|
1672
1673
|
e.target.select()}})},value:function(b){if(b.dom.xr)b.dom.xr=false;else b.dom.value=b.value},"input type":function(b){if(!b.design)try{b.dom.setAttribute("type",b.value)}catch(a){}},"browser auto complete":function(b){if(!b.design){b.dom.setAttribute("autocomplete",b.value);if(P=="dspf")b.value=="off"?b.dom.setAttribute("name",pui.Rd()):b.dom.removeAttribute("name")}},"choices url":function(b){!b.design&&b.dom&&b.dom.lc&&typeof b.dom.lc.Gu==="function"&&b.dom.lc.Gu(b.value)},"prompt icon":function(b){var a=
|
|
1673
1674
|
b.value;if(b.design){b=b.e;b.Ml=null;if(a)b.Ml=a;b.mh();b.Eg()}},visibility:function(b){if(b.dom.vj)b.dom.vj.style.visibility=b.value==="hidden"?"hidden":""},"css class":function(b){b.design&&b.e.mh()}},qc:function(b){b.propertyName=="field type"&&b.za&&b.za.l!=null&&b.dom&&b.dom.l==null&&pui.sg(b.dom);b.dom&&b.dom.l!=null&&pui.ip(b)}});
|
|
1674
1675
|
pui.Cv=function(b){var a=document.createElement("div"),c=b.evalProperty("prompt icon");a.classList.add("pui-prompt");for(var e=0;e<b.dom.classList.length;e++)a.classList.add("pui-prompt-"+b.dom.classList[e]);if(c.substr(0,9)==="material:"){c=c.substr(9);a.innerText=Lb(c);a.classList.add("pui-material-icons")}else if(c.substr(0,12)==="fontAwesome:"){c=Lb(c.substr(12));a.classList.add("pui-fa-icons fa-"+c);a.innerText=""}else{e=[{type:"material",title:"Material Icons",classList:{"":"pui-material-icons"}},
|
|
@@ -1815,11 +1816,11 @@ pui.layout.template.getProxy=function(b){var a=pui.layout.template.load({templat
|
|
|
1815
1816
|
false;if(b.propertyName=="field type"){b.dom.layout.setProperty("width",b.properties.width);b.dom.layout.setProperty("height",b.properties.height);b.properties["inline style"]&&pui.fr(b.dom,b.properties["inline style"],true)}}b.dom.layout.Sx=b.dom.layout.template;b.dom.layout.template=b.properties.template;e=null;if(b.propertyName=="template"){e=b.dom.layout.template;b.dom.layout.template=b.value}var f=Jc(pui.layout.Ni());for(var h in b.properties)f[h]||(b.dom.layout.Qa[h]=b.properties[h]);h=b.dom.layout.applyTemplate();
|
|
1816
1817
|
if(h.success==false&&e!=null){a.template=e;setTimeout(a.Vf.bind(a),1,"template",e);c=false}if(h.success==true&&(!b.design||Ib.zh||Ib.Mx))b.dom.layout.wc=h.wc}c&&b.dom.layout.setProperty(b.propertyName,b.value)},qc:function(b){var a=b.dom;if(a)(a=a.Ja)&&a.hu(b.propertyName,b.value)},initialize:function(b){if(!b.design){b=b.dom;var a=b.id;if(a==null)a="";var c=b.className;if(c==null)c="";if(a.toLowerCase()=="scroller"||c.toLowerCase()=="scroller")pui.is_old_ie||ye(b.layout)}}});if(!window.profound)window.profound={};window.profound.ai||(window.profound.ai={});
|
|
1817
1818
|
profound.ai.Chat=function(){function b(){if(window.pui&&window.pui.ide&&window.pui.ide.designerId)return true;return false}function a(){var aa=Ext.getCmp("centerPanel").getActiveTab(),na={};if(aa.isAIAgent&&aa.aiAgent)na.aiAgent=aa.aiAgent;if(aa.isAIAgent&&aa.dataAccess)na.dataAccess=aa.dataAccess;Object.assign(na,Object.fromEntries(Object.entries(aa.pjsModule).filter(function(ma){return typeof ma[1]!=="function"})));return na}function c(){function aa(){var ma=r.lastChild.querySelectorAll(".pai-chart");
|
|
1818
|
-
if(ma.length!==0)if(profound.ai.Gk){for(var sa=0;sa<ma.length;sa++){var qa=ma[sa],
|
|
1819
|
-
|
|
1819
|
+
if(ma.length!==0)if(profound.ai.Gk){for(var sa=0;sa<ma.length;sa++){var qa=ma[sa],Ka=JSON.parse(qa.getAttribute("data-config"));qa.removeAttribute("data-config");qa.chart=new window.Chart(qa.querySelector("canvas"),Ka);qa=qa.querySelector("span");qa.parentNode.removeChild(qa)}r.scrollTop=r.scrollHeight}else{na++;na<20&&setTimeout(aa,1E3)}}var na=0;aa()}function e(aa){function na(){aa.read().then(function(Ka){var ga=Ka.value;if(Ka.done){o.hideLoader();c()}else{Ka=ma.decode(ga).split("\n");for(ga=0;ga<
|
|
1820
|
+
Ka.length-1;ga++){var ua=Ka[ga];if(ua){ua=JSON.parse(ua);if(ua.threadId)A=ua.threadId;if(ua.status==="error"){o.hideLoader();o.add({message:"Error: "+ua.message,type:"error"});return}if(ua.status==="calling"){var Pa=r.lastChild;ua=Pa.innerHTML.replace(Q,"")+'<p>Calling <span class="pai-function-name">'+ua["function"]+"</span>.</p>";o.add({message:ua+Q,type:"agent-response",replace:true})}else if(ua.status==="calls completed"){Pa=r.lastChild;var ra="<p>";ra+=ua.count===1?"Call completed.":ua.count+
|
|
1820
1821
|
" calls completed.";ra+="</p>";ra=Pa.innerHTML.replace(Q,"")+ra;o.add({message:ra+Q,type:"agent-response",replace:true})}else{if(ua.status==="file")sa=sa.replace(ua.placeholderUrl,ua.fileUrl);sa+=ua.text;if(ua.charts){if(!profound.ai.Gk){var gb=window.define;window.define=undefined;profound.ai.bp(ha,function(){window.define=gb;profound.ai.Gk=true})}qa=ua.charts}if(qa)for(var ta in qa)sa=sa.replace(ta,'<div class="pai-chart" data-config="'+JSON.stringify(qa[ta]).replace(/"/g,""")+'"><span>Loading chart...</span><canvas></canvas></div>');
|
|
1821
1822
|
Pa=sa&&typeof window.marked==="function"?window.marked(sa+Q):sa+Q;ua.status==="citation"&&X.push(ua);for(ua=0;ua<X.length;ua++){ra=X[ua];Pa=Pa.replace(ra.citationPlaceholder,ra.citationContent)}o.add({message:Pa,type:"agent-response",replace:true})}}}na()}})}var ma=new TextDecoder("utf-8"),sa="",qa;na()}function f(aa){var na=aa.status;if(aa.threadId)A=aa.threadId;if(aa.runId)B=aa.runId;if(aa.modelKey)G=aa.modelKey;if(aa.message){var ma=aa.message,sa="agent-response";if(aa.status==="error"){ma="Error: "+
|
|
1822
|
-
ma;sa="error"}if(aa.status==="failed"){ma="Failed: "+ma;sa="error"}if(aa.status==="cancelled"){ma="Cancelled";sa="error"}if(aa.status==="expired"){ma="Chat Expired";sa="error"}if(aa.charts){if(!profound.ai.Gk){var qa=window.define;window.define=undefined;profound.ai.bp(ha,function(){window.define=qa;profound.ai.Gk=true})}var
|
|
1823
|
+
ma;sa="error"}if(aa.status==="failed"){ma="Failed: "+ma;sa="error"}if(aa.status==="cancelled"){ma="Cancelled";sa="error"}if(aa.status==="expired"){ma="Chat Expired";sa="error"}if(aa.charts){if(!profound.ai.Gk){var qa=window.define;window.define=undefined;profound.ai.bp(ha,function(){window.define=qa;profound.ai.Gk=true})}var Ka=aa.charts;for(var ga in Ka)ma=ma.replace(ga,'<div class="pai-chart" data-config="'+JSON.stringify(Ka[ga]).replace(/"/g,""")+'"><span>Loading chart...</span><canvas></canvas></div>')}o.add({message:ma,
|
|
1823
1824
|
type:sa});aa.charts&&c()}na==="queued"||na==="in_progress"?setTimeout(function(){o.poll()},F):o.hideLoader()}function h(){t.value===""||o.isLoading()?s.classList.remove("pai-send-button-active"):s.classList.add("pai-send-button-active");var aa="webkitSpeechRecognition"in window||"SpeechRecognition"in window;if(b()){var na=Ext.getCmp("aiAgentModel").getValue();if(pui.modelVoiceSettings)W=pui.modelVoiceSettings[na];W||(W={})}if(aa&&W.enabled===false)aa=false;if(aa){t.classList.add("pai-with-voice");
|
|
1824
1825
|
w.classList.remove("pai-hidden")}else{t.classList.remove("pai-with-voice");w.classList.add("pai-hidden")}}function g(){t.style.height="1px";var aa=t.scrollHeight==0?21:t.scrollHeight;if(aa<21)aa=21;if(aa>100)aa=100;r.style.height="calc(100% - "+(aa+54+(o.heading?74:0))+"px)";t.style.height=aa+"px"}function l(aa,na){if(typeof aa!=="string")return aa;if(aa.length!==7)return aa;if(aa.substring(0,1)!=="#")return aa;var ma=parseInt(aa.substring(1,3),16),sa=parseInt(aa.substring(3,5),16),qa=parseInt(aa.substring(5,
|
|
1825
1826
|
7),16);ma=parseInt(ma*(100+na)/100);sa=parseInt(sa*(100+na)/100);qa=parseInt(qa*(100+na)/100);ma=ma<255?ma:255;sa=sa<255?sa:255;qa=qa<255?qa:255;ma=ma.toString(16).length==1?"0"+ma.toString(16):ma.toString(16);sa=sa.toString(16).length==1?"0"+sa.toString(16):sa.toString(16);qa=qa.toString(16).length==1?"0"+qa.toString(16):qa.toString(16);return"#"+ma+sa+qa}var o=this,n=null,r=null,p=null,t=null,s=null,w=null,A=null,B=null,G=null,F=1E3,D=null,E=null,C="Thinking",K="",R="light",N=null,M=false,W={},
|
|
@@ -1827,16 +1828,16 @@ Q='<span class="pai-loader-dot pai-inline-loader"></span>',ha="https://cdn.jsdel
|
|
|
1827
1828
|
if(aa.greeting)o.greeting=aa.greeting;if(aa.agent)o.agent=aa.agent;if(aa.pollInterval)F=aa.pollInterval;if(aa.loaderMessage)C=aa.defaultLoaderMessage;if(aa.server)K=aa.server;if(aa.data)o.data=aa.data;if(aa.stream)M=aa.stream;if(typeof aa.voice==="object")W=aa.voice;if(aa.jwt)Y=aa.jwt;o.dom=document.createElement("div");o.dom.classList.add("pai-chat");o.dom.classList.add("pai-hidden");aa.container.appendChild(o.dom);if(aa.closeButton){n=document.createElement("div");n.classList.add("pai-close-button");
|
|
1828
1829
|
n.title=aa.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>';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");
|
|
1829
1830
|
p.classList.add("pai-prompt-area");t=document.createElement("textarea");t.classList.add("pai-prompt-box");t.setAttribute("placeholder",aa.promptPlaceHolder);t.addEventListener("keydown",function(sa){if(sa.key==="Enter"){sa.shiftKey||sa.preventDefault();sa.stopPropagation();sa.shiftKey||o.send()}h()});t.addEventListener("input",function(){g();h()});p.appendChild(t);w=document.createElement("div");w.classList.add("pai-voice-button");w.title=aa.voiceTitle;w.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="M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm4.5-3c0 2.5-2 4.5-4.5 4.5S7.5 13.5 7.5 11H6c0 3.07 2.13 5.64 5 6.32V21h2v-3.68c2.87-.68 5-3.25 5-6.32h-1.5z"/></svg>';
|
|
1830
|
-
p.appendChild(w);if("webkitSpeechRecognition"in window||"SpeechRecognition"in window){y=window.SpeechRecognition||window.webkitSpeechRecognition;ea=new y;ea.continuous=true;ea.interimResults=true;w.addEventListener("click",function(){ea.lang=W.lang?W.lang:"en-US";w.classList.contains("pai-recording")?ea.stop():ea.start();w.classList.toggle("pai-recording")});ea.onresult=function(sa){if(w.classList.contains("pai-recording")){for(var qa=[],
|
|
1831
|
+
p.appendChild(w);if("webkitSpeechRecognition"in window||"SpeechRecognition"in window){y=window.SpeechRecognition||window.webkitSpeechRecognition;ea=new y;ea.continuous=true;ea.interimResults=true;w.addEventListener("click",function(){ea.lang=W.lang?W.lang:"en-US";w.classList.contains("pai-recording")?ea.stop():ea.start();w.classList.toggle("pai-recording")});ea.onresult=function(sa){if(w.classList.contains("pai-recording")){for(var qa=[],Ka=0;Ka<sa.results.length;Ka++)qa.push(sa.results[Ka][0].transcript);
|
|
1831
1832
|
t.value=qa.join("");g();t.scrollTop=t.scrollHeight;t.focus();h()}};ea.onend=function(){w.classList.remove("pai-recording");t.select();h()};ea.onerror=function(sa){o.add({message:"Speech recognition error: "+sa.error,type:"error"})}}s=document.createElement("div");s.classList.add("pai-send-button");s.title=aa.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>';
|
|
1832
1833
|
s.addEventListener("click",function(){o.send()});p.appendChild(s);o.dom.appendChild(p);D=document.createElement("div");D.classList.add("pai-loader");E=document.createElement("span");E.classList.add("pai-loader-message");D.appendChild(E);for(var na=1;na<=3;na++){var ma=document.createElement("div");ma.classList.add("pai-loader-dot");D.appendChild(ma)}o.clear();aa.theme&&o.setTheme(aa.theme);aa.brandColor&&o.setBrandColor(aa.brandColor);h()};this.show=function(){o.dom.classList.remove("pai-hidden");
|
|
1833
1834
|
t.focus()};this.hide=function(){o.dom.classList.add("pai-hidden")};this.add=function(aa){var na=aa.message,ma=document.createElement("div");ma.classList.add("pai-message");var sa=aa.type;sa||(sa="user-message");ma.classList.add("pai-"+sa);if(sa==="agent-response"){ma.classList.add("markdown-body");if(K)na=na.replace(/<img src="\/profound-ai\/image\?file=/g,'<img src="'+K+"/profound-ai/image?file=");ma.innerHTML=na;ma.querySelectorAll("a").forEach(function(qa){qa.addEventListener("click",function(){pui.skipConfirm=
|
|
1834
|
-
true;setTimeout(function(){pui.skipConfirm=false},250)})});ma.querySelectorAll("span.pai-citation").forEach(function(qa){function
|
|
1835
|
-
Pa.top-ga.offsetHeight-5+"px";ga.addEventListener("mouseenter",function(){clearTimeout(ua)});ga.addEventListener("mouseleave",function(){
|
|
1835
|
+
true;setTimeout(function(){pui.skipConfirm=false},250)})});ma.querySelectorAll("span.pai-citation").forEach(function(qa){function Ka(){if(ga&&!ga.matches(":hover")){qa.removeChild(ga);ga=null}}var ga,ua;qa.addEventListener("mouseenter",function(){if(!ga)if(qa.getAttribute("data-citation")){ga=document.createElement("div");ga.classList.add("pai-tooltip-content");ga.innerHTML=qa.getAttribute("data-citation");qa.appendChild(ga);var Pa=qa.getBoundingClientRect();ga.style.left=Pa.left+"px";ga.style.top=
|
|
1836
|
+
Pa.top-ga.offsetHeight-5+"px";ga.addEventListener("mouseenter",function(){clearTimeout(ua)});ga.addEventListener("mouseleave",function(){Ka()})}});qa.addEventListener("mouseleave",function(){ua=setTimeout(Ka,100)})});if(aa.replace)(aa=r.lastChild)&&aa.classList.contains("pai-agent-response")&&aa.parentNode.removeChild(aa)}else ma.innerText=na;r.appendChild(ma);r.scrollTop=r.scrollHeight};this.clear=function(){w.classList.contains("pai-recording")&&ea.stop();t.value="";r.innerHTML="";o.greeting&&o.add({message:o.greeting,
|
|
1836
1837
|
type:"greeting"});o.setHeading(o.heading);o.setBrandColor(N);h();B=A=null};this.setTheme=function(aa){R=aa;R=typeof R!=="string"?"light":R.toLowerCase();R==="dark"?o.dom.classList.add("pai-dark"):o.dom.classList.remove("pai-dark")};this.setBrandColor=function(aa){N=aa;if(aa=o.dom.querySelector(".pai-heading")){aa.style.backgroundColor=null;aa.style.backgroundImage=null;aa.classList.remove("pai-branded")}n&&n.classList.remove("pai-branded");s.style.backgroundColor=null;if(N){var na=l(N,-30);if(aa){aa.style.backgroundColor=
|
|
1837
1838
|
N;aa.style.backgroundImage="linear-gradient(to right, "+N+", "+na+")";aa.classList.add("pai-branded")}n&&aa&&n.classList.add("pai-branded");s.style.backgroundColor=N}};this.setHeading=function(aa){var na=o.dom.querySelector(".pai-heading");if(aa){if(na===null){na=document.createElement("div");na.classList.add("pai-heading");o.dom.prepend(na);g()}na.innerText=aa}else if(na!==null){na.remove();g()}};this.send=function(){if(t.value!=="")if(!o.isLoading()){if(w.classList.contains("pai-recording")){ea.stop();
|
|
1838
1839
|
w.classList.toggle("pai-recording")}o.onSend&&o.onSend(t.value);o.add({message:t.value});X=[];var aa={};aa.message=t.value;if(A)aa.threadId=A;var na="/profound-ai/chat";if(b()){aa.agentData=a();aa.agentFile=Ext.getCmp("centerPanel").getActiveTab().title.replace(/\*/g,"").trim();M=pui.streamingModelList.includes(aa.agentData.aiAgent.model);na="/ide/profound-ai/chat"}else aa.agent=o.agent;var ma=o.data;if(typeof ma==="function")ma=ma();if(o.data)aa.data=ma;t.value="";g();t.focus();o.showLoader();ma=
|
|
1839
|
-
{"Content-Type":"application/json"};if(M){ma.Connection="keep-alive";ma["Response-Type"]="stream"}if(pui.appJob.authToken)ma.Authorization="Bearer "+pui.appJob.authToken;else if(Y){var sa=Y;if(typeof sa==="function")sa=sa();ma.Authorization="Bearer "+sa}fetch(K+na,{method:"POST",headers:ma,body:JSON.stringify(aa)}).then(function(qa){return M?qa.body.getReader():qa.json()}).then(function(qa){M?e(qa):f(qa)})["catch"](function(qa){o.hideLoader();o.add({message:"Error: "+qa.message,type:"error"})})}};
|
|
1840
|
+
{"Content-Type":"application/json"};if(M){ma.Connection="keep-alive";ma["Response-Type"]="stream"}if(pui.appJob&&pui.appJob.authToken)ma.Authorization="Bearer "+pui.appJob.authToken;else if(Y){var sa=Y;if(typeof sa==="function")sa=sa();ma.Authorization="Bearer "+sa}fetch(K+na,{method:"POST",headers:ma,body:JSON.stringify(aa)}).then(function(qa){return M?qa.body.getReader():qa.json()}).then(function(qa){M?e(qa):f(qa)})["catch"](function(qa){o.hideLoader();o.add({message:"Error: "+qa.message,type:"error"})})}};
|
|
1840
1841
|
this.poll=function(){if(!(!A||!B||!G)){var aa={};aa.threadId=A;aa.runId=B;aa.modelKey=G;var na="/profound-ai/poll";if(b())na="/ide/profound-ai/poll";fetch(K+na,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(aa)}).then(function(ma){return ma.json()}).then(function(ma){f(ma)})["catch"](function(ma){o.hideLoader();o.add({message:"Error: "+ma.message,type:"error"})})}};this.showLoader=function(aa){aa||(aa=C);E.innerText=aa;if(!o.isLoading()){M?o.add({message:Q,type:"agent-response"}):
|
|
1841
1842
|
r.appendChild(D);h()}r.scrollTop=r.scrollHeight};this.hideLoader=function(){if(o.isLoading()){if(M)for(var aa=r.querySelectorAll(".pai-inline-loader"),na=aa.length-1;na>=0;na--)aa[na].parentNode.removeChild(aa[na]);else r.removeChild(D);h()}};this.isLoading=function(){if(M)return r.querySelectorAll(".pai-inline-loader").length>0;return D.parentNode===r};this.destroy=function(){if(o.dom){o.dom.parentNode.removeChild(o.dom);o.dom=null}};this.removeEmbedIcon=function(){profound.ai.removeEmbedIcon()}};
|
|
1842
1843
|
profound.ai.dt=function(b){if(!document.querySelector('link[href="'+b+'"]')){var a=document.createElement("link");a.rel="stylesheet";a.href=b;document.head.appendChild(a)}};profound.ai.bp=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)}};
|
|
@@ -1854,7 +1855,7 @@ window.postTo=function(b){b||pui.alert("postTo Error: URL not specified.");var a
|
|
|
1854
1855
|
window.changeElementClass=function(b,a){var c=document.getElementById(b);if(c==null)return"";c.className=a};window.newElement=Yc;window.preventEvent=vb;window.setTab=function(b,a){var c=Bb(b);if(c==null||c.setTab==null)Zc[b]=a;else c.setTab(a)};window.ltrim=Ub;window.rtrim=Pb;window.trim=Lb;window.attachCalendar=function(b,a){var c=document.getElementById(b);c!=null&&Ld(c,a)};window.createNamedElement=Yb;window.getInnerText=Oc;
|
|
1855
1856
|
window.setDOMAttribute=function(b,a,c){b=typeof b=="string"?document.getElementById(b):b;if(b!=null)try{b[a]=c}catch(e){}};
|
|
1856
1857
|
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(",");
|
|
1857
|
-
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=T;window.removeEvent=ac;window.getMouseX=$c;window.getMouseY=ad;window.showErrors=function(){if(
|
|
1858
|
+
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=T;window.removeEvent=ac;window.getMouseX=$c;window.getMouseY=ad;window.showErrors=function(){if(Ua.length==0)alert("No errors have been reported.");else for(var b,a=0;a<Ua.length;a++){b=Ua[a];b="Operation: "+b.Fl+"\nId: "+b.id+"\n\nMessage: "+b.text+"\n"+b.um;alert(b)}};window.presskey=function(b){Vb(b)};window.pressKey=Vb;window.pressKEY=function(b){Vb(b)};
|
|
1858
1859
|
window.Presskey=function(b){Vb(b)};window.PressKey=function(b){Vb(b)};window.PRESSKEY=function(b){Vb(b)};window.applyProperty=Mc;window.show_calendar=Gd;window.hide_calendar=Bc;window.calendar_select=Kd;
|
|
1859
1860
|
window.currentDate=function(b,a){if(b==null||b=="Y")slashes=true;if(Eb()){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].fb.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":
|
|
1860
1861
|
"")+(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}};
|