зеркало из https://github.com/mozilla/pjs.git
Bug 418387- Task Mode, Context Menu: Mark Completed menuitem is often not correctly prechecked;r=philipp
This commit is contained in:
Родитель
c0178a617a
Коммит
4fab2fcbb9
|
@ -60,7 +60,6 @@ var calendarController = {
|
|||
"calendar_publish_selected_events_command": true,
|
||||
|
||||
"calendar_reload_remote_calendars": true,
|
||||
"calendar_iscompleted_command": true,
|
||||
"calendar_percentComplete-0_command": true,
|
||||
"calendar_percentComplete-25_command": true,
|
||||
"calendar_percentComplete-50_command": true,
|
||||
|
@ -119,7 +118,6 @@ var calendarController = {
|
|||
return this.todo_items_selected &&
|
||||
this.todo_tasktree_focused;
|
||||
case "calendar_delete_todo_command":
|
||||
case "calendar_iscompleted_command":
|
||||
case "calendar_percentComplete-0_command":
|
||||
case "calendar_percentComplete-25_command":
|
||||
case "calendar_percentComplete-50_command":
|
||||
|
|
|
@ -83,7 +83,6 @@
|
|||
<command id="calendar_week-view_command" oncommand="showCalendarView('week')"/>
|
||||
<command id="calendar_multiweek-view_command" oncommand="showCalendarView('multiweek')"/>
|
||||
<command id="calendar_month-view_command" oncommand="showCalendarView('month')"/>
|
||||
<command id="calendar_iscompleted_command" oncommand="toggleCompleted(event);"/>
|
||||
<command id="calendar_modify_todo_command" oncommand="goDoCommand('calendar_modify_todo_command')"/>
|
||||
<command id="calendar_task_category_command" oncommand="contextChangeTaskCategory(event);"/>
|
||||
<command id="calendar_percentComplete-0_command" oncommand="goDoCommand('calendar_percentComplete-0_command')"/>
|
||||
|
@ -129,9 +128,8 @@
|
|||
<menuitem type="checkbox"
|
||||
label="&calendar.context.markcompleted.label;"
|
||||
accesskey="&calendar.context.markcompleted.accesskey;"
|
||||
id="calendar.context.markcompleted"
|
||||
observes="calendar_iscompleted_command"
|
||||
command="calendar_iscompleted_command"/>
|
||||
id="calendar-context-markcompleted"
|
||||
oncommand="toggleCompleted(event)"/>
|
||||
<menu label="&calendar.context.progress.label;"
|
||||
accesskey="&calendar.context.progress.accesskey;"
|
||||
id="task-context-menu-progress">
|
||||
|
@ -211,11 +209,11 @@
|
|||
<menupopup>
|
||||
<menuitem label="&calendar.context.converttoevent.label;"
|
||||
accesskey="&calendar.context.converttoevent.accesskey;"
|
||||
id="calendar.context.converttoevent"
|
||||
id="calendar-context-converttoevent"
|
||||
oncommand="tasksToEvents()"/>
|
||||
<menuitem label="&calendar.context.converttomessage.label;"
|
||||
accesskey="&calendar.context.converttomessage.accesskey;"
|
||||
id="calendar.context.converttomessage"
|
||||
id="calendar-context-converttomessage"
|
||||
oncommand="tasksToMail()"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
|
|
@ -118,9 +118,9 @@ function changeContextMenuForTask(aEvent) {
|
|||
if (tasksSelected) {
|
||||
taskTree.contextTask = task = tasks[0];
|
||||
if (isPropertyValueSame(tasks, "isCompleted")) {;
|
||||
setBooleanAttribute(document.getElementById("calendar_iscompleted_command"), "checked", task.isCompleted);
|
||||
setBooleanAttribute(document.getElementById("calendar-context-markcompleted"), "checked", task.isCompleted);
|
||||
} else {
|
||||
document.getElementById("calendar_iscompleted_command").setAttribute("checked", false);
|
||||
document.getElementById("calendar-context-markcompleted").setAttribute("checked", false);
|
||||
}
|
||||
} else {
|
||||
taskTree.contextTask = null;
|
||||
|
@ -244,8 +244,8 @@ function tasksToEvents() {
|
|||
|
||||
function toggleCompleted(aEvent) {
|
||||
if (aEvent.target.getAttribute("checked") == "true") {
|
||||
contextChangeTaskProgress(0);
|
||||
} else {
|
||||
contextChangeTaskProgress(100);
|
||||
} else {
|
||||
contextChangeTaskProgress(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -122,10 +122,12 @@ var taskDetailsView = {
|
|||
"taskDetailsStatusInProgress", [percent]);
|
||||
break;
|
||||
case "COMPLETED":
|
||||
statusDetails.value = calGetString(
|
||||
"calendar",
|
||||
"taskDetailsStatusCompletedOn",
|
||||
[dateFormatter.formatDateTime(item.completedDate)]);
|
||||
if (item.completedDate) {
|
||||
statusDetails.value = calGetString(
|
||||
"calendar",
|
||||
"taskDetailsStatusCompletedOn",
|
||||
[dateFormatter.formatDateTime(item.completedDate)]);
|
||||
}
|
||||
break;
|
||||
case "CANCELLED":
|
||||
statusDetails.value = calGetString(
|
||||
|
|
Загрузка…
Ссылка в новой задаче