Author: tan_pham_dinh
Date: 2009-10-23 00:52:50 -0400 (Fri, 23 Oct 2009)
New Revision: 408
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/DragDrop.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js
Log:
GTNPORTAL-40: Error in dragdrop and prevent scroll down to much
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/DragDrop.js
===================================================================
---
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/DragDrop.js 2009-10-23
03:41:35 UTC (rev 407)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/DragDrop.js 2009-10-23
04:52:50 UTC (rev 408)
@@ -57,6 +57,7 @@
} ;
DragDrop.prototype.init = function(dropableTargets, clickObject, dragObject, evt) {
+ if(evt && evt.preventDefault) evt.preventDefault();
eXo.core.Mouse.init(evt) ;
this.dropableTargets = dropableTargets ;
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js
===================================================================
---
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js 2009-10-23
03:41:35 UTC (rev 407)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js 2009-10-23
04:52:50 UTC (rev 408)
@@ -332,8 +332,10 @@
};
PortalDragDrop.prototype.scrollOnDrag = function(dragObject, dndEvent) {
+ var workspaceHeight =
document.getElementById("UIWorkingWorkspace").offsetHeight;
+ var browserHeight = eXo.core.Browser.getBrowserHeight() ;
+ if(workspaceHeight <= browserHeight) return;
var dragObjectTop = eXo.core.Browser.findPosY(dragObject) ;
- var browserHeight = eXo.core.Browser.getBrowserHeight() ;
var mouseY = eXo.core.Browser.findMouseYInClient(dndEvent.backupMouseEvent) ;
var deltaTopMouse = eXo.core.Browser.findMouseYInPage(dndEvent.backupMouseEvent) -
mouseY ;
var deltaTop = mouseY - (Math.round(browserHeight * 5/6)) ;
Show replies by date