G_DialogMover.js 1.9 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. var G_DialogMover={};G_DialogMover.F_SetNewPosition=function(x,y,div,_h702){var _hC52=div.ownerDocument.body;var _h6Y1=Math.F_NonNeg(x+_hC52.scrollLeft-_h702._hMX);var _hM32=Math.F_NonNeg(y+_hC52.scrollTop-_h702._hNX);if((_h6Y1+div.offsetWidth)>(_hC52.clientWidth+_hC52.scrollLeft)){if(_hC52.clientWidth>div.offsetWidth){_h6Y1=_hC52.clientWidth+_hC52.scrollLeft-div.offsetWidth;}}if((_hM32+div.offsetHeight)>(_hC52.clientHeight+_hC52.scrollTop)){if(_hC52.clientHeight>div.offsetHeight){_hM32=_hC52.clientHeight+_hC52.scrollTop-div.offsetHeight;}}div.style.left=_h6Y1+"px";div.style.top=_hM32+"px";_h702.F_UpdateIFramePositions();};G_DialogMover.F_OnDragStart=function(_hO92,_hO3,_h0J){if(!this._hX71&&G_HAL.M_oLibraries["hal"]["enableDialogMoveAnimation"]&&G_BrowserInfo.M_bIsIE){this._hX71=true;U_DOM.F_SetOpacity(_hO92.tbl, 50);if(G_HAL.M_oLibraries["hal"]["enableDialogChrome"]){_hO92.tbl.parentNode.firstChild.style.visibility="hidden";}}return true;};G_DialogMover.F_OnDragOver=function(e,_hO92,_hO3,_hR52,_h0J){var div=_hO92.tbl.parentNode;var _hC52=div.ownerDocument.body;if(G_BrowserInfo.M_bIsTouchDevice&&!G_BrowserInfo.M_bIsPointerEnabled){var _hP52=e.touches[0];G_DialogMover.F_SetNewPosition(_hP52.clientX, _hP52.clientY, div, _hO92._h702);}else{G_DialogMover.F_SetNewPosition(e.clientX, e.clientY, div, _hO92._h702);}};G_DialogMover.F_OnDragDrop=function(e,_hO92,_h202){this._hY71(_hO92.tbl);};G_DialogMover.F_OnDragCancel=function(_hO92){this._hY71(_hO92.tbl);};G_DialogMover._hY71=function(tbl){if(G_HAL.M_oLibraries["hal"]["enableDialogMoveAnimation"]&&G_BrowserInfo.M_bIsIE){U_DOM.F_RemoveOpacity(tbl);if(G_HAL.M_oLibraries["hal"]["enableDialogChrome"]){tbl.parentNode.firstChild.style.visibility="visible";}this._hX71=false;}};