From 2be0197233ffda17793b62a6ce01c29b3e41d3fa Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 15 Feb 2010 14:20:30 +0000 Subject: [PATCH] Monotone-Parent: 6e5e04b64e7ab43a669ba1a00625f1cc6919f00e Monotone-Revision: 4ae3dfa4bb95a181c6c0fe5ac9a4f64a658b8491 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-02-15T14:20:30 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 8 ++++++++ UI/WebServerResources/SchedulerUI.css | 22 +++++++++++----------- UI/WebServerResources/SchedulerUIDnD.js | 17 ++++++++++++++--- 3 files changed, 33 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 840d53d10..06fbc9f12 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-02-15 Wolfgang Sourdeau + + * UI/WebServerResources/SchedulerUIDnD.js + (SOGoEventDragGhostController.showGhosts): ghosts now also have an + "eventInside" DIV to contain the title and draw the border. This + avoids the overflow of extra pixels added to the DIV heights for + start and end ghosts. + 2010-02-13 Wolfgang Sourdeau * UI/WebServerResources/SchedulerUI.js (attachDragControllers): we diff --git a/UI/WebServerResources/SchedulerUI.css b/UI/WebServerResources/SchedulerUI.css index 255f46373..b38f130b4 100644 --- a/UI/WebServerResources/SchedulerUI.css +++ b/UI/WebServerResources/SchedulerUI.css @@ -1360,15 +1360,13 @@ DIV.event DIV.leftDragGrip DIV.event DIV.rightDragGrip { right: 1px; } -DIV.event.dragging -{ border: 1px dashed #555; } - #daysView DIV.event.dragging { left: 0px !important; right: 0px !important; } DIV.event.dragging > DIV.eventInside { -moz-opacity: 1 !important; + border: 1px dashed #555; opacity: 1 !important; background-color: transparent !important; } @@ -1399,16 +1397,17 @@ DIV.event.draggable:hover DIV.rightDragGrip background-image: url(event-grippy-vertical.png); } #daysView DIV.eventDragGhost -{ border-left: 1px solid #555; - border-right: 1px solid #555; - left: 0px; - right: 0px; - padding: 1px; } +{ left: 0px; right: 0px; } -#daysView DIV.eventDragGhost.startGhost +#daysView DIV.eventDragGhost > DIV.eventInside +{ padding: 0px; + border-left: 1px solid #555; + border-right: 1px solid #555; } + +#daysView DIV.eventDragGhost.startGhost > DIV.eventInside { border-top: 1px solid #555; } -#daysView DIV.eventDragGhost.endGhost +#daysView DIV.eventDragGhost.endGhost > DIV.eventInside { border-bottom: 1px solid #555; } #monthDaysView DIV.eventDragGhost, @@ -1435,7 +1434,8 @@ DIV.event.draggable:hover DIV.rightDragGrip #calendarHeader DIV.eventDragGhost.endGhost { border-right: 1px solid #555; } -DIV.eventDragGhost > DIV +#ghostStartHour, +#ghostEndHour { position: absolute; width: 100%; vertical-align: baseline; diff --git a/UI/WebServerResources/SchedulerUIDnD.js b/UI/WebServerResources/SchedulerUIDnD.js index d09618c71..97d8e8ac3 100644 --- a/UI/WebServerResources/SchedulerUIDnD.js +++ b/UI/WebServerResources/SchedulerUIDnD.js @@ -342,6 +342,7 @@ var SOGoDragGhostInterface = { title: null, folderClass: null, + inside: null, currentStart: -1, currentDuration: -1, @@ -351,23 +352,27 @@ var SOGoDragGhostInterface = { show: function SDGI_show() { if (!this.visible) { this.removeClassName("hidden"); + if (this.inside) + this.inside.removeClassName("hidden"); this.visible = true; } }, hide: function SDGI_hide() { if (this.visible) { this.addClassName("hidden"); + if (this.inside) + this.inside.addClassName("hidden"); this.visible = false; } }, setTitle: function SDGI_setTitle(title) { if (this.title != title) { - while (this.childNodes.length) { - this.removeChild(this.firstChild); + while (this.inside.childNodes.length) { + this.inside.removeChild(this.inside.firstChild); } if (title) { - this.appendChild(document.createTextNode(title)); + this.inside.appendChild(document.createTextNode(title)); } this.title = title; } @@ -552,6 +557,12 @@ SOGoEventDragGhostController.prototype = { newGhost.className = "event eventDragGhost"; newGhost.cssHandlesPosition = isMultiday; newGhost.hide(); + + var ghostInside = $(document.createElement("div")); + ghostInside.className = "eventInside"; + newGhost.inside = ghostInside; + newGhost.appendChild(ghostInside); + nodes[i].appendChild(newGhost); this.ghosts.push(newGhost); }