summaryrefslogtreecommitdiff
path: root/plugins/tasklist/tasklist.php
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-10-23 15:12:42 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-10-31 11:51:28 (GMT)
commitd0315100ea8bc7e42be9e62957d3b93289311098 (patch)
treea16c913b2f35e1ba9686ff305f9861cb90099fd7 /plugins/tasklist/tasklist.php
parent5c4530245713dab4d7ed38f273dacc31f4699365 (diff)
downloadroundcubemail-plugins-kolab-d0315100ea8bc7e42be9e62957d3b93289311098.tar.gz
Add UI elements to expand/collapse all tasks (#2291)
Diffstat (limited to 'plugins/tasklist/tasklist.php')
-rw-r--r--plugins/tasklist/tasklist.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/plugins/tasklist/tasklist.php b/plugins/tasklist/tasklist.php
index e6b5d1c..68d82c4 100644
--- a/plugins/tasklist/tasklist.php
+++ b/plugins/tasklist/tasklist.php
@@ -248,13 +248,15 @@ class tasklist extends rcube_plugin
break;
case 'collapse':
- if (intval(get_input_value('collapsed', RCUBE_INPUT_GPC))) {
- $this->collapsed_tasks[] = $rec['id'];
- }
- else {
- $i = array_search($rec['id'], $this->collapsed_tasks);
- if ($i !== false)
- unset($this->collapsed_tasks[$i]);
+ foreach (explode(',', $rec['id']) as $rec_id) {
+ if (intval(get_input_value('collapsed', RCUBE_INPUT_GPC))) {
+ $this->collapsed_tasks[] = $rec_id;
+ }
+ else {
+ $i = array_search($rec_id, $this->collapsed_tasks);
+ if ($i !== false)
+ unset($this->collapsed_tasks[$i]);
+ }
}
$this->rc->user->save_prefs(array('tasklist_collapsed_tasks' => join(',', array_unique($this->collapsed_tasks))));