U_Border.js 2.5 KB

123456
  1. // Licensed Materials - Property of IBM
  2. // IBM Cognos Products: cchl
  3. // (C) Copyright IBM Corp. 2003, 2016.
  4. // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  5. var U_Border={};U_Border.F_CanSeeDoubleBorder=function(_cPZ,_cQZ,_cRZ){if(_cQZ!="double"){return true;}var div=document.body.appendChild(document.createElement("div"));div.style.position="absolute";div.innerHTML="&nbsp;";div.style.borderTopWidth="";div.style.borderTopStyle="none";div.style.borderTopColor="";var _cT9=div.offsetHeight;div.style.borderTopStyle="";try{div.style.borderTopWidth=_cPZ;}catch(e){}try{div.style.borderTopStyle=_cQZ;}catch(e){}try{div.style.borderTopColor=_cRZ;}catch(e){}var _cKN1=(div.offsetHeight-_cT9);div.parentNode.removeChild(div);return(_cKN1>=3);};U_Border.F_InitBorderStyleListView=function(_cPA1){var nl=_cPA1.selectNodes("listItems/listItem");var _cFK1=nl.length;for(var i=0;i<_cFK1;i++){var _cOA1=nl.item(i);var _cWE1=_cOA1.getAttribute("idsLabel");if(!_cOA1.getAttribute("html")){_cOA1.setAttribute( "html", '<div style="padding:3px 5px 3px 5px; text-align:center"><div HAL_ids="' + _cWE1 + '"></div><div style="border-top:' + _cOA1.getAttribute( "borderValue" ) + '"> </div></div>' );}}return _cPA1;};U_Border.F_InitBorderWidthListView=function(_cPA1){var nl=_cPA1.selectNodes("listItems/listItem");var _cFK1=nl.length;for(var i=1;i<_cFK1;i++){var _cOA1=nl.item(i);var _cGN1=_cOA1.getAttribute("value");var _cL51=new C_CSSLength(_cGN1);var _cQN1=_cL51.F_GetDisplayString(true, true);_cOA1.setAttribute("label", _cQN1);_cOA1.setAttribute( "html", '<table role="presentation" cellpadding="0" cellspacing="2" class="clsDialogText" style="table-layout:fixed; width:100px"><tr style="vertical-align:middle; text-align:right"><td style="width:40%; font-family:Tahoma,Arial">' + _cQN1 + '</td><td style="padding-left:3px"><div style="border-top:' + _cGN1 + ' solid black; line-height:0px;">&nbsp;</div></td></tr></table>' );}return _cPA1;};U_Border.F_ShowColorButtonColorDialog=function(_cRJ1,_cXE1){var _c3I=new C_ColorButtonDialogListener(_cRJ1, _cXE1);G_HAL.F_VerifyDependencies("D_Color");D_Color.F_Show(document.getElementById(_cXE1), true, _cRJ1.F_GetButtonColor(_cXE1), null, _c3I, false, true);};function C_ColorButtonDialogListener(_cRJ1, _cXE1){this._cSJ1=_cRJ1;this._cYE1=_cXE1;};C_ColorButtonDialogListener.prototype.F_Dialog_OnCommit=function(_cCK1){var _cGN1=D_Color.F_GetColor();this._cSJ1.F_SetButtonColor(this._cYE1, _cGN1);};