summaryrefslogtreecommitdiff
path: root/program/include/rcmail.php
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2013-01-31 13:49:35 +0100
committerThomas Bruederli <thomas@roundcube.net>2013-01-31 13:49:35 +0100
commit3c309af0663f1673f921682c6ae3f673426e1397 (patch)
treec7f576fecd73e50cbdaa56548936f4eda97ded5a /program/include/rcmail.php
parentb7ea947844b97fe4cb0e2bd37b84d79fff8014f4 (diff)
- Refactored the hierarchical mailboxlist control into a separate widget class
- Build address book directories list as hierarchical list - Make address book groups collapsible using the new new treelist widget - Use encoded identifiers for address book directory list items
Diffstat (limited to 'program/include/rcmail.php')
-rw-r--r--program/include/rcmail.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 5f2a2177b..70dba4192 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -1406,6 +1406,7 @@ class rcmail extends rcube
$js_mailboxlist = array();
$out = html::tag('ul', $attrib, $rcmail->render_folder_tree_html($a_mailboxes, $mbox_name, $js_mailboxlist, $attrib), html::$common_attrib);
+ $rcmail->output->include_script('treelist.js');
$rcmail->output->add_gui_object('mailboxlist', $attrib['id']);
$rcmail->output->set_env('mailboxes', $js_mailboxlist);
$rcmail->output->set_env('unreadwrap', $attrib['unreadwrap']);
@@ -1584,14 +1585,13 @@ class rcmail extends rcube
'id' => "rcmli".$folder_id,
'class' => join(' ', $classes),
'noclose' => true),
- html::a($link_attrib, $html_name) .
- (!empty($folder['folders']) ? html::div(array(
- 'class' => ($is_collapsed ? 'collapsed' : 'expanded'),
- 'style' => "position:absolute",
- 'onclick' => sprintf("%s.command('collapse-folder', '%s')", rcmail_output::JS_OBJECT_NAME, $js_name)
- ), '&nbsp;') : ''));
-
- $jslist[$folder_id] = array(
+ html::a($link_attrib, $html_name));
+
+ if (!empty($folder['folders'])) {
+ $out .= html::div('treetoggle ' . ($is_collapsed ? 'collapsed' : 'expanded'), '&nbsp;');
+ }
+
+ $jslist[$folder['id']] = array(
'id' => $folder['id'],
'name' => $foldername,
'virtual' => $folder['virtual']