From 09d521d727fe18b6481613ba48c345371dd0e415 Mon Sep 17 00:00:00 2001 From: "vladimir%pobox.com" Date: Tue, 19 Apr 2005 06:51:11 +0000 Subject: [PATCH] working event creation, calendar check on/off affecting view --- calendar/lightning/content/calendar-management.js | 10 ++++------ .../lightning/content/messenger-overlay-sidebar.js | 2 ++ calendar/lightning/themes/pinstripe/lightning.css | 9 +++++++++ calendar/lightning/themes/winstripe/lightning.css | 9 +++++++++ 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/calendar/lightning/content/calendar-management.js b/calendar/lightning/content/calendar-management.js index 407afe38b98..251f3c17156 100644 --- a/calendar/lightning/content/calendar-management.js +++ b/calendar/lightning/content/calendar-management.js @@ -5,7 +5,7 @@ var ltnCalendarManagerObserver = { QueryInterface: function(aIID) { - if (!aIID.equals(Components.interfaces.calICalendarManagerObserver) || + if (!aIID.equals(Components.interfaces.calICalendarManagerObserver) && !aIID.equals(Components.interfaces.nsISupports)) { throw Components.results.NS_ERROR_NO_INTERFACE; } @@ -36,8 +36,8 @@ var ltnCompositeCalendarObserver = { QueryInterface: function(aIID) { // I almost wish that calICompositeObserver did not inherit from calIObserver, // and that the composite calendar maintined its own observer list - if (!aIID.equals(Components.interfaces.calIObserver) || - !aIID.equals(Components.interfaces.calICompositeObserver) || + if (!aIID.equals(Components.interfaces.calIObserver) && + !aIID.equals(Components.interfaces.calICompositeObserver) && !aIID.equals(Components.interfaces.nsISupports)) { throw Components.results.NS_ERROR_NO_INTERFACE; } @@ -71,7 +71,7 @@ var ltnCompositeCalendarObserver = { var ltnCalendarViewController = { QueryInterface: function(aIID) { - if (!aIID.equals(Components.interfaces.calICalendarViewController) || + if (!aIID.equals(Components.interfaces.calICalendarViewController) && !aIID.equals(Components.interfaces.nsISupports)) { throw Components.results.NS_ERROR_NO_INTERFACE; } @@ -149,11 +149,9 @@ var ltnCalendarTreeView = { if (getCompositeCalendar().getCalendar(cal.uri)) { // need to remove it getCompositeCalendar().removeCalendar(cal.uri); - dump ("calendar removed\n"); } else { // need to add it getCompositeCalendar().addCalendar(cal); - dump ("calendar added\n"); } document.getElementById("calendarTree").boxObject.invalidateRow(row); }, diff --git a/calendar/lightning/content/messenger-overlay-sidebar.js b/calendar/lightning/content/messenger-overlay-sidebar.js index f120982d6b1..0d3ba75775f 100644 --- a/calendar/lightning/content/messenger-overlay-sidebar.js +++ b/calendar/lightning/content/messenger-overlay-sidebar.js @@ -9,6 +9,8 @@ function selectedCalendarPane(event) if (view.displayCalendar != getCompositeCalendar()) { var d = Components.classes['@mozilla.org/calendar/datetime;1'].createInstance(Components.interfaces.calIDateTime); d.jsDate = new Date(); + //XXX use default timezone + d = d.getInTimezone("/mozilla.org/20050126_1/America/Los_Angeles"); var st = d.startOfWeek; var end = d.endOfWeek; diff --git a/calendar/lightning/themes/pinstripe/lightning.css b/calendar/lightning/themes/pinstripe/lightning.css index 1d3eb775f79..285019ae4ea 100644 --- a/calendar/lightning/themes/pinstripe/lightning.css +++ b/calendar/lightning/themes/pinstripe/lightning.css @@ -1 +1,10 @@ /* Skin-domain style rules for lightning UI (pinstripe version) */ + +#calendarTree { + background: #cccccc; +} + +treechildren::-moz-tree-cell(checked) { + background: #ff0000; + list-style-image: url("chrome://calendar/skin/dot.png"); +} diff --git a/calendar/lightning/themes/winstripe/lightning.css b/calendar/lightning/themes/winstripe/lightning.css index c4b8ac2b168..807dd8e6195 100644 --- a/calendar/lightning/themes/winstripe/lightning.css +++ b/calendar/lightning/themes/winstripe/lightning.css @@ -1 +1,10 @@ /* Skin-domain style rules for lightning UI (winstripe version) */ + +#calendarTree { + background: #cccccc; +} + +treechildren::-moz-tree-cell(checked) { + background: #ff0000; + list-style-image: url("chrome://calendar/skin/dot.png"); +}