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.
- function _amh(_347, _l6h, _b6k, _yxb){_zpn._la6("_frh");_zpn._la6("_vgk");_zpn._la6("_00g");_zpn._la6("_mpc");_amh.baseConstructor.call(this, _l6h, _b6k);this._iok=[];this._1r6=_347;this._onb=_yxb;this._9i7();this._8p4();if(_l6h.nodeName==="treeView"){_l6h.setAttribute("showCheckboxes", this._xue?"true":"false");}else{this._r7d(_l6h);}if(this._3ad){this._1r6.classList.add(_mpc._sle);this._1r6.setAttribute("nemesis_id","PromptControl");if(_o7g._kdb){this._1r6.classList.add(_mpc._ule);}if(_4qn._59b(this._1r6)){this._1r6.classList.add("clsDirectionRtl");}}this._8hn();this._ha6(this._u0i, "min-width: 200px; width: 300px; min-height: 200px; height: 400px");this._96d();};_olk._vjl(_amh, _mpc);_amh.prototype._fdm=function(){if(this._njj&&this._njj._fdm){this._njj._fdm();}while(this._iok.length>0){var _o5m=this._iok.pop();_o5m.remove();}};_amh.prototype._ag7=function(_ffk,_t2k){var _kfc=this._htb;if(_kfc&&_kfc[_ffk]!==undefined){_t2k.setAttribute("selected", "true");delete _kfc[_ffk];}};_amh.prototype._r7d=function(_l6h){var _7fk='<treeView id="PromptTree_' + _l6h.getAttribute("id") + '" multiSelect="false" forceSelection="true"></treeView>';this._lim=_8qn._kph(undefined, _7fk);var _u2k=this._lim.documentElement;_u2k.setAttribute("multiSelect", this._xue?"true":"false");var _g6l=_l6h.selectSingleNode("selectOptions");if(_g6l){this._2o6=_g6l.getAttribute("memberDisplayCountDefault")?Number(_g6l.getAttribute("memberDisplayCountDefault")):20;var _74k=_g6l.selectNodes("./selectTreeOption");if(_74k&&_74k.length>0){var _2kn, _z2m, _t2k, _ffk;for(_2kn=0; _2kn<_74k.length; _2kn++){_z2m=_74k.item(_2kn);_t2k=_u2k.appendChild(_u2k.ownerDocument.createElement("treeNode"));_ffk=_z2m.getAttribute("useValue");_t2k.setAttribute("label", _z2m.getAttribute("displayValue"));_t2k.setAttribute("value", _ffk);_t2k.setAttribute("tooltip", _ffk);_t2k.setAttribute("idsExtraAriaLabel", "IDS_CCHL_AC_TYPE_MEMBER");_t2k.setAttribute("expandable", "true");this._ag7(_ffk, _t2k);}if(_g6l.getAttribute("moreData")=="true"){_t2k=_u2k.appendChild(_u2k.ownerDocument.createElement("treeNode"));_t2k.setAttribute("label", this._klj);_t2k.setAttribute("stateSmallIcon", "icon_more.gif");_t2k.setAttribute("anchorNode", "true");_t2k.setAttribute("idsExtraAriaLabel", "IDS_CCHL_AC_TYPE_MEMBER");_t2k.setAttribute("expandable", "false");_u2k.setAttribute("skipValueCount", this._2o6);}else{_u2k.setAttribute("skipValueCount", 0);}}if(_g6l.getAttribute("moreData")=="true"){}}};_amh.prototype._9i7=function(){_amh.superClass._9i7.call(this);this._8lj=this._9sb.getAttribute("refQuery")||"";this._klj=this._lj7("PMT_TRE_MORE", "IDS_HAL_AC_MORE_TREE_ITEMS");if(this._xue===true){this._nwb=this._9sb.getAttribute("resultsSelectAllText")||this._lj7( "PMT_UIM_SELECTALL", "IDS_CCHL_PRMT_SELECTALL" );this._n29=this._9sb.getAttribute("resultsDeselectAllText")||this._lj7( "PMT_UIM_DESELECTALL", "IDS_CCHL_PRMT_DESELECTALL" );}this._hm6=(this._9sb.getAttribute("parameterizedTree")=="true");this._6fj=this._hm6||this._6fj;};_amh.prototype._s73=function(){var _m94='';if(this._hm6){var _1ni, _fzd=this._9sb.selectNodes("selectHierarchies/selectHierarchy");var _y1k=this._9sb.selectSingleNode("selectHierarchyChoice/selectOption");var _ffk, _x5e, _fb8=_y1k?(_y1k.getAttribute("useValue")||""):"";_m94 += "<div class='pv' style='padding-bottom: 3px'><select class='clsSelectHierarchies clsComboBox' style='width: 100%'>";_m94 += "<option>" + _cgm._qoh(this._9sb.getAttribute("columnName")||"") + "</option>";_m94+= "<option>--------------------------------------------</option>";this._539=_fb8;this._sq6="<selectHierarchies>";for(var _2kn=0; _2kn<_fzd.length; _2kn++){_1ni=_fzd.item(_2kn);_ffk=_1ni.getAttribute("useValue");_x5e=_1ni.getAttribute("displayValue");_m94 += "<option value='" + _cgm._qoh(_ffk||"") + ((_fb8&&_fb8==_ffk)?"' selected>":"'>") +_cgm._qoh(_x5e||"") + "</option>";this._sq6 += "<selectHierarchy useValue='" + _ffk + "' displayValue='" + _x5e + "'></selectHierarchy>";}_m94+= "</select></div>";this._sq6+= "</selectHierarchies>";}return _m94;};_amh.prototype._4p4=function(_lk9){this._ab4();if(!_lk9){this._njj._bzm();this._njj._wfn();this._539="";return;}else if(_lk9==this._539){return;}var _yi3={_promptControl: 'reprompt',encoding: 'UTF-8'};var _5nc='<selectChoices></selectChoices>';_yi3['_swt_' + this._e6i + '_hierarchy'] = _cgm._e8j(_lk9); _yi3['_swt_' + this._e6i + '_hierarchies'] = _cgm._e8j(this._sq6);_yi3['p_'+this._e6i]=_cgm._e8j(_5nc);this._vij._1c4(_yi3);};_amh.prototype._8hn=function(){var _kbe=this._1r6.insertRow(0).insertCell(0);var _q2j=(this._3ad?'pa':'clsTreeView');_kbe.innerHTML ='<div class="clsPromptTree" style="display: flex; flex-direction: row;' + (_4qn._59b(this._1r6)?'text-align:right;':'text-align:left;') + '">' +'<div class="clsAdormentArea" style="padding: 0 2px 0 2px"><div></div><div></div></div>' +'<div style="flex: 1 0 auto; display: flex; flex-direction: column">' +this._s73()+'<div style="flex: 1 0 auto; position: relative">' +'<div class="' + _q2j + '" id="'+this._1r6.id+'_TreePrompt" style="position: absolute; top: 0; right: 0; bottom: 0; left: 0"></div>' +'</div>'+'<div class="clsMultiSelectArea clsDialogText" style="text-align: right; padding: 5px 5px 0 0">' +'<a class="clsHyperlink' + (this._3ad?' pl':'') + '" href="#"></a>' +'</div>'+'</div>'+'</div>';this._u0i=_kbe.firstChild; this._2ig=this._u0i.getElementsByClassName(_q2j)[0];this._5we=this._u0i.getElementsByClassName("clsAdormentArea")[0];this._gn6=this._u0i.getElementsByClassName("clsMultiSelectArea")[0];if(this._x8a===false){if(this._6fj===true){this._3v3(this._5we.firstChild);}}else{this._5we.style.display="none";}this._njj=new _vgk(this._2ig,(this._lim?this._lim.documentElement:this._9sb), this);this._njj._rn9=function(){_vgk.prototype._rn9.call(this._njj);if(this._htb){this._7o5=true;}}.bind(this);var _xyl;if(this._xue===true){this._gn6.classList.add("clsPromptHyperlinksContainer");var _jxg=this._gn6.firstChild;_jxg.innerHTML=this._n29;_xyl=this._q5d.bind(this);_jxg.addEventListener("click", _xyl);this._iok.push({remove: function(){_jxg.removeEventListener("click", _xyl);}});_jxg.addEventListener("keydown", _xyl);this._iok.push({remove: function(){_jxg.removeEventListener("keydown", _xyl);}});}else{this._gn6.style.display="none";}if(this._hm6){var _50l=this._u0i.getElementsByClassName("clsSelectHierarchies")[0];_xyl=function(evt){evt.stopPropagation();if(evt.target.selectedIndex>=0){var _10l=evt.target.options[evt.target.selectedIndex];this._4p4(_10l.getAttribute("value")||"");}}.bind(this);_50l.addEventListener("change", _xyl);this._iok.push({remove: function(){_50l.removeEventListener("change", _xyl);}});}this._8fg=this._1a3();if(this._8fg&&this._8fg.length>0){this._sh1(this._8fg, this._njj._cr9());}};_amh.prototype._ez9=function(){this._njj._rn9(true);if(this._htb){this._htb=null;}this._96d();};_amh.prototype._q5d=function(event){event.stopPropagation();if(event.type==="click"||(event.type==="keydown"&&event.keyCode===_4qn._x8j)){this._ez9();}};_amh.prototype._pbj=function(){var _rlm=this._njj._xg8(), _4vl=[];for(var _2kn=0; _2kn<_rlm.length; _2kn++){_4vl.push(_vgk._7h8(_rlm[_2kn]));}return _4vl;};_amh.prototype._k61=function(_h7k,_t2k){if(this._lim){this._xhj=_t2k;var _ffk=_t2k.getAttribute("value")||"";var _x5e=_t2k.getAttribute("label")||_ffk;var _78k=this._xhj.getAttribute("skipValueCount");return this._3h6(_x5e, _ffk,(_78k?Number(_78k):0));}return false;};_amh.prototype._996=function(_yal){if(_yal){var _m6m=_yal._wg8();this._ts3(_m6m.options, _m6m.skipCount, _m6m.moreData);var _osa=_yal._d97();if(_osa){this._f81(_osa);}this._4n2();if(this._8fg&&this._8fg.length>0&&_m6m.options&&_m6m.options.length>0){this._sh1(this._8fg, this._njj._cr9());}}};_amh.prototype._3h6=function(_x5e,_ffk,_mji){var _rmm=true;var _o49=[{name: this._e6i, display: _x5e, use: _ffk}];var _osa=this._7f6();this._9sk=new _go1(this, _osa, _o49, _mji, this._2o6);this._9sk._ign();this._qt1();return _rmm;};_amh.prototype._ts3=function(_50e,_mji,_9qj){if(_50e){var _a6h=this._xhj||this._njj._cr9();var _5rn=_a6h.ownerDocument;var _mln, _t2k;for(var i=0; i<_50e.length; i++){var _z2m=_50e.item(i);var _ffk=_z2m.getAttribute("useValue");var _x5e=_z2m.getAttribute("displayValue");if(_ffk){_t2k=_a6h.appendChild(_5rn.createElement("treeNode"));_t2k.setAttribute("label", _x5e);_t2k.setAttribute("value", _ffk);_t2k.setAttribute("tooltip", _ffk);_t2k.setAttribute("idsExtraAriaLabel", "IDS_CCHL_AC_TYPE_MEMBER");_t2k.setAttribute("expandable", "true");this._ag7(_ffk, _t2k);}}if(_9qj){_t2k=_a6h.appendChild(_5rn.createElement("treeNode"));_t2k.setAttribute("label", this._klj);_t2k.setAttribute("stateSmallIcon", "icon_more.gif");_t2k.setAttribute("anchorNode", "true");_t2k.setAttribute("idsExtraAriaLabel", "IDS_CCHL_AC_TYPE_MEMBER");_t2k.setAttribute("expandable", "false");_a6h.setAttribute("skipValueCount", _mji+this._2o6);}else{_a6h.setAttribute("skipValueCount", 0);}this._njj._hee(true);}else{this._njj._hee(false);}};_amh.prototype._d66=function(){var _rlm=this._njj._xg8(), _4vl=[];var _gbn, _cqf;for(var _2kn=0; _2kn<_rlm.length; _2kn++){_gbn=_rlm[_2kn];_cqf=new _00g(false, null, _00g._w0n, undefined);_cqf._p6g(_gbn.getAttribute("value"), _u3b._faj);_cqf._3hd=_gbn.getAttribute("label");_4vl.push(_cqf);}var _fnn, _kfc=this._htb||{};for(_fnn in _kfc){if(_kfc.hasOwnProperty(_fnn)){_cqf=new _00g(false, null, _00g._w0n, undefined);_cqf._p6g(_fnn, _u3b._faj);if(_kfc[_fnn]!=null){_cqf._au9(_kfc[_fnn], _u3b._faj);}_4vl.push(_cqf);}}return _4vl;};_amh.prototype._znk=function(){if(this._6fj===true){this._fm6=this._sig?this._sig(this._h6j()):(this._njj._xg8().length>0||this._9r8()===true);}else{this._fm6=true;}if(this._fm6){this._2ig.classList.remove("clsRequiredBorder");this._4n2();}else{this._2ig.classList.add("clsRequiredBorder");this._qt1();}};_amh.prototype._96d=function(_h7k,_t2k,_zdf){this._znk();if(this._vij&&this._vij._x51){this._vij._x51(this);}};_amh.prototype._fg4=function(_h7k,_t2k,_zdf){if(this._htb&&this._7o5){this._htb=null;delete this._7o5;}this._96d(_h7k, _t2k, _zdf);};_amh.prototype._9r8=function(){var _fnn, _kfc=this._htb||{};for(_fnn in _kfc){if(_kfc.hasOwnProperty(_fnn)){return true;}}return false;};_amh.prototype._8p4=function(){var _lua=this._9sb.selectNodes("selectChoices/selectOption");if(_lua.length>0){var _2kn, _z2m, _kfc=this._htb={};for(_2kn=0; _2kn<_lua.length; _2kn++){_z2m=_lua.item(_2kn);_kfc[_z2m.getAttribute("useValue")] = _z2m.getAttribute("displayValue");}}};_amh.prototype._1a3=function(){var _ava=this._9sb.selectNodes("selectChoicesAncestry/selectOption");if(_ava.length>0){var _ffk;var _8pg=[];for(var _2kn=0; _2kn<_ava.length; _2kn++){_ffk=_ava.item(_2kn).getAttribute("useValue");if(_ffk){_8pg.push(_ffk);}}}return _8pg;};_amh.prototype._sh1=function(_8pg,_u2k){if(_8pg){var _t2k, _wqm, _g4m=_u2k.selectNodes(".//treeNode[@expandable='true' and @expanded='false']");for(var _2kn=0; _2kn<_g4m.length; _2kn++){_t2k=_g4m.item(_2kn);_wqm=_8pg.indexOf(_t2k.getAttribute("value"));if(_wqm!=-1){_8pg.splice(_wqm, 1);this._njj._onh(_t2k);break;}}}};_amh.prototype._ab4=function(){this._ez9();};_amh.prototype._95j=function(_4vl){if(!_4vl||_4vl.length<1){this._ab4();}else{var _2kn, _3vm, _t2k;var _u2k=this._njj._cr9();var _hcn="selected", length;if(this._xue){length=_4vl.length;}else{length=1;this._ez9();}for(_2kn=0; _2kn<length; _2kn++){_3vm=_4vl[_2kn];_t2k=_u2k.selectSingleNode(".//treeNode[@value='" + _3vm["use"] + "']");if(_t2k){if(_t2k.getAttribute(_hcn)!="true"){_t2k.setAttribute(_hcn, "true");this._njj._qxh(this._njj._gqn.getElementById(_t2k.getAttribute("htmlId")), _t2k);}}else{if(!this._htb){this._htb={};}this._htb[_3vm["use"]] = _3vm["display"];}}this._96d();}};function _go1(_b6k, _4b9, _o49, _qoa, _36c){this._owb="";var _4eh ='<rns1:getPromptValues>'+'<bus:conversation xsi:type="bus:asynchRequest">' +this._zp8(_4b9)+'</bus:conversation>'+'<parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]">' +this._zf6(_o49)+'</parameterValues>'+'<options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[]">' +'<item xsi:type="bus:runOptionInt">' +'<bus:name xsi:type="bus:runOptionEnum">skipValueCount</bus:name>' +'<bus:value xsi:type="xsd:int">' + _qoa + '</bus:value>' +'</item>'+'<item xsi:type="bus:runOptionInt">' +'<bus:name xsi:type="bus:runOptionEnum">maximumValueCount</bus:name>' +'<bus:value xsi:type="xsd:int">' + _36c + '</bus:value>' +'</item>'+'<item xsi:type="bus:asynchOptionEncoding">' +'<bus:name xsi:type="bus:asynchOptionEnum">attachmentEncoding</bus:name>'+'<bus:value xsi:type="bus:encodingEnum">base64</bus:value>' +'</item>'+'<item xsi:type="bus:asynchOptionInt">' +'<bus:name xsi:type="bus:asynchOptionEnum">primaryWaitThreshold</bus:name>' +'<bus:value xsi:type="xsd:int">' + _ylh._1r3 + '</bus:value>' +'</item>'+'</options>'+'</rns1:getPromptValues>';_go1.baseConstructor.call(this, _b6k, _ylh._4s1, _4eh);this._cq3(_ylh._qk2);};_olk._vjl(_go1, _ylh);_go1.prototype._wg8=function(){var _m6m={"options": null, "skipCount": 0, "moreData": false};if(this._owb){var _i89=_8qn._kph(null, this._owb, false, true);var _bcc=_i89?_7hn._ij8(_i89, 'item/selectOptions'):null;if(_bcc){_m6m.options=_7hn._x5g(_bcc, '*');_m6m.skipCount=Number(_bcc.getAttribute("skipValueCount"));_m6m.moreData=(_bcc.getAttribute("moreData")=="true");}}return _m6m;};_go1.prototype._d97=function(){return this._yba?this._yba:null;};_go1.prototype._kt9=function(){_go1.superClass._kt9.call(this);var _7ma=this._63g();if(!_7ma){return;}var _rzd=_7ma.selectNodes('/SOAP-ENV:Envelope/SOAP-ENV:Body/*/bus:result/bus:details/*/bus:outputPages/item');if(_rzd&&_rzd.length>0){this._owb="<item>" + _rzd.item(0).text + "</item>";this._yba=_7ma.selectSingleNode('//bus:primaryRequest');}else{console.log('Failed to retrieve outputPages from _go1 result.');return;}};_go1.prototype._zp8=function(_4b9){var _gic="";if(_4b9){var nl=_4b9.selectNodes("./*");for(var i=0; i<nl.length; i++){_gic+= _7hn._3em(nl.item(i));}}return _gic;};_go1.prototype._zf6=function(_o49){var _gam="";for(var i=0; i<_o49.length; i++){_gam += '<item xsi:type="bus:parameterValue">' +'<bus:name xsi:type="xs:string">' + _cgm._e8j( _o49[i].name ) + '</bus:name>' +'<bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[]">' +(_o49[i].use?('<item xsi:type="bus:hierarchicalParmValueItem">' +'<bus:inclusive xsi:nil="true" xsi:type="xs:boolean"/>' +'<bus:value xsi:type="bus:simpleParmValueItem">' +'<bus:inclusive xsi:type="xs:boolean">true</bus:inclusive>' +'<bus:display xsi:type="xs:string">' + _cgm._e8j( _o49[i].display ) + '</bus:display>' +'<bus:use xsi:type="xs:string">' + _cgm._e8j( _o49[i].use ) + '</bus:use>' +'</bus:value>'+'<bus:subNodes SOAP-ENC:arrayType="bus:hierarchicalParmValueItem[]" xsi:type="SOAP-ENC:Array"/>' +'</item>'):'')+'</bus:value>'+'</item>';}return _gam;};
|