diff --git a/mozilla/calendar/base/content/calendar-decorated-month-view.xml b/mozilla/calendar/base/content/calendar-decorated-month-view.xml
index 201646a9c5a..c057f71e85c 100644
--- a/mozilla/calendar/base/content/calendar-decorated-month-view.xml
+++ b/mozilla/calendar/base/content/calendar-decorated-month-view.xml
@@ -82,6 +82,16 @@
subj.QueryInterface(Components.interfaces.nsIPrefBranch2);
+ // refresh view if categories seem to have changed
+ if (pref.indexOf("calendar.category.color") == 0) {
+ if (!this.calView.startDay || !this.calView.endDay) {
+ // Don't refresh if we're not initialized
+ return;
+ }
+ // Refresh the view to recreate the event boxes
+ this.calView.goToDay(this.calView.selectedDay);
+ }
+
switch (pref) {
case "calendar.previousweeks.inview":
diff --git a/mozilla/calendar/base/content/calendar-decorated-multiweek-view.xml b/mozilla/calendar/base/content/calendar-decorated-multiweek-view.xml
index 6a09fdbd1bb..f8380dfc14e 100644
--- a/mozilla/calendar/base/content/calendar-decorated-multiweek-view.xml
+++ b/mozilla/calendar/base/content/calendar-decorated-multiweek-view.xml
@@ -85,6 +85,16 @@
subj.QueryInterface(Components.interfaces.nsIPrefBranch2);
+ // refresh view if categories seem to have changed
+ if (pref.indexOf("calendar.category.color") == 0) {
+ if (!this.calView.startDay || !this.calView.endDay) {
+ // Don't refresh if we're not initialized
+ return;
+ }
+ // Refresh the view to recreate the event boxes
+ this.calView.goToDay(this.calView.selectedDay);
+ }
+
switch (pref) {
case "calendar.previousweeks.inview":
diff --git a/mozilla/calendar/base/content/calendar-decorated-week-view.xml b/mozilla/calendar/base/content/calendar-decorated-week-view.xml
index 1064b1ea65b..42fb7056cf3 100644
--- a/mozilla/calendar/base/content/calendar-decorated-week-view.xml
+++ b/mozilla/calendar/base/content/calendar-decorated-week-view.xml
@@ -78,6 +78,16 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+ flex="1"
+ style="margin: 0;"/>
+
+
+
+
+
+
+
+
+
+
+
@@ -100,7 +104,7 @@
-
+
- var evbox = this.parentNode.parentNode.parentNode.parentNode.
- parentNode.parentNode.parentNode;
-
- // still select it (since we'll stopPropagation())
- evbox.calendarView.setSelectedItems(1,
- [event.ctrlKey ? evbox.mOccurrence.parentItem : evbox.mOccurrence]);
-
- // then start dragging it
- evbox.parentColumn.startSweepingToModifyEvent(evbox, evbox.mOccurrence, whichside, event.screenX, event.screenY);
+ // store the attribute 'whichside' in the event object
+ // but *don't* call stopPropagation(). as soon as the
+ // enclosing event box will receive the event it will
+ // make use of this information in order to invoke the
+ // appropriate action.
+ event.whichside = this.getAttribute("whichside");
]]>
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0) {
+ box.removeAttribute("hidden");
+ } else {
+ box.setAttribute("hidden","true");
+ }
+ ]]>
+
+
+
+
diff --git a/mozilla/calendar/base/content/calendar-views.js b/mozilla/calendar/base/content/calendar-views.js
index f9c056ee1cd..b46a1f12bde 100644
--- a/mozilla/calendar/base/content/calendar-views.js
+++ b/mozilla/calendar/base/content/calendar-views.js
@@ -435,7 +435,7 @@ function updateStyleSheetForObject(aObject, aSheet) {
ruleUpdaterFunc = function categoryRuleFunc(aRule, aIndex) {
var color = getPrefSafe("calendar.category.color."+aObject, null);
if (color) {
- aRule.style.border = color + " solid 2px";
+ aRule.style.backgroundColor = color;
} else {
aSheet.deleteRule(aIndex);
}
diff --git a/mozilla/calendar/base/jar.mn b/mozilla/calendar/base/jar.mn
index ba4a77ab067..e53843a730d 100644
--- a/mozilla/calendar/base/jar.mn
+++ b/mozilla/calendar/base/jar.mn
@@ -96,6 +96,7 @@ calendar.jar:
skin/classic/calendar/event-grippy-right.png (themes/common/event-grippy-right.png)
skin/classic/calendar/event-grippy-top.png (themes/common/event-grippy-top.png)
skin/classic/calendar/gradient-overlay.png (themes/common/gradient-overlay.png)
+ skin/classic/calendar/category-overlay.png (themes/common/category-overlay.png)
skin/classic/calendar/shadow-bottom.png (themes/common/shadow-bottom.png)
skin/classic/calendar/shadow-edge-left.png (themes/common/shadow-edge-left.png)
skin/classic/calendar/shadow-edge-right.png (themes/common/shadow-edge-right.png)
diff --git a/mozilla/calendar/base/themes/pinstripe/calendar-views.css b/mozilla/calendar/base/themes/pinstripe/calendar-views.css
index fa280688591..5777013099a 100644
--- a/mozilla/calendar/base/themes/pinstripe/calendar-views.css
+++ b/mozilla/calendar/base/themes/pinstripe/calendar-views.css
@@ -159,19 +159,12 @@ calendar-header-container[weekend="true"][selected="true"],
.calendar-event-box-container {
padding: 0;
+ margin: 1px;
overflow: hidden;
}
-.calendar-event-box-container[parentorient="vertical"] {
- margin: 2px;
-}
-
-.calendar-event-box-container[parentorient="horizontal"] {
- margin: 2px;
-}
-
-.event-frame {
- margin: 2px;
+.calendar-event-box-container[has-category="true"] {
+ margin-right: 0px;
}
.calendar-event-details {
@@ -419,6 +412,10 @@ box[dropbox="true"] {
list-style-image: url("chrome://calendar/skin/gradient-overlay.png");
}
+.calendar-category-box-gradient {
+ list-style-image: url("chrome://calendar/skin/category-overlay.png");
+}
+
.calendar-event-box-shadow-right {
list-style-image: url("chrome://calendar/skin/shadow-right.png");
}
diff --git a/mozilla/calendar/base/themes/winstripe/calendar-views.css b/mozilla/calendar/base/themes/winstripe/calendar-views.css
index 26995beb751..df1daed8231 100644
--- a/mozilla/calendar/base/themes/winstripe/calendar-views.css
+++ b/mozilla/calendar/base/themes/winstripe/calendar-views.css
@@ -159,19 +159,12 @@ calendar-header-container[weekend="true"][selected="true"],
.calendar-event-box-container {
padding: 0;
+ margin: 1px;
overflow: hidden;
}
-.calendar-event-box-container[parentorient="vertical"] {
- margin: 2px;
-}
-
-.calendar-event-box-container[parentorient="horizontal"] {
- margin: 2px;
-}
-
-.event-frame {
- margin: 2px;
+.calendar-event-box-container[has-category="true"] {
+ margin-right: 0px;
}
.calendar-event-details {
@@ -419,6 +412,10 @@ box[dropbox="true"] {
list-style-image: url("chrome://calendar/skin/gradient-overlay.png");
}
+.calendar-category-box-gradient {
+ list-style-image: url("chrome://calendar/skin/category-overlay.png");
+}
+
.calendar-event-box-shadow-right {
list-style-image: url("chrome://calendar/skin/shadow-right.png");
}
diff --git a/mozilla/calendar/locales/en-US/chrome/prototypes/sun-calendar-event-dialog.dtd b/mozilla/calendar/locales/en-US/chrome/prototypes/sun-calendar-event-dialog.dtd
index dce90e38c9b..f83a0c48401 100644
--- a/mozilla/calendar/locales/en-US/chrome/prototypes/sun-calendar-event-dialog.dtd
+++ b/mozilla/calendar/locales/en-US/chrome/prototypes/sun-calendar-event-dialog.dtd
@@ -278,6 +278,7 @@
+