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.
- function C_PromptBaseControl(_cNG, _cTM, _cCB1, _cKS){this.F_ConstructBaseClass(_cTM, _cCB1);this._cNH1=[];this._cOG=_cNG;this._cSQ=this.F_IsUsedAsPrompt(this._cOG);this._cOG.setAttribute( "border", "0" );this._cOG.setAttribute( "cellPadding", "0" );this._cOG.setAttribute( "cellSpacing", "0" );this._cOG._cJN=this;this._cUQ=(typeof _cKS=="undefined")?null:_cKS;this._cT5=true;this._cKN=false;this._cQD=false;};C_PromptBaseControl.F_Extends(C_PromptControl);C_PromptBaseControl.prototype._cWO1=function(){while(this._cNH1.length>0){var _cJL1=this._cNH1.pop();_cJL1.remove();}this._cOG._cJN=null;this._cOG.removeChild(this._cOG.firstChild);};C_PromptBaseControl.prototype._cPG=function(_cOH1,_cOO1,_cW71){_cOH1.addEventListener(_cOO1, _cW71);this._cNH1.push({remove: function(){ _cOH1.removeEventListener("click", _cW71); }});};C_PromptBaseControl.prototype._c0D=function(){C_PromptBaseControl.superClass._c0D.call(this);if(this._cWM.getAttribute("renderAdornmentsCell")){this._cT5=( this._cWM.getAttribute( "renderAdornmentsCell" )=="false"?false:true );}if(this._cWM.getAttribute("restrictInput")){this._cKN=( this._cWM.getAttribute( "restrictInput" )=="true"?true:false );}if(this._cWM.getAttribute("useValueEncoding")){this._cQD=( this._cWM.getAttribute( "useValueEncoding" )=="none"?false:true );}};C_PromptBaseControl.prototype._cRD=function(_cKX){this._cLX=_cKX;if(this._cWC1&&!this._cUJ){_cKX.style.verticalAlign="top";this._cU5(_cKX);}else{_cKX.style.verticalAlign="middle";}if(this._cSQ){_cKX.setAttribute(C_PromptControl.M_sAttrRole, C_PromptControl.F_IsDirectionRtl(_cKX)?C_PromptControl.M_sAttrRoleAdornmentR:C_PromptControl.M_sAttrRoleAdornmentL);}else{_cKX.style.width="12px";_cKX.style.paddingRight="2px";}this._cE7(true);};C_PromptBaseControl.prototype._cE7=function(_cPH1){if(!this._cLX){return;}var _cLS=this._cLX.childNodes[(this._cWC1?1:0)];if(_cLS){this._cLX.removeChild(_cLS);}var _cLS=document.createElement("img");_cLS.style.border="0px";_cLS.style.width="10px";_cLS.style.height="10px";var _c1U1=(this._cSQ&&C_PromptControl.F_IsDirectionRtl(this._cOG));_cLS.src=G_HAL.F_GetImageURL( "cchl/images/error_timed_small" + ( _cPH1?"_off":(_c1U1?"_rtl":"") ) + ".gif" );this._cLX.appendChild(_cLS);};C_PromptBaseControl.prototype._cT3=function(_cKX){_cKX.style.verticalAlign="top";var _cQH1=document.createElement("input");_cQH1.setAttribute( "type", "checkbox" );_cKX.appendChild(_cQH1);_cQH1.checked=true;this._cF21=_cQH1;};C_PromptBaseControl.prototype._cG21=function(){if(this._cDB1&&this._cDB1.F_PromptControl_OnFocus){this._cDB1.F_PromptControl_OnFocus(this);}};C_PromptBaseControl.prototype._cMX=function(){if(this._cDB1&&this._cDB1.F_PromptControl_HasInput){this._cDB1.F_PromptControl_HasInput(this);}};C_PromptBaseControl.prototype._cLN=function(){if(this._cDB1&&this._cDB1.F_PromptControl_EmptyInput){this._cDB1.F_PromptControl_EmptyInput(this);}};C_PromptBaseControl.prototype.F_PromptControl_HasInput=function(){this._cMX();};C_PromptBaseControl.prototype.F_PromptControl_EmptyInput=function(){this._cLN();};C_PromptBaseControl.prototype._cF7=function(_cJV1,_cKL1){if(this._cOG.id){_cJV1.id=this._cOG.id+"__" + _cKL1;}else{G_Debug.F_Print("No container id for child: " + _cKL1);}};C_PromptBaseControl.F_GetControl=function(_cXO1){while(_cXO1&&!_cXO1._cJN){_cXO1=_cXO1.parentNode;}return _cXO1?_cXO1._cJN:null;};C_PromptBaseControl.prototype.F_GetPromptControl=function(){var _cKR1=this._cDB1;while(_cKR1){if(_cKR1 instanceof C_PromptPublicControl){return _cKR1;}else{_cKR1=_cKR1._cDB1;}}return null;};C_PromptBaseControl.prototype.F_ClearParameterValue=function(){G_Debug.F_Assert(false);};C_PromptBaseControl.prototype.F_SetParameterValue=function(_cYO1){G_Debug.F_Assert(false);};C_PromptBaseControl.prototype.F_ToUseValue=function(_cYO1){return(_cYO1?_cYO1["use"]:"");};
|