Author: tan_pham_dinh
Date: 2010-01-13 01:56:42 -0500 (Wed, 13 Jan 2010)
New Revision: 1248
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js
Log:
GTNPORTAL-442: Still have problems with DnD in Firefox
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 2010-01-13
04:19:28 UTC (rev 1247)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js 2010-01-13
06:56:42 UTC (rev 1248)
@@ -246,6 +246,15 @@
var srcElement = dndEvent.dragObject ;
var targetElement = dndEvent.foundTargetObject;
+ if(!targetElement) {
+ if(!dndEvent.dragObject.isComponent) {
+ dndEvent.dragObject.parentNode.removeChild(dndEvent.dragObject) ;
+ newComponent = true;
+ }
+ dndEvent.dragObject.style.width = "auto";
+ return;
+ }
+
var newComponent = false;
if(srcElement.isComponent && (targetElement.foundIndex != null)) {
if(eXo.portal.PortalDragDrop.layoutTypeElementNode != null) {
@@ -261,8 +270,6 @@
newComponent = true;
}
- if(!targetElement) return;
-
var params = [
{name: "srcID", value: (srcElement.id.replace(/^UIPortlet-/,
"")).replace(/^UIContainer-/,"")},
{name: "targetID", value: targetElement.id.replace(/^.*-/, "")},
Show replies by date