bug 347381 - disables 'Selected Events' if none are selected. patch by jminta, r1=lilmatt, r2=mvl

This commit is contained in:
mattwillis%gmail.com 2006-09-06 13:15:01 +00:00
Родитель 7f81005f2f
Коммит 32e2ce94ac
2 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -116,7 +116,7 @@ function monthPrint_format(aStream, aStart, aEnd, aCount, aItems, aTitle) {
firstDate.day -= 7;
firstDate.normalize();
}
if (firstDate.compare(aStart) != 1) {
if (firstDate.compare(start) != 1) {
start = maybeNewStart;
}
@ -136,7 +136,7 @@ function monthPrint_format(aStream, aStart, aEnd, aCount, aItems, aTitle) {
// aEnd is exclusive, so we can add another day and be safe
lastDate.day += 1;
lastDate.normalize();
if (lastDate.compare(aEnd) != -1) {
if (lastDate.compare(end) != -1) {
end = maybeNewEnd;
}
@ -146,7 +146,7 @@ function monthPrint_format(aStream, aStart, aEnd, aCount, aItems, aTitle) {
var body = <body/>
while (date.month <= aEnd.month) {
while (date.month <= end.month) {
var monthName = calGetString("dateFormat", "month." + (date.month +1)+ ".name");
monthName += " " + start.year;
body.appendChild(

Просмотреть файл

@ -54,6 +54,10 @@ function loadCalendarPrintDialog()
document.getElementById("start-date-picker").value = theView.startDay.jsDate;
document.getElementById("end-date-picker").value = theView.endDay.jsDate;
if (!gCalendarWindow.EventSelection.selectedEvents.length) {
document.getElementById("selected").setAttribute("disabled", true);
}
// Get a list of formatters
var contractids = new Array();
var catman = Components.classes["@mozilla.org/categorymanager;1"]