_r57.js 12 KB

123456
  1. // Licensed Materials - Property of IBM
  2. // IBM Cognos Products: rs
  3. // (C) Copyright IBM Corp. 2003, 2022.
  4. // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  5. var _r57=new _lcm("_r57");_r57._jgn=function(_q9n){this._g2n=_q9n;this._or2=true;this._4le(null, this);};_r57._n95=function(){this._6s4=true;switch(this._g2n.nodeName){case "textBox":case "selectDateTime":case "selectDate":case "selectTime":case "selectInterval":this._pu8(null, false);break;case "selectValue":if(!this._9pk){_zgk._jgn(this._xp9(),"",_frh._c6j("IDS_TITLE_ADD"),"",null,Function("_r57._gi4()"));}else{_8fm._jgn("_w4j", this._xp9(),_frh._c6j("IDS_LBL_RANGE_MIN"),_frh._c6j("IDS_LBL_RANGE_MAX"),_frh._c6j("IDS_TITLE_ADD"),"","",null,Function("_r57._gi4()"));}break;}};_r57._pu8=function(_o49,_gs6){if((_gs6===true)&&_o49&&(_o49[0]._l3g()===null)){_2dm._jgn(this._xp9(), _frh._c6j("IDS_ERR_PROMPT_INVALID_VALUE"), null, _2dm._zkk, _2dm._ffm,function(){ _r57._pu8(_o49, false); });return;}var _7tf=this._6s4?_frh._c6j("IDS_TITLE_ADD"):_frh._c6j("IDS_TITLE_EDIT");var _j6h=null;switch(this._g2n.nodeName){case "textBox":_j6h=this._53g("DS_TextPrompt");_j6h.setAttribute( "required", "true" );_j6h.setAttribute( "numbersOnly", ( this._g2n.getAttribute( "numbersOnly" )=="true" )?"true":"false" );_j6h.setAttribute( "range", this._9pk?"true":"false" );_j6h.setAttribute( "showThousandSeparator", ( this._g2n.getAttribute( "showThousandSeparator" )=="true" )?"true":"false" );_8fm._jgn("cchl/dialogs/_9qc", this._xp9(), _j6h, null, _7tf, _o49, this);break;case "selectDateTime":_j6h=this._53g("DS_DateTimePrompt");_j6h.setAttribute( "required", "true" );_j6h.setAttribute( "calendar", ( this._g2n.getAttribute( "calendar" )=="Imperial" )?"Imperial":"Gregorian" );_j6h.setAttribute( "showSeconds", ( this._g2n.getAttribute( "showSeconds" )=="true" )?"true":"false" );_j6h.setAttribute( "showMilliseconds", ( this._g2n.getAttribute( "showMilliseconds" )=="true" )?"true":"false" );_j6h.setAttribute( "range", this._9pk?"true":"false" );if(this._g2n.getAttribute("firstDate")){_j6h.setAttribute( "firstDate", this._g2n.getAttribute( "firstDate" ) );}if(this._g2n.getAttribute("lastDate")){_j6h.setAttribute( "lastDate", this._g2n.getAttribute( "lastDate" ) );}_8fm._jgn("cchl/dialogs/_m4b", this._xp9(), _j6h, null, _7tf, _o49, this);break;case "selectDate":_j6h=_frh._53g("DS_DatePrompt");_j6h.setAttribute( "required", "true" );_j6h.setAttribute( "calendar", ( this._g2n.getAttribute( "calendar" )=="Imperial" )?"Imperial":"Gregorian" );_j6h.setAttribute( "range", this._9pk?"true":"false" );if(this._g2n.getAttribute("firstDate")){_j6h.setAttribute( "firstDate", this._g2n.getAttribute( "firstDate" ) );}if(this._g2n.getAttribute("lastDate")){_j6h.setAttribute( "lastDate", this._g2n.getAttribute( "lastDate" ) );}_8fm._vqh( "cchl/dialogs/_m4b", "_dje", this._xp9(), _j6h, null, _7tf, _o49, this );break;case "selectTime":_j6h=this._53g("DS_TimePrompt");_j6h.setAttribute( "required", "true" );_j6h.setAttribute( "range", this._9pk?"true":"false" );_j6h.setAttribute( "showSeconds", ( this._g2n.getAttribute( "showSeconds" )=="true" )?"true":"false" );_j6h.setAttribute( "showMilliseconds", ( this._g2n.getAttribute( "showMilliseconds" )=="true" )?"true":"false" );_8fm._vqh( "cchl/dialogs/_m4b", "_lje", this._xp9(), _j6h, null, _7tf, _o49, this );break;case "selectInterval":_j6h=this._53g("DS_IntervalPrompt");_j6h.setAttribute( "required", "true" );_j6h.setAttribute( "range", this._9pk?"true":"false" );_j6h.setAttribute( "showSeconds", ( this._g2n.getAttribute( "showSeconds" )=="true" )?"true":"false" );_j6h.setAttribute( "showMilliseconds", ( this._g2n.getAttribute( "showMilliseconds" )=="true" )?"true":"false" );_8fm._jgn("cchl/dialogs/_n4b", this._xp9(), _j6h, null, _7tf, _o49, this);break;}};_r57._gi4=function(){if(!this._9pk){var _men=_zgk._fkl();if(_men){var _mzj=this._uij._767();_mzj.setAttribute("value", _men);_mzj.setAttribute( "specname", "defaultSimpleSelection" );this._mnk(_mzj);this._uij._wfn();}}else{var _non=_w4j._nik();var _mon=_w4j._oik();if((_non.length>0)||(_mon.length>0)){var _mzj=this._uij._767();_mzj.setAttribute("min", _non);_mzj.setAttribute("max", _mon);_mzj.setAttribute( "specname", "defaultRangeSelection" );this._mnk(_mzj);this._uij._wfn();}}this._zj6();};_r57._iy9=function(_5ek,_e5m){var _5xa=_e5m._d66()[0];if(!_5xa||(_5xa._l3g()===null)){return;}this._vda[++this._32n]=_5xa;var _mzj=this._uij._767();_mzj.setAttribute("specname", _5ek);_mzj.setAttribute("pvIndex", this._32n);this._gmb(_mzj, _5xa, !this._9pk);this._mnk(_mzj);this._uij._wfn();this._zj6();};_r57._pe4=function(_a6k,_mzj,_zdf){this._zj6();};_r57._oi2=function(_a6k,_mzj){if(!this._9q7){setTimeout('_r57._s4g()', 0);}};_r57._5z2=function(){this._9pk=( this._g2n.getAttribute( "range" )=="true" );this._vda={};this._9q7=(this._g2n.nodeName=="selectWithTree");this._yob=( this._g2n.getAttribute( "multiSelect" )=="true" );this._2oh( "btnEdit" ).style.display = this._9q7?"none":"";this._uij=new _pgk(this._2oh("divSelectionsList"), null, this);var nl=this._g2n.selectNodes( "(defaultSelections | defaultTreeSelections)/*" );var _tzl=nl.length;this._32n=0;for(;this._32n<_tzl;this._32n++){var _j38=nl.item(this._32n);var _mzj=this._uij._767();if (( _j38.nodeName=="defaultSimpleSelection" )||( _j38.nodeName=="defaultTreeSelection" )){var _1u6=true;var _uxm=_j38.text;_mzj.setAttribute("value", _uxm);_mzj.setAttribute( "range", "false" );}else{var _1u6=false;var _j9m=_j38.getAttribute("min");var _f9m=_j38.getAttribute("max");_mzj.setAttribute( "range", "true" );if(_j9m){_mzj.setAttribute("min", _j9m);}if(_f9m){_mzj.setAttribute("max", _f9m);}}_mzj.setAttribute("pvIndex", this._32n);_mzj.setAttribute("specname", _j38.nodeName);switch(this._g2n.nodeName){case "textBox":var _vgl=( this._g2n.getAttribute( "numbersOnly" )=="true" )?_00g._lnl:_00g._w0n;var _tu2=( this._g2n.getAttribute( "showThousandSeparator" )=="true" );var _5xa=new _00g(!_1u6, null, _vgl, _tu2);break;case "selectInterval":var _3af=( this._g2n.getAttribute( "showSeconds" )=="true" );var _608=( this._g2n.getAttribute( "showMilliseconds" )=="true" );var _5xa=new _ipc(!_1u6, null, _3af, _608);break;case "selectDate":var _2uj=( this._g2n.getAttribute( "calendar" )=="Imperial" )?_u3b._haj:_u3b._ith;var _5xa=new _b4j(!_1u6, null, _2uj);break;case "selectDateTime":var _3af=( this._g2n.getAttribute( "showSeconds" )=="true" );var _608=( this._g2n.getAttribute( "showMilliseconds" )=="true" );var _2uj=( this._g2n.getAttribute( "calendar" )=="Imperial" )?_u3b._haj:_u3b._ith;var _5xa=new _fpc(!_1u6, null, _2uj, _3af, _608);break;case "selectTime":var _3af=( this._g2n.getAttribute( "showSeconds" )=="true" );var _608=( this._g2n.getAttribute( "showMilliseconds" )=="true" );var _5xa=new _o4j(!_1u6, null, _3af, _608);break;}switch(this._g2n.nodeName){case "textBox":case "selectDate":case "selectDateTime":case "selectTime":case "selectInterval":if(_1u6){_5xa._p6g(_uxm);}else{_5xa._p6g(_j9m, _u3b._faj);_5xa._p6g(_f9m, _u3b._eaj);}this._vda[this._32n]=_5xa;this._gmb(_mzj, _5xa, _1u6);break;}this._mnk(_mzj);}this._uij._wfn();this._zj6();};_r57._gmb=function(_mzj,_5xa,_1u6){if(_1u6){var _ffk=_5xa._l3g();var _x5e=_5xa._yp9();if(_ffk){_mzj.setAttribute("value", _ffk);_mzj.setAttribute("valueLabel", _x5e||_ffk);}}else{var _puf=_5xa._l3g(_u3b._faj);var _huf=_5xa._l3g(_u3b._eaj);var _lj9=_5xa._yp9(_u3b._faj);var _gj9=_5xa._yp9(_u3b._eaj);if(_puf){_mzj.setAttribute("min", _puf);_mzj.setAttribute("minLabel", _lj9||_puf);}else{_mzj.removeAttribute("min");_mzj.removeAttribute("minLabel");}if(_huf){_mzj.setAttribute("max", _huf);_mzj.setAttribute("maxLabel", _gj9||_huf);}else{_mzj.removeAttribute("max");_mzj.removeAttribute("maxLabel");}}};_r57._o46=function(){if(this._uij){this._uij._fdm();delete this._uij;}this._g2n=null;if(this._hfd){this._hfd._fdm();delete this._hfd;}};_r57._io9=function(_e5m){switch(_e5m._b2g()){case "_m4b":case "_9qc":case "_n4b":if(this._6s4){this._iy9((!this._9pk?"defaultSimpleSelection":"defaultRangeSelection"), _e5m);}else{this._83d((!this._9pk?"defaultSimpleSelection":"defaultRangeSelection"), _e5m);}break;}};_r57._bgn=function(){_erh._ybb();var _gx6=_erh._h56(this._g2n, this._9q7?"defaultTreeSelections":"defaultSelections");_8qn._k5g(_gx6, "*");var nl=this._uij._tfe();var _tzl=nl.length;if(_tzl>0){for(var i=0;i<_tzl;i++){var _mzj=nl.item(i);if(this._9q7){_erh._u0g( _gx6, "defaultTreeSelection" ).text = _mzj.getAttribute( "value" );}else if(_mzj.getAttribute( "specname" )=="defaultSimpleSelection" ){_erh._u0g( _gx6, "defaultSimpleSelection" ).text = _mzj.getAttribute( "value" );}else{var n=_erh._u0g(_gx6, "defaultRangeSelection");var _j9m=_mzj.getAttribute("min");var _f9m=_mzj.getAttribute("max");if(_j9m){n.setAttribute("min", _j9m);}if(_f9m){n.setAttribute("max", _f9m);}}}}else{this._g2n.removeChild(_gx6);}_erh._iee();this._3le();};_r57._mnk=function(_mzj){var _dwm="";if(this._9q7){_dwm=_mzj.getAttribute("value");}else if(_mzj.getAttribute( "specname" )=="defaultSimpleSelection" ){_dwm=_mzj.getAttribute( "valueLabel" )||_mzj.getAttribute( "value" );}else{var _non=_mzj.getAttribute( "minLabel" )||_mzj.getAttribute( "min" );var _mon=_mzj.getAttribute( "maxLabel" )||_mzj.getAttribute( "max" );if(_non&&(_non.length>0)&&_mon&&(_mon.length>0)){if(_non==_mon){_dwm=_non;}else{_dwm=_frh._c6j("IDS_MSG_RANGE", _non, _mon);}}else if(_non&&(_non.length>0)){_dwm=_frh._c6j("IDS_MSG_RANGE_MIN", _non);}else if(_mon&&(_mon.length>0)){_dwm=_frh._c6j("IDS_MSG_RANGE_MAX", _mon);}}_mzj.setAttribute("label", _dwm);};_r57._kaj=function(){var _lon=_lm9._age();var _mzj=this._uij._767();_mzj.setAttribute("value", _lon);_mzj.setAttribute( "specname", "defaultTreeSelection" );this._mnk(_mzj);this._uij._wfn();this._zj6();};_r57._7z9=function(){};_r57._oph=function(){if(this._9q7){var _jxm=_frh._c6j("IDS_TITLE_CHOOSE_MODELITEM");var _g25={};_g25["member"]=true;_8fm._jgn( "_lm9", this._xp9(),function(){ _r57._kaj(); }, function(){ _r57._7z9(); }, _jxm, "", _g25 );}else{_r57._n95();}};_r57._s4g=function(){this._6s4=false;var _mzj=this._uij._885();switch(this._g2n.nodeName){case "textBox":case "selectDateTime":case "selectDate":case "selectTime":case "selectInterval":this._w1i=_mzj.getAttribute("pvIndex");var _5xa=this._vda[this._w1i];this._pu8([ _5xa ], true);break;case "selectValue":if(!this._9pk){_zgk._jgn(this._xp9(),"",_frh._c6j("IDS_TITLE_EDIT"),_mzj.getAttribute("value"),null,Function("_r57._pg5()"));}else{_8fm._jgn("_w4j", this._xp9(),_frh._c6j("IDS_LBL_RANGE_MIN"),_frh._c6j("IDS_LBL_RANGE_MAX"),_frh._c6j("IDS_TITLE_EDIT"),_mzj.getAttribute("min"),_mzj.getAttribute("max"),null,Function("_r57._te6()"));}break;}};_r57._83d=function(_5ek,_e5m){var _5xa=_e5m._d66()[0];if(!_5xa||(_5xa._l3g()===null)){this._xvc();return;}this._vda[ this._w1i ]=_5xa;var _mzj=this._uij._885();_mzj.setAttribute("specname", _5ek);this._gmb(_mzj, _5xa, !this._9pk);this._mnk(_mzj);this._uij._wfn();this._zj6();};_r57._pg5=function(){var _men=_zgk._fkl();if(_men){var _mzj=this._uij._885();_mzj.setAttribute("value", _men);_mzj.setAttribute( "specname", "defaultSimpleSelection" );this._mnk(_mzj);this._uij._wfn();this._zj6();}else{this._xvc();}};_r57._te6=function(){var _non=_w4j._nik();var _mon=_w4j._oik();if((_non.length>0)||(_mon.length>0)){var _mzj=this._uij._885();_mzj.setAttribute("min", _non);_mzj.setAttribute("max", _mon);_mzj.setAttribute( "specname", "defaultRangeSelection" );this._mnk(_mzj);this._uij._wfn();this._zj6();}else{this._xvc();}};_r57._acj=function(e){switch(e.keyCode){case _4qn._qrh:this._xvc();break;}this._1f7(e);};_r57._xvc=function(){var _mzj=this._uij._885();var nl=this._uij._tfe();for(var i=0;i<nl.length;i++){if((nl.item(i)==_mzj)&&(_mzj.getAttribute("pvIndex"))){var _5qm=_mzj.getAttribute("pvIndex");delete this._vda[_5qm];}}if(_mzj){if(_mzj.nextSibling){_mzj.nextSibling.setAttribute( "selected", "true" );}else if(_mzj.previousSibling){_mzj.previousSibling.setAttribute( "selected", "true" );}_mzj.parentNode.removeChild(_mzj);this._uij._wfn();}this._zj6();};_r57._d7j=function(){var _mzj=this._uij._885();if(_mzj&&_mzj.previousSibling){var _ini=_mzj.parentNode;var n=_mzj.previousSibling;_ini.insertBefore(_ini.removeChild(_mzj), n);this._uij._wfn();}this._zj6();};_r57._q4g=function(){var _mzj=this._uij._885();if(_mzj&&_mzj.nextSibling){var _ini=_mzj.parentNode;var n=_mzj.nextSibling.nextSibling;_ini.insertBefore(_ini.removeChild(_mzj), n);this._uij._wfn();}this._zj6();};_r57._zj6=function(){var _mzj=this._uij._885();this._pj8("btnUp",(_mzj!=null)&&_mzj.previousSibling);this._pj8("btnDown",(_mzj!=null)&&_mzj.nextSibling);this._pj8("btnAdd", this._yob||(!this._yob&&this._uij._tfe().length==0));this._pj8("btnEdit",(_mzj!=null));this._pj8("btnRemove",(_mzj!=null));};