Make 'show completed tasks' persistent

This commit is contained in:
Francis Lachapelle committed 2013-01-24 18:50:20 -05:00
1 parent dfe49ea3b4
commit 9ed53cbab3
4 files changed
+13 -9

No files matched your search

+9
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;
+1 -1
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>
+1 -7
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();