C_DropTargetManager.js 2.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_DropTargetManager(){this._hI41=[];};C_DropTargetManager.prototype.F_AddTarget=function(_hXA1){this._hI41.F_PushUnique(_hXA1);};C_DropTargetManager.prototype.F_RemoveTarget=function(_hXA1){this._hI41.F_RemoveItem(_hXA1);};C_DropTargetManager.prototype.F_StartDragDrop=function(_hJ41, _hO92, _hO3, _h0J, _hFN, _hXX, _hYX, _hZX){return G_DragDrop.F_Start(_hJ41,(this._hI41.length==1)?this._hI41[0]:this,_hO92, _hO3, _h0J, _hFN, _hXX, _hYX, _hZX);};C_DropTargetManager.prototype.F_OnDragStart=function(){var _hZU1=[];var _hBZ1=this._hI41.length;for(var i=0; i<_hBZ1;++i){var _hXA1=this._hI41[i];if(!_hXA1.F_OnDragStart()){_hZU1.F_CallEach("F_OnDragCancel");return false;}_hZU1.push(_hXA1);}return true;};C_DropTargetManager.prototype.F_OnDragOver=function(e,_hO92,_hO3,_hR52,_h0J){this._hSD=null;var _h0V1=[];var _hBZ1=this._hI41.length;for(var i=0; i<_hBZ1;++i){var _hXA1=this._hI41[i];var _h9S=_hXA1.F_OnDragOver(e, _hO92, _hO3, _hR52, _h0J);if(_h9S!=G_DragDrop.eEffectNone){_h0V1.push(_h9S);this._hSD=_hXA1;}}if(_h0V1.length>1){G_Debug.F_Print("C_DropTargetManager.F_OnDragOver: Cannot have more than one effect returned from the drop targets.");}return(_h0V1.length==0)?G_DragDrop.eEffectNone:_h0V1[_h0V1.length-1];};C_DropTargetManager.prototype.F_OnDragDrop=function(e,_hO92,_h202,_h0J){var _h0V1=[];var _hBZ1=this._hI41.length;for(var i=0; i<_hBZ1;++i){var _hXA1=this._hI41[i];var _h9S=_hXA1.F_OnDragDrop(e, _hO92,(this._hSD==_hXA1)?_h202:G_DragDrop.eEffectNone,_h0J);if(_h9S!=G_DragDrop.eEffectNone){_h0V1.push(_h9S);}}delete this._hSD;if(_h0V1.length>1){G_Debug.F_Print("C_DropTargetManager.F_OnDragDrop: Cannot have more than one effect returned from the drop targets.");}return(_h0V1.length==0)?G_DragDrop.eEffectNone:_h0V1[0];};C_DropTargetManager.prototype.F_OnDragCancel=function(){delete this._hSD;this._hI41.F_CallEach("F_OnDragCancel");};