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 _r4b=new _lcm("_r4b");_r4b._jgn=function(_yrm){this._6jm=_yrm;this._4le();};_r4b._src=function(){this._wgd="black";this._chd='black';this._y7a=["#ba3a28", "#e0d92e", "#198545"];this._4l6=[0, 50, 100];};_r4b._5z2=function(){this._d0n._jw8=[];this._d0n._9ga=new _npc( this._2oh( 'tblTxtTranparency' ), this._53g( 'Transparency' ), this, null );this._d0n._jw8.push( {'control':this._d0n._9ga,'enabled':true, 'valid':true} );this._d0n._pe3=new _npc( this._2oh( 'tblTxtMissingTranparency' ), this._53g( 'Transparency' ), this, null );this._d0n._jw8.push( {'control':this._d0n._pe3,'enabled':true, 'valid':true} );this._d0n._e7i=new _npc( this._2oh( 'tblTxtNumeric' ), this._53g( 'Numeric' ), this, null );this._d0n._jw8.push( {'control':this._d0n._e7i,'enabled':true, 'valid':true} );this._prb=_frh._53g("NamedChartPalettes").selectSingleNode("*");this._y2n=new _pgk(this._2oh("divList"), _frh._53g("ChartPalette"), this);this._slj=this._2oh("trTop");this._f3f=this._2oh("trBottom");this._4id=this._2oh("trHighLow");this._3k7(this._6jm);this._y2n._wfn();this._y2n._gwc(0);this._jse();this._3bg();};_r4b._o46=function(){this._y2n._fdm();delete this._y2n;delete this._prb;if(this._ppb){this._ppb._fdm();delete this._ppb;}if(this._4r7){this._4r7._fdm();delete this._4r7;}};_r4b._bgn=function(){_erh._ybb();this._2o8(this._6jm);_erh._iee(true);this._3le();};_r4b._3wc=function(e){if(e.keyCode==_4qn._qrh){e.stopPropagation();}};_r4b._5ab=function(e){switch(e.keyCode){case _4qn._x8j:_4qn._w0g(e);this._2oh("btnOK").focus();break;default:_4qn._yo3(e, !this._2oh("chkPercent").checked, 'decimal');}};_r4b._pe4=function(_a6k,_mzj,_zdf){this._pq4();};_r4b._y0g=function(_pvm){var _jeh='';switch(_pvm){case 'missingColor':_jeh=this._chd;break;default:var _y1k=this._y2n._885();_jeh=_y1k.getAttribute(_pvm);}this._jv7=_pvm;_8fm._jgn("cchl/dialogs/_1zm", this._xp9(), false, _jeh, null, this, true, false);};_r4b._io9=function(_e5m){switch(_e5m._b2g()){case "_1zm":var _y1k=this._y2n._885();var _pvm=_e5m._6ik();if(_pvm==""){switch(this._jv7){case "color":_pvm=this._wgd;break;case "missingColor":_pvm=this._chd;break;}}if(this._jv7!='missingColor'){_y1k.setAttribute(this._jv7, _pvm);this._86a(_y1k);this._jse();this._y2n._wfn();this._3bg();}else{this._chd=_pvm;_u0n._2b5(this._2oh("btnMissingColor"), _pvm);}}};_r4b._0qh=function(){var _ini=this._y2n._5g8();var _a58=this._y2n._885();var _8pm=0;var _ptj=parseFloat(_a58.getAttribute('value'));if(_a58.nextSibling){var _77n=parseFloat(_a58.nextSibling.getAttribute('value'));_8pm=(_77n-_ptj)/2+_ptj;}else{_8pm=_ptj+1;}var _crm=_ini.ownerDocument.createElement("listItem");_crm.setAttribute("color", this._wgd);_crm.setAttribute("value", _8pm);_crm.setAttribute("label", this._wp8(_8pm));_crm.setAttribute("transparency",0);_ini.insertBefore(_crm, _a58.nextSibling);this._86a(_crm);this._jse();this._y2n._wfn();this._3bg();this._y2n._uab(_crm);};_r4b._ovc=function(){var _y1k=this._y2n._885();if(_y1k){_y1k.parentNode.removeChild(_y1k);this._y2n._wfn();this._y2n._gwc(0);this._jse();this._3bg();}};_r4b._a7j=function(e){if(e.ctrlKey){switch(e.keyCode){case "X".charCodeAt(0):this._mhe();break;case "C".charCodeAt(0):this._nvc();break;case "V".charCodeAt(0):this._z9b();break;}}else if(e.keyCode==_4qn._qrh){}this._1f7(e);};_r4b._mhe=function(){this._y2n._bzm();this._jse();this._y2n._wfn();this._3bg();this._nvc();};_r4b._nvc=function(){var _flf=this._6jm.ownerDocument.createElement("v2_pointColorByValue");this._2o8(_flf);_4aj._3bb([_flf]);};_r4b._z9b=function(){var _rlm=_4aj._z6b();if(_rlm&&_rlm[0]&&_rlm[0].nodeName=="v2_pointColorByValue"){this._ml5(_rlm[0]);}};_r4b._yem=function(_5qm){this._y2n._gwc(_5qm);};_r4b._0ab=function(){var _0f9=this._y2n._tfe();var _6pm=100 / Math.max(_0f9.length-1, 1);var _8pm;var _52l=0;for(var i=0; i<_0f9.length; i++){var _irm=_0f9.item(i);if(this._2oh("chkPercent").checked){_8pm=_6pm*_52l++;}else{_8pm=parseFloat(_irm.getAttribute("value"));}_irm.setAttribute("value", _8pm);_irm.setAttribute("label", this._wp8(_8pm));this._86a(_irm);}this._y2n._wfn();this._3bg();_4qn._1je( this._2oh("lblBoundary"), _frh._c6j( this._2oh("chkPercent").checked?"IDS_LBL_BOUNDARY_PERCENT":"IDS_LBL_BOUNDARY" ) );this._pq4();};_r4b._0a5=function(){var _9an=this._prb.selectNodes("namedChartPalette[numericChartPalette/continuousChartPalette]");if(!this._324){var _yua=this._prb.selectNodes("namedChartPalette[numericChartPalette/continuousChartPalette]");var _ozj=_frh._53g("EmptyList");var _ini=_ozj.selectSingleNode("listItems");_ozj.setAttribute("smallIconWidth", "48px");var d=_ozj.ownerDocument;for(var i=0; i<_yua.length; i++){var n=_yua.item(i);var _mzj=_ini.appendChild(d.createElement("listItem"));_mzj.setAttribute("value", n.getAttribute("id"));_8qn._9rc(_mzj, n, "idsLabel");_8qn._9rc(_mzj, n, "label");_8qn._9rc(_mzj, n, "idsTooltip");_8qn._9rc(_mzj, n, "tooltip");_8qn._9rc(_mzj, n, "smallIcon");}this._324=_ozj;}_u0n._2a6(this, this._2oh("btnPalette"), "numericChartPalette", null, this._324, NaN, this._2oh("divList").offsetWidth * 1.7);};_r4b._xm=function(_xgc,_5en,_uxm){var _uvd=this._prb.selectSingleNode("namedChartPalette[@id=" + _cgm._zxc( _uxm ) + "]/numericChartPalette");this._ml5(_uvd);};_r4b._86a=function(_mzj){_mzj.setAttribute("html", '<table role="presentation" cellpadding="0" cellspacing="2" class="clsDialogText" style="table-layout:fixed"><tr><td>' + _mzj.getAttribute('label') + '</td></tr><tr><td align="center" style="border:1px solid var(--text-03); width:156px; height:17px; background-color:' + _mzj.getAttribute("color") + '"> </td></tr></table>');if(_zpn._qsh["hal"]["enableAccessibility"]){_mzj.setAttribute( "sAriaLabel", _u0n._a22( _mzj.getAttribute("color"), _mzj.getAttribute('label') ) );}};_r4b._jse=function(){var _y1k=this._y2n._885();if(_y1k){_u0n._2b5(this._2oh("btnColor"), _y1k.getAttribute("color"));this._d0n._9ga._3kk(_8gm._fd7(_y1k.getAttribute("transparency"))||0);_vzm._ozm( 'update dialog - set transparency: ' + _y1k.getAttribute("transparency") );this._d0n._e7i._3kk(_8gm._fd7(_y1k.getAttribute("value")));_4qn._1je( this._2oh("lblBoundary"), _frh._c6j( this._2oh("chkPercent").checked?"IDS_LBL_BOUNDARY_PERCENT":"IDS_LBL_BOUNDARY" ) );}this._w5a();};_r4b._2o8=function(_l6l){if(_l6l){_l6l.setAttribute("boundaryValueType", this._2oh("chkPercent").checked?"percent":"absolute");_l6l.setAttribute("missingColor", this._chd);_l6l.setAttribute("missingColorTransparency", this._d0n._pe3._l3g());this._0a2(_l6l);var _0f9=this._y2n._tfe();var _esa=_l6l.selectSingleNode('v2_pointColorByValueEntries');if(_esa){var _hdc=_esa.selectNodes("v2_colorByValueEntry");for(var idx=0; idx<_hdc.length; idx++){_esa.removeChild(_hdc.item(idx));}}else{_esa=_erh._u0g(_l6l, "v2_pointColorByValueEntries");}for(var i=0; i<_0f9.length; i++){var _zwd=_0f9.item(i);var _f2h=_erh._u0g(_esa, "v2_colorByValueEntry");_f2h.setAttribute("boundaryValue", _zwd.getAttribute("value"));var _e7h=_erh._u0g(_f2h, "v2_solidColor");_e7h.setAttribute("transparency", _zwd.getAttribute("transparency"));_e7h.setAttribute("color", _zwd.getAttribute("color"));}}};_r4b._ml5=function(_l6l){if(_l6l.nodeName=="numericChartPalette"){this._scg(_l6l);this._jse();this._y2n._wfn();this._y2n._gwc(0);this._3bg();}else if(_l6l.nodeName=="v2_pointColorByValue"){ var _esa=_l6l.selectSingleNode('v2_pointColorByValueEntries');var _pnd=_l6l.getAttribute("boundaryValueType")=="percent";this._33a(_esa, _pnd);}};_r4b._scg=function(_l6l){var _pnd=_l6l.getAttribute("percentValues");this._2oh("chkPercent").checked=_pnd;this._y2n._bzm();var _o3k=_l6l.selectNodes("continuousChartPalette/continuousChartPaletteEntry");for(var i=0; i<_o3k.length; i++){var _uxm=_o3k.item(i).getAttribute("paletteEntryValue");var _fli=this._y2n._767();_fli.setAttribute("color", _o3k.item( i ).getAttribute("paletteEntryColor"));var _mae=_o3k.item(i).getAttribute("paletteEntryTransparency")||"0";_fli.setAttribute("transparency", _mae);_fli.setAttribute("value", _uxm);_fli.setAttribute("label", this._wp8(parseFloat(_uxm), _pnd));this._86a(_fli);}};_r4b._3k7=function(_l6l){if(_l6l){var _pnd=_l6l.getAttribute("boundaryValueType")=="percent";this._2oh("chkPercent").checked=_pnd;this._chd=_l6l.getAttribute( 'missingColor' )||'black';var _goc=_l6l.getAttribute( 'missingColorTransparency' )||'0';this._d0n._pe3._3kk(_8gm._fd7(_goc));this._uy3(_l6l);var _esa=_l6l.selectSingleNode('v2_pointColorByValueEntries');this._33a(_esa, _pnd);}else{this._y2n._bzm();this._iz();this._2oh("chkPercent").checked=true;}_u0n._2b5(this._2oh("btnMissingColor"), this._chd);};_r4b._33a=function(_esa,_pnd){this._y2n._bzm();var _o3k=_esa.selectNodes("v2_colorByValueEntry");if(_o3k.length>0){for(var i=0; i<_o3k.length; i++){var _uxm=_o3k.item(i).getAttribute("boundaryValue");var _fli=this._y2n._767();var _e7h=_o3k.item(i).selectSingleNode("v2_solidColor");_fli.setAttribute("color", _e7h.getAttribute("color")||this._wgd);_fli.setAttribute("transparency", _e7h.getAttribute("transparency")||'0');_fli.setAttribute("value", _uxm);_fli.setAttribute("label", this._wp8(parseFloat(_uxm), _pnd));this._86a(_fli);}this._y2n._wfn();this._y2n._gwc(0);this._3bg();}else{this._iz();}};_r4b._9k6=function(){ var _uxm=this._d0n._e7i._l3g();var _uyl=_cgm._6qh(_uxm);var _5ua=this._y2n._885();_5ua.setAttribute("label", this._wp8(_uyl));_5ua.setAttribute("value", _uyl.toString());this._86a(_5ua);this._y2n._wfn();this._3bg();this._w5a();};_r4b._fk6=function(){var _y1k=this._y2n._885();_y1k.setAttribute("transparency", this._d0n._9ga._l3g());this._3bg();};_r4b._3bg=function(){while(this._slj.cells.length>0){this._slj.deleteCell(0);}while(this._f3f.cells.length>0){this._f3f.deleteCell(0);}this._bu3();};_r4b._bu3=function(){var _1ul=[];var _4vl=[];var _fyk=this._2oh("chkPercent").checked;this._4y3(_4vl, _1ul);var _cyg=parseFloat(_4vl[0]);var _hyg=parseFloat(_4vl[_4vl.length-1]);for(var i=1; i<_1ul.length; i++){var _ibl=this._slj.insertCell(this._slj.cells.length);var _bah=this._f3f.insertCell(this._f3f.cells.length);var _eyg;var _90l=parseFloat(_4vl[i]);var _otj=i>0?parseFloat(_4vl[i-1]):_cyg;if(_fyk){_eyg=_90l-_otj;}else{_eyg=(_90l-_otj)/(_hyg-_cyg)*100;}_eyg=_eyg>5?_eyg:5;_bah.style.width=_eyg+"%";_ibl.style.width=_eyg+"%";_n0n._0k8(_ibl, _1ul[i-1].getAttribute("color"), _1ul[i].getAttribute("color"), "right");this._0eg(this._wp8(_4vl[i-1]), _bah);}if(_1ul.length>1){var _o3j=this._f3f.cells[this._f3f.cells.length-1];_4qn._1je(_o3j, "");this._e6a(_o3j, parseFloat(_4vl[_4vl.length-2]), parseFloat(_4vl[_4vl.length-1]));}};_r4b._wp8=function(_uyl,_fyk){var _c0l=Math.round(_uyl*100)/ 100;if(this._2oh("chkPercent").checked||_fyk){return _frh._c6j("IDS_HAL_CSS_LENGTH_UNIT_PERCENTAGE", _8gm._fd7(_c0l));}return _8gm._fd7(_c0l);};_r4b._iz=function(){for(var i=0; i<this._y7a.length; i++){var _uxm=this._4l6[i];var _fli=this._y2n._767();_fli.setAttribute("color", this._y7a[i]);_fli.setAttribute("transparency", '0');_fli.setAttribute("value", _uxm);_fli.setAttribute("label", this._wp8(parseFloat(_uxm), true));this._86a(_fli);}};_r4b._zdg=function(_39n,_pbm){switch(_39n.getAttribute("type")){case "color":_pbm.style.backgroundColor=_39n.getAttribute("color");break;}};_r4b._0eg=function(_men,_pbm){_4qn._1je(_pbm, _men);_pbm.style.padding="2px";_pbm.style.borderRight="solid black 1px";_pbm.style.textAlign="left";_pbm.className="clsDialogText";_pbm.style.whiteSpace="nowrap";_pbm.style.overflow="hidden";_pbm.title=_men;};_r4b._4y3=function(_4vl,_flm){var _o3k=this._y2n._tfe();for(var i=0; i<_o3k.length; i++){_4vl.push(_o3k.item(i).getAttribute("value"));_flm.push(_o3k.item(i));}};_r4b._e6a=function(_pbm,_9yg,_3cf){_pbm.className="clsDialogText clsNumPaletteCell";var _tsn=_pbm.ownerDocument.createElement("table");_tsn.style.width="100%";_tsn.setAttribute("cellSpacing", "0");_tsn.setAttribute("cellPadding", "0");_tsn.style.borderCollapse="collapse";_k0d._9q3(_tsn);_pbm.appendChild(_tsn);var _bfn=_tsn.ownerDocument.createElement("tbody");_tsn.appendChild(_bfn);var _cun=_bfn.ownerDocument.createElement("tr");_bfn.appendChild(_cun);var _ilh=_cun.ownerDocument.createElement("td");_cun.appendChild(_ilh);_ilh.className="clsNumPaletteCellLeft";_4qn._1je(_ilh, this._wp8(_9yg));_ilh.title=_4qn._ofe(_ilh);var _ryf=_cun.ownerDocument.createElement("td");_cun.appendChild(_ryf);_ryf.className="clsNumPaletteCellRight";_4qn._1je(_ryf, this._wp8(_3cf));_ryf.title=_4qn._ofe(_ryf);};_r4b._uy3=function(_q9n){switch(_q9n.nodeName){ case 'v2_pointColorByValue':this._ppb=new _jgk( this._2oh( 'cboMarkerShape' ), this._53g( "MarkerShapeCombo" ), _frh._53g( "v2_markerShape" ), this );this._ppb._hwc( _q9n.getAttribute( 'markerShape' )||'circle' );this._2oh( 'fldStyle' ).style.display = 'block';this._2oh( 'fldStyle' ).style.height = '151px';this._2oh( 'fldMissingValues' ).style.height = '151px';break;default:this._2oh( 'fldStyle' ).style.display = 'none';this._2oh( 'fldMissingValues' ).style.height = '151px';}};_r4b._0a2=function(_q9n){switch(_q9n.nodeName){ case 'v2_pointColorByValue':_q9n.setAttribute('markerShape', this._ppb._qik());break;}};_r4b._fz9=function(n,_nxm,_dxl,_1wi){var _uxm=this._2oh(_nxm).value;var _g9l=_cgm._6ie(_uxm);if((_uxm=="")||_g9l._izm()){n.removeAttribute(_1wi);}else{_8qn._qie(n, _1wi, _g9l._fkk()+_dxl._qik());}};_r4b._i7=function(_rgc){for(var i=0;i<this._d0n._jw8.length;i++){if(this._d0n._jw8[i].control==_rgc){this._d0n._jw8[i].valid=false;break;}}this._w5a();};_r4b._9c=function(_rgc){for(var i=0;i<this._d0n._jw8.length;i++){if(this._d0n._jw8[i].control==_rgc){this._d0n._jw8[i].valid=true;break;}}this._w5a();};_r4b._x51=function(_rgc){switch(_rgc){case this._d0n._9ga:this._fk6();break;case this._d0n._e7i:this._9k6();break;}};_r4b._w5a=function(){var _zwk=true;for(var i=0;i<this._d0n._jw8.length;i++){if(this._d0n._jw8[i].enabled&&!this._d0n._jw8[i].valid){_zwk=false;break;}}this._pj8("btnOK", _zwk);this._pj8("btnPalette", _zwk);this._pj8("btnCopy", _zwk);this._pj8("btnPaste", _zwk);var _pug=false;if(this._2oh("chkPercent").checked){var _y1k=null;if(this._y2n){_y1k=this._y2n._885();if(_y1k){_pug=_zwk&&(_y1k.nextSibling||(!_y1k.nextSibling&&_y1k.getAttribute('value')<99));}}}else{_pug=_zwk;}this._pj8("btnNew", _pug);var _s0c=_zwk&&(this._y2n&&this._y2n._tfe().length>2);this._pj8("btnDelete", _s0c);this._2oh("chkPercent").disabled=!_zwk;if(this._y2n){this._y2n._mqh(_zwk);var _y1k=this._y2n._885();if(!_y1k){this._pj8("btnDelete", false);}}};_r4b._pq4=function(){this._d0n._e7i._4je(null);this._d0n._e7i._3je(null);var _54l=this._y2n._885();var _90l=null;var _87n=0;var _77n=100;var _fyk=this._2oh("chkPercent").checked;if(_54l){_87n=null;_77n=null;_90l=parseFloat(_54l.getAttribute('value'));if(_54l.previousSibling){_87n=parseFloat(_54l.previousSibling.getAttribute('value'));}if(_54l.nextSibling){_77n=parseFloat(_54l.nextSibling.getAttribute('value'));}if(_87n!==null&&_77n!=null){this._d0n._e7i._fu9(false);this._d0n._e7i._eu9(false);this._d0n._e7i._mc7(_frh._c6j('IDS_INVALID_PROMPT_RANGE', _87n, _77n));}else if(!_87n&&_77n!==null){if(_fyk){_87n=0;this._d0n._e7i._mc7(_frh._c6j('IDS_INVALID_PROMPT_RANGE', 0, _77n));}else{_87n=null;this._d0n._e7i._mc7(_frh._c6j('IDS_INVALID_PROMPT_LT', _77n));}this._d0n._e7i._fu9(true);this._d0n._e7i._eu9(false);}else if(_87n!==null&&!_77n){if(_fyk){_77n=100;this._d0n._e7i._mc7(_frh._c6j('IDS_INVALID_PROMPT_RANGE', _87n, 100));}else{_77n=null;this._d0n._e7i._mc7(_frh._c6j('IDS_INVALID_PROMPT_GT', _87n));}this._d0n._e7i._fu9(false);this._d0n._e7i._eu9(true);}}this._jse();this._d0n._e7i._4je(_87n);this._d0n._e7i._3je(_77n);};
|