C_Cabinet.js 4.1 KB

123456
  1. // Licensed Materials - Property of IBM
  2. // IBM Cognos Products: hal
  3. // (C) Copyright IBM Corp. 2003, 2017.
  4. // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  5. function C_Cabinet(_hSG1, _hFR){this._hTG1=_hSG1;this._hTG1._hGU1=this;this._hGR=_hFR;this._hT6=false;this._hHU1={};this._hJ31={};};C_Cabinet.prototype.F_Detach=function(){U_DOM.F_RemoveAllChildren(this._hTG1);this._hTG1=null;};C_Cabinet.prototype.F_SetDimensions=function(_h852,_hMZ1){var _h952=_h852+"px";var _hNZ1=_hMZ1+"px";this._hTG1.style.width=_h952;this._hTG1.style.height=_hNZ1;var _h892;switch(this._hGR){case "top":_h892="rect(auto, auto, " + ( _hMZ1 + 20 ) + "px, auto)";break;case "bottom":_h892="rect(-20px, auto, auto, auto)";break;case "left":_h892="rect(auto, " + ( _h852 + 20 ) + "px, auto, auto)";break;case "right":_h892="rect(auto, auto, auto, -20px)";break;}this._hTG1.style.clip=_h892;for(var _h492 in this._hJ31){if(this._hJ31[_h492]){var _h6O1=this._hHU1[_h492];_h6O1.style.width=_h952;_h6O1.style.height=_hNZ1;}}};C_Cabinet.prototype.F_HasDrawer=function(_h492){return Boolean(this._hHU1[_h492]);};C_Cabinet.prototype.F_IsDrawerOpen=function(_h492){return Boolean(this._hJ31[_h492]);};C_Cabinet.prototype.F_IsPerformingTransition=function(){return this._hT6;};C_Cabinet.prototype.F_AddDrawer=function(_h492,_h6O1){this._hHU1[_h492]=_h6O1;_h6O1.style[U_DOM.M_sPrefixedTransitionProperty]="transform";this._hTG1.appendChild(_h6O1);_h6O1._hQ91=_h492;};C_Cabinet.prototype.F_RemoveDrawer=function(_h492){if(this._hJ31[_h492]){this.F_CloseDrawer(_h492, false);}var _h6O1=this._hHU1[_h492];this._hHU1[_h492]=null;_h6O1.style[U_DOM.M_sPrefixedTransitionDuration]="";_h6O1.style[U_DOM.M_sPrefixedTransitionTimingFunction]="";_h6O1.style[U_DOM.M_sPrefixedTransform]="";return this._hTG1.removeChild(_h6O1);};C_Cabinet.prototype.F_OpenDrawer=function(_h492,_hRM,_hHR,_hU6){this._hT6=true;this._hTG1.setAttribute( "_hQI", "true" );this._hTG1.style.visibility="visible";var _h9X=this._hTG1.offsetWidth;var _hIR=this._hTG1.offsetHeight;var _h6O1=this._hHU1[_h492];var _hA52=_h6O1.style;_hA52.width=_h9X+"px";_hA52.height=_hIR+"px";var _hUG1;switch(this._hGR){case "top":_hA52.bottom="0px";_hA52.left="0px";_hUG1="translate(0px," + _hIR + "px)";break;case "bottom":_hA52.top=_hIR+"px";_hA52.left="0px";_hUG1="translate(0px,-" + _hIR + "px)";break;case "left":_hA52.top="0px";_hA52.left=-_h9X+"px";_hUG1="translate(" + _h9X + "px,0px)";break;case "right":_hA52.top="0px";_hA52.left=_h9X+"px";_hUG1="translate(-" + _h9X + "px,0px)";break;}_hA52.display="block";_hA52[U_DOM.M_sPrefixedTransitionDuration]=_hRM?"0.3s":"0.0s";_hA52[U_DOM.M_sPrefixedTransitionTimingFunction]=_hRM?"ease-out":"step-end";if(_hRM){this._h51=this._hYF.F_CreateEventMethodCallback(this, _hU6);_h6O1.addEventListener("transitionend", this._h51);}if(_hRM){setTimeout(this._hZF.bind(this, _h6O1, _hUG1), 0);}else{_hA52[U_DOM.M_sPrefixedTransform]=_hUG1;}this._hJ31[_h492]=true;if(_hHR){_hHR();}if(!_hRM){this._hYF(null, _h6O1, _hU6);}};C_Cabinet.prototype._hZF=function(_h6O1,_hUG1){_h6O1.style[U_DOM.M_sPrefixedTransform]=_hUG1;};C_Cabinet.prototype.F_CloseDrawer=function(_h492,_hRM,_hU4){this._hT6=true;this._hTG1.setAttribute( "_hQI", "true" );var _h6O1=this._hHU1[_h492];_h6O1.style[U_DOM.M_sPrefixedTransitionDuration]=_hRM?"0.5s":"0.0s";_h6O1.style[U_DOM.M_sPrefixedTransitionTimingFunction]=_hRM?"ease-out":"step-end";if(_hRM){this._hV=this._hFD.F_CreateEventMethodCallback(this, _hU4);_h6O1.addEventListener("transitionend", this._hV);}_h6O1.style[U_DOM.M_sPrefixedTransform]="translate(0px,0px)";if(!_hRM){this._hFD(null, _h6O1, _hU4);}};C_Cabinet.prototype._hYF=function(e,_hB52,_hU6){if(this._h51){_hB52.removeEventListener("transitionend", this._h51);}this._h51=null;if(_hU6){_hU6();}this._hT6=false;this._hTG1.setAttribute( "_hQI", "false" );};C_Cabinet.prototype._hFD=function(e,_hB52,_hU4){if(this._hV){_hB52.removeEventListener("transitionend", this._hV);}this._hV=null;this._hTG1.style.visibility="hidden";this._hJ31[_hB52._hQ91]=false;if(_hU4){_hU4();}this._hT6=false;this._hTG1.setAttribute( "_hQI", "false" );};