123456 |
- // Licensed Materials - Property of IBM
- // IBM Cognos Products: cchl
- // (C) Copyright IBM Corp. 2003, 2016.
- // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- var D_DetailedMsgBox=new C_Dialog( "D_DetailedMsgBox" , "dlgDetailedMsgBox", "cchl/dialogs/" );function F_DetailedMsgBox(_cYS1, _cFN1, _c2G1, _cR51, _cKQ1, _cZS1, _c3G1){D_DetailedMsgBox.F_Show(null, _cYS1, _cFN1, _c2G1, _cR51, _cKQ1, null, _cZS1, _c3G1);};function F_DetailedMsgBoxRes(_cON1, _c4G1, _cS51, _cR51, _cKQ1, _cZS1, _c3G1){var _cFN1;if(_c4G1){_cFN1=G_ResManager.F_GetString(_c4G1);}D_DetailedMsgBox.F_Show(null, G_ResManager.F_GetString(_cON1), _cFN1, G_ResManager.F_GetString(_cS51), _cR51, _cKQ1, null, _cZS1, _c3G1);};function F_ShowError(_cPN1, _cT51){F_DetailedMsgBox(_cPN1.F_GetErrorSummary(), null, _cPN1.F_GetErrorDetails(), _cPN1.F_GetErrorCode(), D_MsgBox.K_iError, _cT51, _cT51);};D_DetailedMsgBox.F_Show=function(_cRL, _cYS1, _cFN1, _c2G1, _cR51, _cKQ1, _c5G1, _cZS1, _c3G1, _c0T1){this._c1T1=_cZS1?_cZS1:null;this._c6G1=_c3G1?_c3G1:null;this._c2T1=_c0T1?_c0T1:null;this._cLQ1=_cKQ1?_cKQ1:D_MsgBox.K_iWarning;this._c3T1=_cYS1;this._c7G1=_c2G1;this._cU51=_cR51;this._c8G1=_c5G1?_c5G1:D_MsgBox.K_iOKOnly;this.M_fnSuper_Show(_cRL, null, _cFN1);};D_DetailedMsgBox._c2A=350;D_DetailedMsgBox._cAC=540;D_DetailedMsgBox.F_Dialog_OnBeforeVisible=function(){var _cIK1=this.F_GetDlgItem("imgIcon");var _cQN1="";switch(this._cLQ1){case D_MsgBox.K_iInformation:_cIK1.style.display="";_cIK1.src=G_HAL.F_GetImageURL("hal/images/icon_information.gif");if(G_HAL.M_oLibraries["hal"]["enableAccessibility"]){_cQN1=G_ResManager.F_GetString('IDS_HAL_AC_INFO');}break;case D_MsgBox.K_iWarning:_cIK1.style.display="";_cIK1.src=G_HAL.F_GetImageURL("hal/images/icon_warning.gif");if(G_HAL.M_oLibraries["hal"]["enableAccessibility"]){_cQN1=G_ResManager.F_GetString('IDS_HAL_AC_WARNING');}break;case D_MsgBox.K_iError:_cIK1.style.display="";_cIK1.src=G_HAL.F_GetImageURL("hal/images/icon_error.gif");if(G_HAL.M_oLibraries["hal"]["enableAccessibility"]){_cQN1=G_ResManager.F_GetString('IDS_HAL_AC_ERROR');}break;default:_cIK1.style.display="none";}if(G_HAL.M_oLibraries["hal"]["enableAccessibility"]){_cIK1.setAttribute("aria-label", _cQN1);_cIK1.alt=_cQN1;}switch(this._c8G1){case D_MsgBox.K_iOKCancel:this._cZL="btnOK";this.F_GetDlgItem( "btnOK" ).style.display = "";this.F_GetDlgItem( "btnYes" ).style.display = "none";this.F_GetDlgItem( "btnNo" ).style.display = "none";this.F_GetDlgItem( "btnCancel" ).style.display = "";break;case D_MsgBox.K_iYesNoCancel:this._cZL="btnYes";this.F_GetDlgItem( "btnOK" ).style.display = "none";this.F_GetDlgItem( "btnYes" ).style.display = "";this.F_GetDlgItem( "btnNo" ).style.display = "";this.F_GetDlgItem( "btnCancel" ).style.display = "";break;case D_MsgBox.K_iYesNo:this._cZL="btnYes";this.F_GetDlgItem( "btnOK" ).style.display = "none";this.F_GetDlgItem( "btnYes" ).style.display = "";this.F_GetDlgItem( "btnNo" ).style.display = "";this.F_GetDlgItem( "btnCancel" ).style.display = "none";break;default:this._cZL="btnOK";this.F_GetDlgItem( "btnOK" ).style.display = "";this.F_GetDlgItem( "btnYes" ).style.display = "none";this.F_GetDlgItem( "btnNo" ).style.display = "none";this.F_GetDlgItem( "btnCancel" ).style.display = "none";}this.F_GetDlgItem("spanMsg").innerText=this._c3T1;this.F_GetDlgItem("divDetails").value=this._c7G1;this.F_GetDlgItem("divErrorCode").innerText=this._cU51;if(G_HAL.M_oLibraries["hal"]["enableAccessibility"]){var _cN01;switch(this._cLQ1){case D_MsgBox.K_iInformation:_cN01=G_ResManager.F_GetString("IDS_HAL_AC_INFO");break;case D_MsgBox.K_iWarning:_cN01=G_ResManager.F_GetString("IDS_HAL_AC_WARNING");break;case D_MsgBox.K_iError:_cN01=G_ResManager.F_GetString("IDS_HAL_AC_ERROR");break;}U_Accessibility.F_AddAriaHiddenSpan( this.F_GetDlgItem("spanMsg"), "aria-labelledby", _cN01 );}var _cV51=this.F_GetDlgItem("rootPane");var _cVA1=G_ResManager.F_GetResource("DetailedMsgBoxDlgPane");var _cW51=_cVA1.selectSingleNode("rowPane[@id='DetailedMsgBoxErrorCode']");_cW51.setAttribute("display", this._cU51?"true":"false" );var _c0M=_cVA1.selectSingleNode(".//rowPane[@id='DetailedMsgBoxDetailsHeader']");_c0M.setAttribute("display", this._c7G1?"true":"false" );var _c9G1=_cVA1.selectSingleNode(".//rowPane[@id='DetailedMsgBoxDetails']");_c9G1.setAttribute("display", this._c7G1?"true":"false" );var _cO01=Boolean(this._c7G1);var _cX51="autoFromContents";var _cWA1="100px";if(!_cO01){var _cAG1=this._cEQ();_cX51=String(Math.max(_cAG1.height, 32))+"px";_cWA1=String(Math.max(_cAG1.width, 60))+"px";}var _cG4=_cVA1.selectSingleNode(".//rowPane[@id='DetailedMsgBoxMessage']");_cG4.setAttribute("minHeight", _cX51);_cG4.setAttribute("defaultHeight", _cX51);var _cO2=_cVA1.selectSingleNode(".//columnPane[@id='DetailedMsgBoxMsgColumn']");_cO2.setAttribute("minWidth", _cWA1);_cO2.setAttribute("defaultWidth", _cWA1);var _cP01=true;this._cCV=new C_PaneManager(_cV51, _cVA1, null, null, null, _cP01);this._cRN1();if(!_cO01){var _cQ01=true;this._cRN1(_cQ01);this.F_ResizeTo(this.F_GetMinimumDialogBodyWidth(), this.F_GetMinimumDialogBodyHeight());}};D_DetailedMsgBox.F_Dialog_OnAfterVisible=function(){this.F_GetDlgItem(this._cZL).focus();};D_DetailedMsgBox._cEQ=function(){var _cDV=document.body.appendChild(document.createElement("DIV"));_cDV.style.position="absolute";_cDV.style.width="100%";_cDV.style.height="100%";_cDV.style.left="0px";_cDV.style.top= "0px";_cDV.className="clsLabel clsDialogText";_cDV.style.fontWeight="bold";_cDV.style.visibility="hidden";var _cJK1=_cDV.appendChild(document.createElement("SPAN"));_cJK1.innerText=this._c3T1;if((_cJK1.offsetWidth+100)>document.body.clientWidth){_cJK1.style.width=String(document.body.clientWidth-100)+"px";}if((_cJK1.offsetHeight+100)>document.body.clientHeight){_cJK1.style.height=String(document.body.clientHeight-100)+"px";}var _cY51=new C_Dimension(_cJK1.offsetHeight, _cJK1.offsetWidth);document.body.removeChild(_cDV);return _cY51;};D_DetailedMsgBox.F_Dialog_OnResize=function(_cDK1,_cKN1,_cP2){this._cRN1();};D_DetailedMsgBox._cRN1=function(_cAI){if(_cAI){this._cCV.F_SetNewPaneSize("DetailedMsgBoxDlgPane", this.F_GetMinimumDialogBodyWidth(), this.F_GetMinimumDialogBodyHeight());}else{this._cCV.F_SetNewPaneSize("DetailedMsgBoxDlgPane", this.F_GetDialogBodyWidth(), this.F_GetDialogBodyHeight());}};D_DetailedMsgBox.F_GetMinimumDialogBodyHeight=function(){return this._cCV.F_GetMinimumHeight();};D_DetailedMsgBox.F_GetMinimumDialogBodyWidth=function(){return this._cCV.F_GetMinimumWidth();};D_DetailedMsgBox.F_Dialog_OnAfterHide=function(){this.F_Detach();if(!Boolean(this._c7G1)){this.F_SetDimensions(D_DetailedMsgBox._cAC, D_DetailedMsgBox._c2A);}else{var _cZU1=this.F_GetDialogClientArea();this._c2A=_cZU1.getAttribute("HAL_startupHeight");this._cAC=_cZU1.getAttribute("HAL_startupWidth");}};D_DetailedMsgBox.F_Detach=function(){delete this._c1T1;delete this._c6G1;delete this._c2T1;if(this._cCV){this._cCV.F_Detach();delete this._cCV;}};D_DetailedMsgBox.F_OnKeyPress=function(e){if(e.keyCode==U_DOM.K_iKeyEnter){if(e.target.nodeName!="BUTTON"){this._cFQ(D_MsgBox.K_iOK);return;}}this.M_fnSuper_OnKeyPress(e);};D_DetailedMsgBox.F_OnCancel=function(){this._cFQ(D_MsgBox.K_iCancel);};D_DetailedMsgBox._cFQ=function(_cKK1){switch(_cKK1){case D_MsgBox.K_iOK:case D_MsgBox.K_iYes:if(this._c1T1){setTimeout(this._c1T1, 0);}break;case D_MsgBox.K_iCancel:if(this._c6G1){setTimeout(this._c6G1, 0);}break;case D_MsgBox.K_iNo:if(this._c2T1){setTimeout(this._c2T1, 0);}break;}this.F_Hide();};
|