Monotone-Parent: e45b2b02d2644ca45f53476d13a648ca71e4e361

Monotone-Revision: 212e168bc4d90ac245e14acdb1fa02cd21689ca4

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-04-03T14:24:09
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-04-03 14:24:09 +00:00
parent 3ed138ea9a
commit 96a94aab31
7 changed files with 32 additions and 25 deletions

View File

@@ -1,3 +1,10 @@
2007-04-03 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Scheduler/UIxCalTasksListView.m ([UIxCalTasksListView
-shouldDisplayCurrentTask]): the current task is not displayed if
it is NOT completed or if the "showCompletedTasks" flag is set.
The logic was inverted in Lightning and is now in SOGo too.
2007-04-02 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Contacts/UIxContactView.m ([UIxContactView -workUrl]): we

View File

@@ -314,7 +314,7 @@ validate_invalid_enddate = "Incorrect enddate field!";
validate_endbeforestart = "Enddate is before startdate!";
"Tasks" = "Tasks";
"Hide completed tasks" = "Hide completed tasks";
"Show completed tasks" = "Show completed tasks";
/* tabs */
"Task" = "Task";

View File

@@ -315,7 +315,7 @@ validate_invalid_enddate = "La date de fin est invalide !";
validate_endbeforestart = "La date de fin est avant la date de début !";
"Tasks" = "Tâches";
"Hide completed tasks" = "Masquer les tâches accomplies";
"Show completed tasks" = "Afficher les tâches accomplies";
/* tabs */
"Task" = "Tâche";

View File

@@ -32,8 +32,8 @@
NSCalendarDate *startDate;
NSCalendarDate *endDate;
BOOL knowsToHide;
BOOL hideCompleted;
BOOL knowsToShow;
BOOL showCompleted;
NSDictionary *currentTask;
}

View File

@@ -39,8 +39,8 @@
{
startDate = nil;
endDate = nil;
knowsToHide = NO;
hideCompleted = NO;
knowsToShow = NO;
showCompleted = NO;
}
return self;
@@ -105,27 +105,27 @@
- (BOOL) shouldDisplayCurrentTask
{
if (!knowsToHide)
if (!knowsToShow)
{
hideCompleted
= [[self queryParameterForKey: @"hide-completed"] intValue];
knowsToHide = YES;
showCompleted
= [[self queryParameterForKey: @"show-completed"] intValue];
knowsToShow = YES;
}
return !(hideCompleted
&& [[currentTask objectForKey: @"status"] intValue] == 1);
return ([[currentTask objectForKey: @"status"] intValue] != 1
|| showCompleted);
}
- (BOOL) shouldHideCompletedTasks
- (BOOL) shouldShowCompletedTasks
{
if (!knowsToHide)
if (!knowsToShow)
{
hideCompleted
= [[self queryParameterForKey: @"hide-completed"] intValue];
knowsToHide = YES;
showCompleted
= [[self queryParameterForKey: @"show-completed"] intValue];
knowsToShow = YES;
}
return hideCompleted;
return showCompleted;
}
- (BOOL) isCurrentTaskCompleted

View File

@@ -7,10 +7,10 @@
xmlns:label="OGo:label">
<h2><var:string label:value="Tasks" /></h2>
<label><input class="checkBox"
var:checked="shouldHideCompletedTasks"
var:checked="shouldShowCompletedTasks"
type="checkbox"
onclick="return onHideCompletedTasks(this);"
/><var:string label:value="Hide completed tasks"
onclick="return onShowCompletedTasks(this);"
/><var:string label:value="Show completed tasks"
/></label>
<ul id="tasksList" multiselect="yes">
<var:foreach list="fetchCoreTasksInfos" item="currentTask"

View File

@@ -7,7 +7,7 @@ var listFilter = 'view_today';
var listOfSelection = null;
var selectedCalendarCell;
var hideCompletedTasks = 0;
var showCompletedTasks = 0;
var currentDay = '';
var currentView = "dayview";
@@ -632,7 +632,7 @@ function refreshAppointments() {
}
function refreshTasks() {
return _loadTasksHref("taskslist?hide-completed=" + hideCompletedTasks);
return _loadTasksHref("taskslist?show-completed=" + showCompletedTasks);
}
function refreshAppointmentsAndDisplay() {
@@ -817,8 +817,8 @@ function changeMonthCalendarDisplayOfSelectedDay(node) {
node.addClassName("selectedDay");
}
function onHideCompletedTasks(node) {
hideCompletedTasks = (node.checked ? 1 : 0);
function onShowCompletedTasks(node) {
showCompletedTasks = (node.checked ? 1 : 0);
return refreshTasks();
}