summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php5
-rw-r--r--plugins/tasklist/tasklist.js3
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php b/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
index 662311c..e60719c 100644
--- a/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
+++ b/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
@@ -71,10 +71,12 @@ class tasklist_kolab_driver extends tasklist_driver
$folders = kolab_storage::sort_folders(kolab_storage::get_folders('task'));
$this->lists = $this->folders = array();
+ $delim = $this->rc->get_storage()->get_hierarchy_delimiter();
+
// find default folder
$default_index = 0;
foreach ($folders as $i => $folder) {
- if ($folder->default)
+ if ($folder->default && strpos($folder->name, $delim) === false)
$default_index = $i;
}
@@ -85,7 +87,6 @@ class tasklist_kolab_driver extends tasklist_driver
array_unshift($folders, $default_folder);
}
- $delim = $this->rc->get_storage()->get_hierarchy_delimiter();
$prefs = $this->rc->config->get('kolab_tasklists', array());
foreach ($folders as $folder) {
diff --git a/plugins/tasklist/tasklist.js b/plugins/tasklist/tasklist.js
index 7c3d3a7..5e0dc8e 100644
--- a/plugins/tasklist/tasklist.js
+++ b/plugins/tasklist/tasklist.js
@@ -135,9 +135,8 @@ function rcube_tasklist_ui(settings)
{
// initialize task list selectors
for (var id in me.tasklists) {
- if (me.tasklists[id].editable && (!me.selected_list || (me.tasklists[id].active && !me.tasklists[me.selected_list].active))) {
+ if (me.tasklists[id].editable && (!me.selected_list || me.tasklists[id].default || (me.tasklists[id].active && !me.tasklists[me.selected_list].active))) {
me.selected_list = id;
- break;
}
}