diff --git a/calendar/js/dragDropFunctions.js b/calendar/js/dragDropFunctions.js index caecf213f8..7f6e942a41 100644 --- a/calendar/js/dragDropFunctions.js +++ b/calendar/js/dragDropFunctions.js @@ -13,6 +13,9 @@ function dragEvent() { if(minOffset()) { + // set a fixed width + dd.obj.css.width = dd.obj.w + dd.px; + // make a snapshot of the old (original) innerHTML of the dragged event if(!dd.obj.oldInnerHTML) { @@ -62,6 +65,10 @@ function dropEvent() { dd.obj.div.innerHTML = dd.obj.oldInnerHTML; } + + // restore old width (calEvent width = 100%) + dd.obj.div.style.width = "100%"; + dd.obj.moveTo(dd.obj.defx,dd.obj.defy); } } diff --git a/phpgwapi/js/wz_dragdrop/wz_dragdrop.js b/phpgwapi/js/wz_dragdrop/wz_dragdrop.js index 63aba4bcfa..8e9220a021 100644 --- a/phpgwapi/js/wz_dragdrop/wz_dragdrop.js +++ b/phpgwapi/js/wz_dragdrop/wz_dragdrop.js @@ -212,11 +212,12 @@ dd.getWH = function(d_o) d_o.h = dd.getDivH(d_o); if(d_o.css) { - d_o.css.width = d_o.w + dd.px; + // dont set the width at the beginning + //d_o.css.width = d_o.w + dd.px; d_o.css.height = d_o.h + dd.px; d_o.dw = dd.getDivW(d_o)-d_o.w; d_o.dh = dd.getDivH(d_o)-d_o.h; - d_o.css.width = (d_o.w-d_o.dw) + dd.px; + //d_o.css.width = (d_o.w-d_o.dw) + dd.px; d_o.css.height = (d_o.h-d_o.dh) + dd.px; } else d_o.dw = d_o.dh = 0;