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 _vcm=new _lcm( "_vcm", "dlgBorder", "cchl/dialogs/" );_vcm._jgn=function(_u4c,_4ch,_jxm,_6wa,_hvg){this._0mg=_9gm._vfn(_4ch);this._wgg=_hvg!=false;this._4le(_u4c, _6wa, _jxm);};_vcm._4r4=["border-top-width","border-top-style","border-top-color","border-right-width","border-right-style","border-right-color","border-bottom-width","border-bottom-style","border-bottom-color","border-left-width","border-left-style","border-left-color" ];_vcm._ttc=function(){return this._0mg;};_vcm._kd4=function(){return this._9t7?_9gm._vfn(this._9t7):null;};_vcm._g43=function(_ini,_uxm,_4ki,_sqj){var _mzj=_ini.appendChild(_ini.ownerDocument.createElement("listItem"));_mzj.setAttribute("value", _uxm);_mzj.setAttribute( "html", '<table role="presentation" cellpadding="0" cellspacing="1" style="table-layout:fixed"><tr style="vertical-align:middle"><td style="border:1px solid var(--text-03); width:18px; height:16px; background-color:' + _uxm + '"> </td><td style="padding-left:4px" HAL_ids="' + _4ki + '"></td></tr></table>' );if(_sqj){_mzj.setAttribute( "selected", "true" );}};_vcm._4t1=function(_lni){var d=_lni.ownerDocument;var _ozj=_lni.appendChild(d.createElement("listView"));_ozj.setAttribute( "allowCtrlDeselect", "false" );_ozj.setAttribute( "hotTracking", "false" );_ozj.setAttribute( "classPrefix", "clsListItem_outline" );var _ini=_ozj.appendChild(d.createElement("listItems"));var _mzj=_ini.appendChild(d.createElement("listItem"));_mzj.setAttribute( "value", "" );_mzj.setAttribute( "html", '<div class="clsCCHLDefaultListItem" HAL_ids="IDS_CCHL_PROPVAL_DEFAULT"></div>' );this._g43( _ini, "black", "IDS_HAL_COLOR_BLACK", true );this._g43( _ini, "silver", "IDS_HAL_COLOR_SILVER" );this._g43( _ini, "gray", "IDS_HAL_COLOR_GRAY" );this._g43( _ini, "white", "IDS_HAL_COLOR_WHITE" );this._g43( _ini, "maroon", "IDS_HAL_COLOR_MAROON" );this._g43( _ini, "red", "IDS_HAL_COLOR_RED" );this._g43( _ini, "purple", "IDS_HAL_COLOR_PURPLE" );this._g43( _ini, "fuchsia", "IDS_HAL_COLOR_FUCHSIA" );this._g43( _ini, "green", "IDS_HAL_COLOR_GREEN" );this._g43( _ini, "lime", "IDS_HAL_COLOR_LIME" );this._g43( _ini, "olive", "IDS_HAL_COLOR_OLIVE" );this._g43( _ini, "yellow", "IDS_HAL_COLOR_YELLOW" );this._g43( _ini, "navy", "IDS_HAL_COLOR_NAVY" );this._g43( _ini, "blue", "IDS_HAL_COLOR_BLUE" );this._g43( _ini, "teal", "IDS_HAL_COLOR_TEAL" );this._g43( _ini, "aqua", "IDS_HAL_COLOR_AQUA" );_mzj=_ini.appendChild(d.createElement("listItem"));_mzj.setAttribute( "name", "CustomColor" );this._vn7(_mzj);return _ozj;};_vcm._vn7=function(_mzj){if(this._n1f){var _pvm=_frh._997("IDS_HAL_COLOR_"+this._n1f.toUpperCase());_mzj.setAttribute( "tooltip", _frh._c6j( "IDS_CCHL_COLOR_CUSTOM" ) + ( _pvm?" - " + _pvm:" - " + this._n1f ) );}else{_mzj.setAttribute( "tooltip", _frh._c6j( "IDS_CCHL_COLOR_CUSTOM" ) );}_mzj.setAttribute("value", this._n1f);var _bdn ='<table role="presentation" cellpadding="0" cellspacing="1" style="table-layout:fixed;width:100%">' +'<tr style="vertical-align:middle">' +'<td style="border:1px solid var(--text-03); width:18px; height:16px' + ( this._n1f?( "; background-color:" + this._n1f ):"" ) + '"> </td>' +'<td style="padding-left:3px" HAL_ids="IDS_CCHL_COLOR_CUSTOM"></td>' +'<td style="width:22px">' +'<button class="clsDotDotDotPropertyButton" style="width:22px; vertical-align:middle" hideFocus="true" HAL_idsAriaLabel="IDS_CCHL_AC_COLOR_CUSTOM_DOTDOTDOT" onclick="_vcm._f67()">' +'<svg class="clsDotDotDotButtonSvg"><use xlink:href="#def_hal_property_dotdotdot"></use></svg>' +'</button>'+'</td>'+'</tr>'+'</table>';_mzj.setAttribute("html", _bdn);};_vcm._1k7=function(){var _msi=new _84j(this._9t7["border-width"]);var txt=this._2oh("txtWidth");txt.value=_msi._197();txt.onkeypress=_4qn._tx;txt.onchange=function(e){ _4qn._m95(e); _vcm._27(); };this._wve._hwc(_msi._jkl()||"pt");};_vcm._27=function(){if(this._2oh("txtWidth").value.length>0){var _uxm=_cgm._6ie(this._2oh("txtWidth").value)._fkk();this._9t7["border-width"] = _uxm?( _uxm + this._wve._qik() ):"";}else{this._0mg["border-width"] = "";}this._1k7();};_vcm._src=function(){this._iy8=this._2oh("divBorderPreview");if(_o7g._csh){this._iy8.parentNode.style.textAlign="-moz-center";}else if(_o7g._d9j){this._iy8.parentNode.style.textAlign="-webkit-center";}this._ewe=_8qn._w5b();var _lni=this._ewe.appendChild(this._ewe.createElement("ListViews"));this._zsb=new _pgk(this._2oh("divBorderColor"), this._4t1(_lni), this);var _ozj=_3gm._4i2(_frh._53g('CCHL_border-style'));_ozj.selectSingleNode( "listItems/listItem[@value='solid']" ).setAttribute( "selected", "true" );this._wub=new _pgk(this._2oh("divBorderStyle"), _ozj, this);var _ozj=_3gm._5i2(this._53g('CCHL_border-width'));_ozj.selectSingleNode( "listItems/listItem[@value='1pt']" ).setAttribute( "selected", "true" );this._7vb=new _pgk(this._2oh("divBorderWidth"), _ozj, this);this._9t7={};this._9t7["border-style"] = this._wub._885().getAttribute( "value" );this._9t7["border-width"] = this._7vb._885().getAttribute( "value" );this._9t7["border-color"] = this._zsb._885().getAttribute( "value" );this._wve=new _jgk(this._2oh("cboWidthUnit"), null, _frh._53g('CCHL_CSSLengthUnits'), this);this._wve._hwc("pt");this._1k7();this._n1f="";};_vcm._fdm=function(){if(this._zsb){this._zsb._fdm();delete this._zsb;}if(this._wub){this._wub._fdm();delete this._wub;}if(this._7vb){this._7vb._fdm();delete this._7vb;}if(this._wve){this._wve._fdm();delete this._wve;}};_vcm._bgn=function(){if(!this._wgg){this._cq2();}this._3le();};_vcm._5z2=function(){this._2oh( "divBottom" ).style.display = this._wgg?"":"none";_4gm._vjk( this._2oh( "btnOK" ), _frh._c6j( this._wgg?"IDS_HAL_BTN_OK":"IDS_HAL_BTN_CLOSE" ) );this._2oh( "btnApply" ).style.display = this._wgg?"":"none";this._2oh( "btnCancel" ).style.display = this._wgg?"":"none";this._7yc();if(this._o14){this._2oh("divBorderColor").scrollTop=this._o14;}if(this._p14){this._2oh("divBorderStyle").scrollTop=this._p14;}if(this._q14){this._2oh("divBorderWidth").scrollTop=this._q14;}};_vcm._b65=function(){this._o14=this._2oh("divBorderColor").scrollTop;this._p14=this._2oh("divBorderStyle").scrollTop;this._q14=this._2oh("divBorderWidth").scrollTop;};_vcm._o46=function(){delete this._0mg;};_vcm._6q2=function(_aoc,_eyf){try{this._iy8.style[_aoc]=this._0mg[_eyf];}catch(e){this._iy8.style[_aoc]="";}};_vcm._fw1=function(_aoc){var _eyf=_aoc.toLowerCase();if(this._0mg["border-" + _eyf + "-style"]=="none" ){this._iy8.style["border" + _aoc + "Width"] = "1px";this._iy8.style["border" + _aoc + "Color"] = _9l8._9h8( "--G2" );this._iy8.style["border" + _aoc + "Style"] = "dotted";}else{this._6q2( "border" + _aoc + "Width", "border-" + _eyf + "-width" );this._6q2( "border" + _aoc + "Color", "border-" + _eyf + "-color" );this._6q2( "border" + _aoc + "Style", "border-" + _eyf + "-style" );}};_vcm._7yc=function(){if(!this._wgg){return;}this._fw1("Top");this._fw1("Bottom");this._fw1("Left");this._fw1("Right");var _9hl="";var a=this._4r4;for(var i=0;i<a.length;i++){if((i % 3)==0){if(i>0){_9hl+= "\r\n";}var _yxm=this._0mg[a[i]];var _w5m=new _84j(_yxm);var _79m=(_w5m._jkl()?(_w5m._197()+_w5m._fge()):"");var _dxm=this._0mg[a[i+1]];_dxm=_dxm?_frh._997( "IDS_CCHL_BORDERSTYLE_" + _dxm.toUpperCase() ):"";var _pvm=this._0mg[a[i+2]];var _uxm=_pvm?_frh._997( "IDS_HAL_COLOR_" + _pvm.toUpperCase() ):"";_pvm=_uxm||_pvm;if(_yxm||_dxm||_pvm){_9hl +=(_79m||"?" ) + " " + ( _dxm||"?" ) + " " + ( _pvm||"?" );}else{_9hl+= "?";}}}this._iy8.title=_9hl;};_vcm._f67=function(){_8fm._jgn( "cchl/dialogs/_1zm", this._xp9(), false, this._n1f, _frh._c6j( "IDS_CCHL_TITLE_COLOR_CUST_BORDER" ), this, false, true );};_vcm._io9=function(_e5m){switch(_e5m._b2g()){case "_1zm":this._n1f=_e5m._6ik();this._9t7["border-color"]=this._n1f;this._vn7(this._2oh("divBorderColor")._a6k._885());this._2oh("divBorderColor")._a6k._wfn();this._7yc();}};_vcm._g67=function(_35k){this._27();};_vcm._pe4=function(_a6k,_mzj,_zdf){switch(_a6k._ezm()){case "_vcm_divBorderStyle":if(_mzj.getAttribute( "value" )=="none" ){this._9t7["border-width"] = "";this._1k7();var _a6k=this._2oh("divBorderWidth")._a6k;_a6k._uab(_pgk._m65(_a6k._eq9(), 0));var _a6k=this._2oh("divBorderColor")._a6k;_a6k._uab(_pgk._m65(_a6k._eq9(), 0));}this._pv4="-style";this._9t7["border-style"] = _mzj.getAttribute( "value" );break;case "_vcm_divBorderWidth":this._pv4="-width";this._9t7["border-width"] = _mzj.getAttribute( "value" );this._1k7();break;case "_vcm_divBorderColor":this._pv4="-color";this._9t7["border-color"] = _mzj.getAttribute( "value" );break;}setTimeout("_vcm._7yc()", 0);};_vcm._oi2=function(_a6k,_mzj){switch(_a6k._ezm()){case "_vcm_divBorderColor":if(_mzj.getAttribute( "name" )&&( _mzj.getAttribute( "name" )=="CustomColor" ) ){setTimeout("_vcm._f67()", 0);}break;}};_vcm._y4g=function(e,el){var _jbl=_4qn._m97(this._iy8, document.body);var _kkn=_jbl.top;var _v7n=_jbl.left;var _xqm=this._iy8.offsetWidth;var _mzl=this._iy8.offsetHeight;var _5zl=_kkn+_mzl;var _fqm=_v7n+_xqm;var _thi=10;if(_6hn._b5g(e.y, e.x, _kkn-(_thi / 2), _v7n, _xqm, _thi)){this._k5d(e, "border-top");}else if(_6hn._b5g(e.y, e.x, _5zl-(_thi / 2), _v7n, _xqm, _thi)){this._k5d(e, "border-bottom");}else if(_6hn._b5g(e.y, e.x, _kkn, _v7n-(_thi / 2), _thi, _mzl)){this._k5d(e, "border-left");}else if(_6hn._b5g(e.y, e.x, _kkn, _fqm-(_thi / 2), _thi, _mzl)){this._k5d(e, "border-right");}setTimeout("_vcm._7yc()", 0);};_vcm._cq2=function(){if(!_3gm._646( this._9t7["border-width"], this._9t7["border-style"], this._9t7["border-color"] ) ){_m9b("IDS_MSG_DOUBLE_BORDERS");}};_vcm._k5d=function(e,_eyf,_t79){if(!_t79){this._cq2();}if(!_eyf){for(var s in this._0mg){this._0mg[s]="";}}else if(e.ctrlKey){var _a6k=this._2oh("divBorderColor")._a6k;var _uxm=this._0mg[_eyf+"-color"];var _mzj=_pgk._lee(_a6k._eq9(), "value", _uxm);if(_uxm&&!_mzj){var _mzj=_pgk._lee( _a6k._eq9(), "name", "CustomColor" );this._n1f=_uxm;this._vn7(_mzj);_a6k._wfn();_a6k._uab(_mzj);}else if(_mzj){_a6k._uab(_mzj);}var _a6k=this._2oh("divBorderStyle")._a6k;var _uxm=this._0mg[_eyf+"-style"];var _mzj=_pgk._lee(_a6k._eq9(), "value", _uxm);if(_mzj){_a6k._uab(_mzj);}var _a6k=this._2oh("divBorderWidth")._a6k;var _uxm=this._0mg[_eyf+"-width"];var _msi=new _84j(_uxm);var txt=this._2oh("txtWidth");txt.value=_msi._197();this._wve._hwc(_msi._jkl()||"pt");var _mzj=_pgk._lee(_a6k._eq9(), "value", _uxm);if(_mzj){_a6k._uab(_mzj);}}else if(e.shiftKey&&this._pv4){this._0mg[_eyf+this._pv4]=this._9t7["border" + this._pv4];}else{this._0mg[_eyf+"-style"] = this._9t7["border-style"];this._0mg[_eyf+"-width"] = this._9t7["border-width"];this._0mg[_eyf+"-color"] = this._9t7["border-color"];}setTimeout("_vcm._7yc()", 0);};_vcm._a7j=function(e){if(e.ctrlKey){switch(e.keyCode){case "C".charCodeAt(0):case "X".charCodeAt(0):var o=new _bpc("");o._6xc(this._ttc());_4aj._qll(o.toString());break;case "V".charCodeAt(0):var s=_4aj._fkl();if(s&&s.match(/^border/)){var o=new _bpc(s);var a=this._4r4;for(var i=0;i<a.length;i++){var _uxm=o._13g(a[i]);this._0mg[a[i]]=_uxm||"";}this._7yc();}break;}}this._1f7(e);};
|