From ce96395fa38dfd28774c1ec5ac5663e43a09e495 Mon Sep 17 00:00:00 2001 From: "Berend.Cornelius%sun.com" Date: Mon, 25 Aug 2008 09:30:03 +0000 Subject: [PATCH] Bug 437412-zero-length and short events are shown at the wrong times in the timegrid;r=berend and philipp; patch=berend and philipp;ui-r=daniel git-svn-id: svn://10.0.0.236/trunk@253801 18797224-902f-48f8-a5cc-f745e15eee43 --- .../base/content/calendar-multiday-view.xml | 59 ++++++--------- .../base/themes/pinstripe/calendar-views.css | 71 ++++++++++++------- 2 files changed, 69 insertions(+), 61 deletions(-) diff --git a/mozilla/calendar/base/content/calendar-multiday-view.xml b/mozilla/calendar/base/content/calendar-multiday-view.xml index e51aaa1e609..c4cf6d9a53b 100644 --- a/mozilla/calendar/base/content/calendar-multiday-view.xml +++ b/mozilla/calendar/base/content/calendar-multiday-view.xml @@ -216,45 +216,31 @@ --> - - - + + + - - null - - top - - false - 0 - 0 - - @@ -804,7 +790,6 @@ if (chunk.event) { var chunkBox = createXULElement("calendar-event-box"); var durMinutes = duration.inSeconds / 60; - chunkBox.setAttribute("style", "min-width: 1px; min-height: 1px;"); var size = Math.max(durMinutes * this.mPixPerMin, minSize); if (orient == "vertical") { chunkBox.setAttribute("height", size); @@ -1093,11 +1078,11 @@ + - - - - + + + + - @@ -3055,7 +3040,7 @@ if (this.getAttribute("orient") != aVal) needsreorient = true; } - + if (aAttr == "context" || aAttr == "item-context") needsrelayout = true; diff --git a/mozilla/calendar/base/themes/pinstripe/calendar-views.css b/mozilla/calendar/base/themes/pinstripe/calendar-views.css index 76eac29beb9..5fb0f53be6d 100644 --- a/mozilla/calendar/base/themes/pinstripe/calendar-views.css +++ b/mozilla/calendar/base/themes/pinstripe/calendar-views.css @@ -178,7 +178,6 @@ calendar-header-container[weekend="true"][selected="true"], .calendar-event-box-container { padding: 0; - margin: 1px; overflow: hidden; } @@ -187,6 +186,7 @@ calendar-header-container[weekend="true"][selected="true"], } .calendar-event-details { + margin: 1px; -moz-padding-start: 2px; overflow: hidden; } @@ -221,22 +221,6 @@ calendar-event-box[selected="true"] .calendar-event-selection { background-color: #ffdb67 !important; } -calendar-event-gripbar { - -moz-box-align: center; - -moz-box-pack: center; - min-height: 4px; - min-width: 4px; - overflow: hidden; -} - -calendar-event-gripbar[parentorient="vertical"] { - cursor: n-resize; -} - -calendar-event-gripbar[parentorient="horizontal"] { - cursor: e-resize; -} - /* headers horizontal, times vertical */ box[anonid="labelbox"][orient="horizontal"] { height: 10px; @@ -478,31 +462,70 @@ box[dropbox="true"] { list-style-image: url("chrome://calendar/skin/category-overlay.png"); } -calendar-event-box[orient="vertical"]:hover .calendar-event-box-grippy-top { +calendar-event-gripbar { + -moz-box-align: center; + -moz-box-pack: center; + min-height: 4px; + min-width: 4px; + overflow: hidden; +} + +calendar-event-gripbar[parentorient="vertical"][whichside="start"] { + cursor: n-resize; +} + +calendar-event-gripbar[parentorient="vertical"][whichside="end"] { + cursor: s-resize; +} + +calendar-event-gripbar[parentorient="horizontal"][whichside="start"] { + cursor: w-resize; +} + +calendar-event-gripbar[parentorient="horizontal"][whichside="end"] { + cursor: e-resize; +} + +calendar-event-box[orient="vertical"] .calendar-event-box-grippy-top { list-style-image: url("chrome://calendar/skin/event-grippy-top.png"); + visibility: hidden; } -calendar-event-box[orient="vertical"]:hover .calendar-event-box-grippy-bottom { +calendar-event-box[orient="vertical"] .calendar-event-box-grippy-bottom { list-style-image: url("chrome://calendar/skin/event-grippy-bottom.png"); + visibility: hidden; } -calendar-event-box[orient="horizontal"]:hover .calendar-event-box-grippy-top { - list-style-image: url("chrome://calendar/skin/event-grippy-left.png"); -} - +calendar-event-box[orient="horizontal"]:hover .calendar-event-box-grippy-top, calendar-event-box[orient="horizontal"]:hover .calendar-event-box-grippy-bottom { + visibility: visible; +} + +calendar-event-box[orient="vertical"]:hover .calendar-event-box-grippy-top, +calendar-event-box[orient="vertical"]:hover .calendar-event-box-grippy-bottom { + visibility: visible; +} + +calendar-event-box[orient="horizontal"] .calendar-event-box-grippy-top { + list-style-image: url("chrome://calendar/skin/event-grippy-left.png"); + visibility: hidden; +} + +calendar-event-box[orient="horizontal"] .calendar-event-box-grippy-bottom { list-style-image: url("chrome://calendar/skin/event-grippy-right.png"); + visibility: hidden; } calendar-event-box[readOnly="true"]:hover .calendar-event-box-grippy-top, calendar-event-box[readOnly="true"]:hover .calendar-event-box-grippy-bottom { - list-style-image: none; + visibility: hidden; cursor: auto; } /* Alarm image */ .alarm-image { list-style-image: url(chrome://calendar/skin/alarm.png); + margin: 2px; } .alarm-image[flashing="true"] {