Fix bug 806305 - unchecked “task” printing, should disable relative settings. r=philipp
This commit is contained in:
Родитель
0c647c8128
Коммит
d78e5d6bef
|
@ -53,6 +53,8 @@ function loadCalendarPrintDialog() {
|
|||
|
||||
opener.setCursor("auto");
|
||||
|
||||
eventsAndTasksOptions("tasks");
|
||||
|
||||
refreshHtml();
|
||||
|
||||
self.focus();
|
||||
|
@ -293,3 +295,15 @@ function onDatePick() {
|
|||
calRadioGroupSelectItem("view-field", "custom-range");
|
||||
setTimeout(refreshHtml, 0);
|
||||
}
|
||||
|
||||
function eventsAndTasksOptions(targetId) {
|
||||
let checkbox = document.getElementById(targetId);
|
||||
let checked = checkbox.getAttribute("checked") == "true";
|
||||
// Workaround to make the checkbox persistent (bug 15232).
|
||||
checkbox.setAttribute("checked", checked ? "true" : "false");
|
||||
|
||||
if (targetId == "tasks") {
|
||||
setElementValue("tasks-with-no-due-date", !checked, "disabled");
|
||||
setElementValue("completed-tasks", !checked, "disabled");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
<script type="application/javascript" src="chrome://calendar/content/calendar-print-dialog.js"/>
|
||||
<script type="application/javascript" src="chrome://calendar/content/calUtils.js"/>
|
||||
<script type="application/javascript" src="chrome://calendar/content/calendar-ui-utils.js"/>
|
||||
<script type="application/javascript" src="chrome://global/content/printUtils.js"/>
|
||||
|
||||
<hbox id="firstHbox" flex="1">
|
||||
|
@ -71,10 +72,12 @@
|
|||
<grid id="grid-events-and-tasks">
|
||||
<columns id="columns-for-events-and-tasks">
|
||||
<column id="column-event">
|
||||
<checkbox id="events" label="&calendar.print.events.label;" checked="true" oncommand="refreshHtml();"/>
|
||||
<checkbox id="events" label="&calendar.print.events.label;" checked="true"
|
||||
oncommand="eventsAndTasksOptions(this.id); refreshHtml();" persist="checked" autocheck="false"/>
|
||||
</column>
|
||||
<column id="column-tasks">
|
||||
<checkbox id="tasks" label="&calendar.print.tasks.label;" checked="true" oncommand="refreshHtml();"/>
|
||||
<checkbox id="tasks" label="&calendar.print.tasks.label;" checked="true"
|
||||
oncommand="eventsAndTasksOptions(this.id); refreshHtml();" persist="checked" autocheck="false"/>
|
||||
</column>
|
||||
</columns>
|
||||
</grid>
|
||||
|
|
Загрузка…
Ссылка в новой задаче