Fixed Mantis102: Apache2 deb issue and Mantis90: Remember if we show completed tasks

Monotone-Parent: f49ae822ce1ffd032a2522ecf1d1c4fd425678b1
Monotone-Revision: 27c3e7606471d513ab1014e7afa4c56071c0245e

Monotone-Author: crobert@inverse.ca
Monotone-Date: 2009-08-17T20:07:54
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
C Robert
2009-08-17 20:07:54 +00:00
parent 5915f09471
commit 6524ffc078
6 changed files with 75 additions and 6 deletions

View File

@@ -7,7 +7,7 @@ var listFilter = 'view_today';
var listOfSelection = null;
var selectedCalendarCell;
var showCompletedTasks = 0;
var showCompletedTasks;;
var currentDay = '';
@@ -1354,9 +1354,12 @@ function refreshEvents() {
+ "&filterpopup=" + listFilter);
}
function refreshTasks() {
function refreshTasks(setUserDefault) {
var url = "taskslist?show-completed=" + showCompletedTasks;
if (setUserDefault == 1)
url += "&setud=1";
refreshAlarms();
return _loadTasksHref("taskslist?show-completed=" + showCompletedTasks);
return _loadTasksHref(url);
}
function refreshEventsAndDisplay() {
@@ -1560,7 +1563,7 @@ function changeMonthCalendarDisplayOfSelectedDay(node) {
function onShowCompletedTasks(event) {
showCompletedTasks = (this.checked ? 1 : 0);
return refreshTasks();
return refreshTasks(1);
}
function updateTaskStatus(event) {
@@ -2039,6 +2042,8 @@ function configureLists() {
var input = $("showHideCompletedTasks");
input.observe("click", onShowCompletedTasks);
if (showCompletedTasks)
input.checked = true;
list = $("eventsList");
list.multiselect = true;
@@ -2123,6 +2128,7 @@ function drawNowLine () {
function initCalendars() {
sorting["attribute"] = "start";
sorting["ascending"] = true;
showCompletedTasks = UserDefaults['ShowCompletedTasks'];
if (!$(document.body).hasClassName("popup")) {
var node = $("filterpopup");