_o0g.js 11 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 _o0g=new _lcm("_o0g");_o0g._jgn=function(_8rm,_h8n){this._d0n._0jm=_8rm;this._d0n._82n=_h8n;var _jxm=_frh._c6j("IDS_DLG_GAUGE_AXES");if(this._d0n._82n){this._d0n._njg=_erh._e5j(_h8n, true);var _jxm=_frh._c6j("IDS_DLG_AXIS_ANGLE"); } this._4le(null, null, _jxm);};_o0g._fdm=function(){if(this._y2n){this._y2n._fdm();delete this._y2n;}};_o0g._5z2=function(){this._d0n._aye=this._d0n._0jm.selectSingleNode("v2_dialBorder");this._d0n._sqb=95;this._d0n._tqb=5;this._d0n._o1i=20;this._d0n._4dd=5;this._d0n._n1i=10;this._d0n._3dd=2;if(this._d0n._82n){this._2oh("divList").style.display = "none";this._2oh("divButtons").style.display = "none";this._2oh("trInnerRadius").style.display = "none";this._2oh("trOuterRadius").style.display = "none";}else{this._2oh("divList").style.display = "";this._2oh("divButtons").style.display = "";this._2oh("trInnerRadius").style.display = "";this._2oh("trOuterRadius").style.display = "";var _ozj=_frh._53g("EmptyList");var d=_ozj.ownerDocument;var _ini=_ozj.selectSingleNode("listItems");var _6tm=this._d0n._0jm.selectNodes("v2_gaugeAxes/v2_gaugeAxis");for(var i=0; i<_6tm.length; i++){var _mzj=_ini.appendChild(d.createElement("listItem"));var _lki=_6tm.item(i).cloneNode(true);_mzj.appendChild(_lki);if(!_lki.getAttribute("gaugeAxisDirection")){_lki.setAttribute("gaugeAxisDirection", "clockwise");}if(!_lki.getAttribute("gaugeAxisStartAngle")){_lki.setAttribute("gaugeAxisStartAngle", "10");}if(!_lki.getAttribute("gaugeAxisEndAngle")){_lki.setAttribute("gaugeAxisEndAngle", "360");}if(!_lki.getAttribute("gaugeAxisInnerRadius")){_lki.setAttribute("gaugeAxisInnerRadius", this._d0n._sqb-this._d0n._o1i);}if(!_lki.getAttribute("gaugeAxisOuterRadius")){_lki.setAttribute("gaugeAxisOuterRadius", this._d0n._sqb);}this._peg(_mzj);}this._y2n=new _pgk(this._2oh("divList"), _ozj, this); }this._d0n._oed=new _xbe(this._2oh("divAngleChooser"), this, 240, 360);this._d0n._v3i=new _jgk(this._2oh("tblDirection"), null, _frh._53g("axisDirection"), this);this._d0n._cmg=new _npc( this._2oh("tblStartAngle"), this._53g("StartAngle"), this, null);this._d0n._iij=new _npc( this._2oh("tblEndAngle"), this._53g("EndAngle"), this, null);this._d0n._50f=new _npc(this._2oh("tblOuterRadius"), this._53g("OuterRadius"), this, null);this._d0n._sze=new _npc(this._2oh("tblInnerRadius"), this._53g("InnerRadius"), this, null);if(this._y2n){this._y2n._gwc(0);}else{this._jse();}};_o0g._znl=function(){if(this._y2n){var _y1k=this._y2n._885();return _y1k.selectSingleNode("*");}return this._d0n._njg;};_o0g._o46=function(){this._fdm();};_o0g._bgn=function(){if(this._y2n){var _y1k=this._y2n._885();if(_y1k){var _h8n=_y1k.selectSingleNode("*");_h8n.setAttribute("gaugeAxisStartAngle", this._d0n._cmg._l3g());_h8n.setAttribute("gaugeAxisEndAngle", this._d0n._iij._l3g());_h8n.setAttribute("gaugeAxisOuterRadius", this._d0n._50f._l3g());_h8n.setAttribute("gaugeAxisInnerRadius", this._d0n._sze._l3g());}_erh._ybb();_8qn._cqh(this._d0n._0jm, "v2_gaugeAxes");var _m9h=this._y2n._tfe();for(var i=0; i<_m9h.length; i++){var _h8n=_m9h.item(i).selectSingleNode("*");var _g8n=_erh._h56(this._d0n._0jm, "v2_gaugeAxes");_h8n=_erh._woh(_h8n, true);_g8n.appendChild(_h8n);}_erh._iee();}else{_erh._ybb();_8qn._qie(this._d0n._82n, "gaugeAxisStartAngle", this._d0n._cmg._l3g());_8qn._qie(this._d0n._82n, "gaugeAxisEndAngle", this._d0n._iij._l3g());_8qn._qie(this._d0n._82n, "gaugeAxisDirection", this._d0n._v3i._qik()); _erh._iee(); }this._3le();};_o0g._pe4=function(_a6k,_mzj,_zdf){this._jse();};_o0g._g67=function(_35k,_mzj){this._znl().setAttribute("gaugeAxisDirection", _35k._qik());this._jse();};_o0g._y32=function(_ivi,_ptg,_uxm){if(_ptg){var _h8n=this._znl();var _1cf=Number(_h8n.getAttribute("gaugeAxisInnerRadius"));var _2cf=Number(_h8n.getAttribute("gaugeAxisOuterRadius"));if(_ivi==this._d0n._sze){return(_1cf<_2cf);}if(_ivi==this._d0n._50f){return(_2cf>_1cf);}if(!this._d0n._aye){return _ptg;}var _8pm=Number(_uxm);var _gyg=Number(_h8n.getAttribute("gaugeAxisStartAngle"));var _htj=Number(_h8n.getAttribute("gaugeAxisEndAngle"));var _0cf=Number(this._d0n._0jm.getAttribute("gaugeStartAngle"));var _xfi=Number(this._d0n._0jm.getAttribute("gaugeEndAngle"));if(_0cf==0&&_xfi==360){return _ptg;} var _hxi=_h8n.getAttribute("gaugeAxisDirection");_xfi=_xfi-_0cf;if(_xfi<0){_xfi+= 360;}_8pm=_8pm-_0cf;if(_8pm<0){_8pm+= 360;}_htj=_htj-_0cf;if(_htj<0){_htj+= 360;}_gyg=_gyg-_0cf;if(_gyg<0){_gyg+= 360;}_0cf=0;if(_hxi=="counterclockwise"){if(_8pm>_xfi){return false;}if(_ivi==this._d0n._cmg){if(_8pm<=_htj){return true;}return false; }else{if(_8pm>=_gyg){return true;}return false; } }else{if(_8pm>_xfi){return false;}if(_ivi==this._d0n._cmg){if(_8pm>=_htj){return true;}return false; }else{if(_8pm<=_gyg){return true;}return false; } } }return false;};_o0g._i7=function(_rgc){this._pj8("btnOK", false);};_o0g._9c=function(_rgc){this._pj8("btnOK", true); };_o0g._x51=function(_ivi){var _h8n=this._znl();switch(_ivi){case this._d0n._cmg:case this._d0n._iij:this._7dg(Math.round(this._d0n._cmg._l3g()), Math.round(this._d0n._iij._l3g()));break;case this._d0n._sze:_h8n.setAttribute("gaugeAxisInnerRadius", this._d0n._sze._l3g());this._d0n._sze._3kk(this._d0n._sze._l3g());break;case this._d0n._50f:_h8n.setAttribute("gaugeAxisOuterRadius", this._d0n._50f._l3g());this._d0n._50f._3kk(this._d0n._50f._l3g());break;}};_o0g._8g2=function(_d0e){this._7dg(Math.round(_d0e._8uc()), Math.round(_d0e._e2g()));};_o0g._7dg=function(_gyg,_htj){var _h8n=this._znl();_h8n.setAttribute("gaugeAxisStartAngle", _gyg);_h8n.setAttribute("gaugeAxisEndAngle", _htj);if(this._y2n){this._peg(this._y2n._885()); }this._jse();};_o0g._oy9=function(){if(!this._f5d()){this._m5a();}this._jse();};_o0g._m5a=function(){var _6tm=this._y2n._eq9().selectNodes("listItems/listItem/*");var _d0m=this._d0n._o1i+this._d0n._n1i;var _ruj=_d0m*_6tm.length;if(_ruj>(this._d0n._sqb-this._d0n._tqb)){_d0m=Math.round((this._d0n._sqb-this._d0n._tqb)/ _6tm.length);this._d0n._n1i=Math.round(_d0m / 4)>this._d0n._3dd?Math.round(_d0m / 4):this._d0n._3dd;this._d0n._o1i=_d0m-this._d0n._n1i;}var _bef=this._d0n._sqb;var _odf=this._d0n._sqb-this._d0n._o1i;for(var i=0; i<_6tm.length; i++){_6tm.item(i).setAttribute("gaugeAxisInnerRadius", _odf);_6tm.item(i).setAttribute("gaugeAxisOuterRadius", _bef);_bef-= _d0m;_odf-= _d0m;}};_o0g._f5d=function(){var _6tm=this._y2n._eq9().selectNodes("listItems/listItem/*");var _bef=this._d0n._sqb;var _odf=this._d0n._sqb-this._d0n._o1i;for(var i=0; i<_6tm.length; i++){var _sqd=_6tm.item(i).getAttribute("gaugeAxisOuterRadius");_sqd=_sqd||this._d0n._sqb;_odf=_6tm.item(i).getAttribute("gaugeAxisInnerRadius");_odf=_odf||(this._d0n._sqb-this._d0n._o1i);_odf=_bef-(_sqd-_odf);_6tm.item(i).setAttribute("gaugeAxisOuterRadius", _bef);_6tm.item(i).setAttribute("gaugeAxisInnerRadius", _odf);_bef=_odf-this._d0n._n1i;}return _odf>this._d0n._tqb;};_o0g._0qh=function(){var _umi=_erh._cnh("v2_gaugeAxis");var _6zj=this._y2n._eq9().selectSingleNode("listItems/listItem[last()]/*");var _u99=_6zj.getAttribute("gaugeAxisInnerRadius") != null?_6zj.getAttribute("gaugeAxisInnerRadius"):(this._d0n._sqb - this._d0n._o1i);var _mii=_u99-(this._d0n._o1i+this._d0n._n1i);_umi.setAttribute("gaugeAxisInnerRadius", _mii>this._d0n._tqb?_mii:this._d0n._tqb);_mii=_u99-this._d0n._n1i;_umi.setAttribute("gaugeAxisOuterRadius", _mii>this._d0n._tqb?_mii:this._d0n._tqb+this._d0n._n1i);_umi.setAttribute("gaugeAxisStartAngle", _6zj.getAttribute("gaugeAxisStartAngle"));_umi.setAttribute("gaugeAxisEndAngle", _6zj.getAttribute("gaugeAxisEndAngle"));_umi.setAttribute("gaugeAxisDirection", _6zj.getAttribute("gaugeAxisDirection"));var _boi=_erh._u0g(_umi, "v2_gaugeNeedle");var _mki=_erh._u0g(_umi, "v2_axisRange");_erh._u0g(_mki, "v2_automaticRange");var _ssm=_n0n._877(this._d0n._0jm);_umi.appendChild(_ssm);var _y1k=this._y2n._885();if(!_y1k){_y1k=this._y2n._m65(0);}if(_y1k){var _l6l=_y1k.selectSingleNode("*/v2_gaugeNeedle/v2_solidPalette");if(_l6l){_boi.appendChild(_erh._woh(_l6l, true));}var _444=["v2_axisColors", "v2_axisLabels", "v2_axisLine", "v2_gaugeAxisMajorGridlines", "v2_gaugeAxisMinorGridlines"];for(var i=0; i<_444.length; i++){var _kki=_y1k.selectSingleNode("*/"+_444[i]);if(_kki){_umi.appendChild(_erh._woh(_kki, true));}} }this._y2n._uab(this._5g7(_umi));this._jse();if(_umi.getAttribute("gaugeAxisInnerRadius")==this._d0n._tqb){_2dm._jgn(null, _frh._c6j("IDS_MSG_AXES_OVERLAP"), null, _2dm._zkk, _2dm._ffm,function(){ _o0g._oy9(); }, null, function(){ return; });}};_o0g._ovc=function(){var _y1k=this._y2n._885();if(_y1k){if(_y1k.nextSibling){_y1k.nextSibling.setAttribute("selected","true");}else if(_y1k.previousSibling){_y1k.previousSibling.setAttribute("selected","true");}_y1k.parentNode.removeChild(_y1k);this._jse();_2dm._jgn(null, _frh._c6j("IDS_MSG_AXES_ADJUST"), null, _2dm._zkk, _2dm._ffm,function(){ _o0g._f5d(); }, null, function(){ return; });}};_o0g._d7j=function(){this._y2n._486();this._jse();};_o0g._q4g=function(){this._y2n._se4();this._jse();};_o0g._jse=function(){if(this._y2n){this._y2n._wfn();var _y1k=this._y2n._885();var _9di=!!_y1k;var _8wk=this._y2n._tfe().length>1;this._pj8("btnDelete", _9di&&_8wk);this._pj8("btnUp", _9di&&_y1k.previousSibling);this._pj8("btnDown", _9di&&_y1k.nextSibling);}var _h8n=this._znl();if(_h8n){var _1kh=_h8n.getAttribute("gaugeAxisStartAngle");var _z9k=_h8n.getAttribute("gaugeAxisEndAngle");var _fvf=_h8n.getAttribute("gaugeAxisOuterRadius");var _1uf=_h8n.getAttribute("gaugeAxisInnerRadius");var _irf=this._d0n._0jm.getAttribute("gaugeStartAngle");var _7wi=this._d0n._0jm.getAttribute("gaugeEndAngle");var _hxi=_h8n.getAttribute("gaugeAxisDirection");this._d0n._cmg._3kk(_1kh); this._d0n._iij._3kk(_z9k);this._d0n._50f._3kk(_fvf);this._d0n._sze._3kk(_1uf);if(this._d0n._aye){this._d0n._cmg._mc7(_frh._c6j('IDS_INVALID_PROMPT_GAUGE_ANGLE', _irf, _7wi));this._d0n._iij._mc7(_frh._c6j('IDS_INVALID_PROMPT_GAUGE_ANGLE', _irf, _7wi));}else{this._d0n._cmg._mc7(_frh._c6j('IDS_INVALID_PROMPT_GAUGE_ANGLE_START'));this._d0n._iij._mc7(_frh._c6j('IDS_INVALID_PROMPT_GAUGE_ANGLE_END')); }this._d0n._sze._mc7(_frh._c6j('IDS_ERR_INVALID_GAUGEINNEROUTER'));this._d0n._50f._mc7(_frh._c6j('IDS_ERR_INVALID_GAUGEINNEROUTER'));this._d0n._v3i._3kk(_hxi, "IDS_PROPVAL_"+_hxi);this._d0n._oed._tje(_1kh, _z9k);} else{}};_o0g._5g7=function(_h8n){var _mzj=this._y2n._767();_mzj.appendChild(_h8n.cloneNode(true));this._peg(_mzj);return _mzj;};_o0g._peg=function(_mzj){var _h8n=_mzj.selectSingleNode("*");_mzj.setAttribute( "label", _frh._c6j( "IDS_GAUGE_AXIS_DESCRIPTION", _h8n.getAttribute( "gaugeAxisStartAngle" ), _h8n.getAttribute( "gaugeAxisEndAngle" ) ) );};