зеркало из https://github.com/mozilla/pjs.git
remember which calendars were active, and display that. r=shaver
This commit is contained in:
Родитель
dbf68a299b
Коммит
2d34133fd6
|
@ -168,6 +168,7 @@ function setCalendarManagerUI()
|
|||
calendarList.removeChild(child);
|
||||
}
|
||||
|
||||
var composite = getDisplayComposite();
|
||||
var calmgr = getCalendarManager();
|
||||
var calendars = calmgr.getCalendars({});
|
||||
for each (var calendar in calendars) {
|
||||
|
@ -175,7 +176,9 @@ function setCalendarManagerUI()
|
|||
|
||||
var checkCell = document.createElement("listcell");
|
||||
checkCell.setAttribute("type", "checkbox");
|
||||
checkCell.setAttribute("checked", true);
|
||||
|
||||
checkCell.setAttribute("checked",
|
||||
composite.getCalendar(calendar.uri) ? true : false);
|
||||
listItem.appendChild(checkCell);
|
||||
listItem.addEventListener("click", onCalendarCheckboxClick, true);
|
||||
|
||||
|
|
|
@ -53,11 +53,7 @@ function getDisplayComposite()
|
|||
if (!gDisplayComposite) {
|
||||
gDisplayComposite = Components.classes["@mozilla.org/calendar/calendar;1?type=composite"]
|
||||
.createInstance(Components.interfaces.calICompositeCalendar);
|
||||
var calMgr = getCalendarManager();
|
||||
var calList = calMgr.getCalendars({});
|
||||
for (i in calList) {
|
||||
gDisplayComposite.addCalendar(calList[i]);
|
||||
}
|
||||
gDisplayComposite.prefPrefix = 'calendar-main';
|
||||
}
|
||||
return gDisplayComposite;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче