diff --git a/mozilla/calendar/lightning/content/calendar-todo-list.css b/mozilla/calendar/lightning/content/calendar-todo-list.css index 44fd2bc86be..ef94eecf3d2 100644 --- a/mozilla/calendar/lightning/content/calendar-todo-list.css +++ b/mozilla/calendar/lightning/content/calendar-todo-list.css @@ -1,3 +1,7 @@ calendar-todo-item { -moz-binding: url("calendar-todo-list.xml#calendar-todo-item"); } + +.calendar-todo-item-label { + -moz-box-align: inherit; +} diff --git a/mozilla/calendar/lightning/content/calendar-todo-list.xml b/mozilla/calendar/lightning/content/calendar-todo-list.xml index 1e2487a6376..775d8976d47 100644 --- a/mozilla/calendar/lightning/content/calendar-todo-list.xml +++ b/mozilla/calendar/lightning/content/calendar-todo-list.xml @@ -7,8 +7,8 @@ - - + + @@ -90,7 +90,29 @@ this.updateDisplayFromTodo(); ]]> - + + + + + + + + + diff --git a/mozilla/calendar/lightning/content/messenger-overlay-sidebar.js b/mozilla/calendar/lightning/content/messenger-overlay-sidebar.js index e6ce1c66bc5..ced0c37b450 100644 --- a/mozilla/calendar/lightning/content/messenger-overlay-sidebar.js +++ b/mozilla/calendar/lightning/content/messenger-overlay-sidebar.js @@ -142,7 +142,8 @@ function selectedCalendarPane(event) // give the view the calendar, but make sure that everything // has uncollapsed first before we try to relayout! - setTimeout(0, function() { showCalendar(today()); }); + showCalendar(today()); + //setTimeout(function() { showCalendar(today()); }, 0); } function LtnObserveDisplayDeckChange(event) diff --git a/mozilla/calendar/lightning/content/todo-list.js b/mozilla/calendar/lightning/content/todo-list.js index 9824e2aec23..43d1f983c33 100644 --- a/mozilla/calendar/lightning/content/todo-list.js +++ b/mozilla/calendar/lightning/content/todo-list.js @@ -12,6 +12,15 @@ function initialize() this.populateTodoList(); }; +todoListManager.rebuildList = +function rebuildList() +{ + while (this.mOuterBox.firstChild) + this.mOuterBox.removeChild(this.mOuterBox.firstChild); + + this.populateTodoList(); +}; + todoListManager.addTodo = function addTodo(newTodo) { @@ -48,6 +57,44 @@ todoListManager.calendarObserver = { }; +todoListManager.calendarObserver.QueryInterface = +function QueryInterface(aIID) +{ + if (!aIID.equals(Components.interfaces.calIObserver) && + !aIID.equals(Components.interfaces.calICompositeObserver) && + !aIID.equals(Components.interfaces.nsISupports)) { + throw Components.results.NS_ERROR_NO_INTERFACE; + } + + return this; +}; + + +todoListManager.calendarObserver.onCalendarAdded = +todoListManager.calendarObserver.onCalendarRemoved = +function observer_onCalendarAddedOrRemoved(calendar) +{ + todoListManager.rebuildList(); +}; + +todoListManager.calendarObserver.onModifyItem = +function observer_onModifyItem(item) +{ + if (!(item instanceof Components.interfaces.calITodo)) + return; + + todoListManager.rebuildList(); +}; + +todoListManager.calendarObserver.onDeleteItem = +function observer_onDeleteItem(item) +{ + if (!(item instanceof Components.interfaces.calITodo)) + return; + + todoListManager.rebuildList(); +}; + todoListManager.calendarObserver.onAddItem = function observer_onAddItem(item) { diff --git a/mozilla/calendar/lightning/themes/pinstripe/lightning.css b/mozilla/calendar/lightning/themes/pinstripe/lightning.css index 285019ae4ea..f202e965d9f 100644 --- a/mozilla/calendar/lightning/themes/pinstripe/lightning.css +++ b/mozilla/calendar/lightning/themes/pinstripe/lightning.css @@ -1,10 +1,17 @@ /* Skin-domain style rules for lightning UI (pinstripe version) */ -#calendarTree { - background: #cccccc; +calendar-todo-item { + -moz-box-align: center; + margin-top: 0; + margin-bottom: 0; } -treechildren::-moz-tree-cell(checked) { +calendar-todo-item[selected="true"] { + background-color: Highlight; + color: HighlightText; +} + +#calendarTree > treechildren::-moz-tree-cell(checked) { background: #ff0000; list-style-image: url("chrome://calendar/skin/dot.png"); }