123456 |
- // Licensed Materials - Property of IBM
- // IBM Cognos Products: rs
- // (C) Copyright IBM Corp. 2003, 2022.
- // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- var _4qc=new _lcm("_4qc");_4qc._jgn=function(_u4c,_rlm){this._vhm=_rlm;this._4le(_u4c);};_4qc._fkl=function(){return this._okm.value;};_4qc._5z2=function(){this._kqn=_9l8._9h8("--support-01");if(!this._okm){this._okm=this._2oh("taText");var fn=this._lqe.bind(this);this._okm.onchange=fn;this._okm.oncut=fn;this._okm.onpaste=fn;this._okm.onkeyup=fn;this._okm.ondrop=fn;this._okm.oninput=fn;this._qtl=this._2oh("trValid");this._tlj=this._2oh("trInvalid");}var s=_8qn._w2g(this._vhm[0].selectSingleNode("configuration"));if(s){try{s=JSON.stringify(JSON.parse(s), undefined, 4);}catch(e){}}this._okm.value=s;if(!this._80f){var _mfi=this._2oh("divRootPane");var _p1k=this._53g("pane");this._80f=new _uzf(_mfi, _p1k, null, this._m56(), this._m75());}var _8bn=this._xmk();this._sej=!!_8bn;if(this._sej){this._7bj(_8bn);}this._2oh( "btnEdit" ).style.display = this._sej?"block":"none";this._2oh( "divProperties" ).style.display = this._sej?"block":"none";this._lqe();};_4qc._xmk=function(){var _8bn;try{_8bn=JSON.parse(this._okm.value);}catch(e){return null;}var _k1c=false;for(var _vdn in _8bn){_k1c=true;switch(_9gm._4fm(_8bn[_vdn])){case "number":case "string":case "boolean":break;case "array":var a=_8bn[_vdn];var _tzl=a.length;for(var i=0;i<_tzl;i++){switch(_9gm._4fm(a[i])){case "string":if(a[i].indexOf(",")!=-1){return null;}break;default:return null;}}break;default:return null;}}return _k1c?_8bn:null;};_4qc._7bj=function(_8bn){var _8pd=this._2oh("divProperties");_8pd.innerHTML="";var _kak="12pt";var _ffl="3px 4px 3px 4px";var d=document;var tbl=_8pd.appendChild(d.createElement("TABLE"));tbl.cellPadding=0;tbl.cellSpacing=0;tbl.className="clsPropertySheet";var tbody=tbl.appendChild(d.createElement("TBODY"));for(var _vdn in _8bn){var _vym=_8bn[_vdn];var _8bm=_9gm._4fm(_vym);var tr=tbody.appendChild(d.createElement("TR"));var td=tr.appendChild(d.createElement("TD"));td.className="clsPropertySheetLabel_inactive";td.style.color="#5b5b5b";td.style.fontSize=_kak;td.style.fontWeight="bold";td.style.padding=_ffl;_4qn._1je(td, _vdn);var _2cm=tr.appendChild(d.createElement("TD"));_2cm.className="clsPropertySheetValue";_2cm.setAttribute( "HAL_isSelectable", "true" );_2cm.style.padding=_ffl;switch(_8bm){case "number":var _pvm=_9l8._9h8("--primary1");var _hyl=_2cm.appendChild(d.createElement("INPUT"));_hyl.type="text";_hyl.style.fontSize=_kak;_hyl.style.width="100%";_hyl.style.borderStyle="none";_hyl.style.color=_pvm;_hyl.value=_vym;_hyl.onkeypress=_4qn._yo3;_hyl.onchange=_4qn._m95;_hyl._vdn=_vdn;_hyl._8bm=_8bm;break;case "string":var _pvm=_9l8._9h8("--support-02");var _hyl=_2cm.appendChild(d.createElement("INPUT"));_hyl.type="text";_hyl.style.fontSize=_kak;_hyl.style.width="100%";_hyl.style.borderStyle="none";_hyl.style.color=_pvm;_hyl.value=_vym;_hyl._vdn=_vdn;_hyl._8bm=_8bm;break;case "boolean":var _iyl=_2cm.appendChild(d.createElement("LABEL"));_iyl.className="clsToggle";var _hyl=_iyl.appendChild(d.createElement("INPUT"));_hyl.type="checkbox";_hyl.checked=_vym;_hyl._vdn=_vdn;_hyl._8bm=_8bm;_iyl.appendChild( d.createElement( "SPAN" ) ).innerHTML = " ";break;case "array":var _pvm=_9l8._9h8("--support-02");var _hyl=_2cm.appendChild(d.createElement("INPUT"));_hyl.type="text";_hyl.style.fontSize=_kak;_hyl.style.width="100%";_hyl.style.borderStyle="none";_hyl.style.color=_pvm;_hyl.value=_vym.join( ", " );_hyl._vdn=_vdn;_hyl._8bm=_8bm;break;}}};_4qc._y92=function(){var _8pd=this._2oh("divProperties");var _8bn={};var nl=_8pd.getElementsByTagName("INPUT");var _tzl=nl.length;for(var i=0;i<_tzl;i++){var _hyl=nl.item(i);switch(_hyl._8bm){case "string":_8bn[_hyl._vdn]=_hyl.value;break;case "number":_8bn[_hyl._vdn]=+_hyl.value.replace(/,/g, "");break;case "boolean":_8bn[_hyl._vdn]=_hyl.checked;break;case "array":var a=_hyl.value.split(",");for(var j=0;j<a.length;j++){a[j]=a[j].trim();}_8bn[_hyl._vdn]=a;break;}}this._okm.value=JSON.stringify(_8bn, undefined, 4);};_4qc._nem=function(){this._y92();this._2oh( "btnEdit" ).style.display = "none";this._2oh( "divProperties" ).style.display = "none";this._sej=false;this._lqe();};_4qc._lqe=function(){var _znm=this._lcg(this._okm.value);this._qtl.style.display=this._sej?"none":( _znm?"":"none" );this._tlj.style.display=this._sej?"none":( _znm?"none":"" );this._okm.style.outlineColor=_znm?"":this._kqn;};_4qc._wl3=function(){if(!this._sej){this._okm.focus();}};_4qc._lcg=function(s){if(s){try{JSON.parse(s);}catch(e){return false;}}return true;};_4qc._o46=function(){this._okm.onchange=null;this._okm.oncut=null;this._okm.onpaste=null;this._okm.onkeyup=null;this._okm.ondrop=null;this._okm.oninput=null;this._okm=null;this._vhm=null;};_4qc._bgn=function(){if(!this._ggm()){return;}this._3le();};_4qc._6ll=function(){this._ggm(true);};_4qc._ggm=function(_g9f){if(this._sej){this._y92();}var s=this._fkl();if(!this._lcg(s)){_k4g(_frh._c6j("IDS_ERR_JSON_INVALID"));return false;}_erh._ybb();var d=this._vhm[0].ownerDocument;if(s){try{s=JSON.stringify(JSON.parse(s), undefined, 4);if(_g9f){this._okm.value=s;}}catch(e){}}for(var i=0;i<this._vhm.length;i++){if(s.length==0){_8qn._cqh(this._vhm[i], "configuration");}else{var n=_erh._h56(this._vhm[i], "configuration");n.text="";n.appendChild(d.createCDATASection(s));}}_erh._iee(true);return true;};_4qc._mwh=function(e){if(_zpn._qsh["hal"]["enableAccessibility"]){return;}switch(e.keyCode){case _4qn._rrh:_4qn._w0g(e);setTimeout(this._m5d.bind(this), 0);break;}};_4qc._acj=function(e){if(e.keyCode==_4qn._gml){if(!_zpn._qsh["hal"]["enableAccessibility"]){_4qn._w0g(e);_4qn._l6j(e);}}this._1f7(e);};_4qc._jo9=function(){this._80f._cbb("_4qc_pane", this._m56(), this._m75());};_4qc._4e1=function(){return this._80f._bg8();};_4qc._1q1=function(){return this._80f._jq9();};
|