Make 'show completed tasks' persistent

pull/9/merge
Francis Lachapelle 2013-01-24 18:50:20 -05:00
parent dfe49ea3b4
commit 9ed53cbab3
4 changed files with 13 additions and 9 deletions

3
NEWS
View File

@ -2,7 +2,7 @@
------------------
New features
- sogo-tool: new "dump-defaults" command to easily create /etc/sogo.conf
- sogo-tool: new "dump-defaults" command to easily create /etc/sogo/sogo.conf
Enhancements
- The sogo user is now a system user.
@ -17,6 +17,7 @@ Enhancements
- added Finnish translation - thanks to Kari Salmu
- updated translations
- recurrence-id of all-day events is now set as a proper date with no time
- 'show completed tasks' is now persistent
Bug fixes
- fixed usage of browser's language for the login page

View File

@ -212,6 +212,15 @@
return (list && [list compare: @"tasksListView"] == NSOrderedSame)? @"active" : @"";
}
- (BOOL) showCompletedTasks
{
BOOL show;
[self _setupContext];
return [[us objectForKey: @"ShowCompletedTasks"] boolValue];
}
- (WOResponse *) saveSelectedListAction
{
WORequest *request;

View File

@ -182,7 +182,7 @@
autocomplete="off" type="text"
menuid="taskSearchMenu" />
</span>
<input id="showHideCompletedTasks" type="checkbox" class="checkBox"/><var:string label:value="Show completed tasks"/>
<input id="showHideCompletedTasks" type="checkbox" class="checkBox" var:checked="showCompletedTasks"/><var:string label:value="Show completed tasks"/>
</div>
<table id="tasksList" cellspacing="0">
<thead>

View File

@ -2198,20 +2198,14 @@ function refreshEvents() {
function refreshTasks(setUserDefault) {
var titleSearch;
var value = search["tasks"]["value"];
var setud;
if (value && value.length)
titleSearch = "&search=" + escape(value.utf8encode());
else
titleSearch = "";
/* TODO: the logic behind this should be reimplemented properly:
the "taskslist" method should save the status when the 'show-completed'
is set to true and revert to the current status when that parameter is
NOT passed via the url. */
setud = "";
if (setUserDefault == 1)
setud = "&setud=1";
titleSearch += "&setud=1";
refreshAlarms();