From cd900dd71f56698b2c8ffedeb1af342e79faf0db Mon Sep 17 00:00:00 2001 From: thomascube Date: Sun, 16 Oct 2005 19:14:00 +0000 Subject: Improved folder display; added Portuguese and Catalan translation --- program/steps/mail/func.inc | 77 +++++++++++---------------------------------- program/steps/mail/list.inc | 4 ++- 2 files changed, 22 insertions(+), 59 deletions(-) (limited to 'program/steps/mail') diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index e3437db4f..7120d07ca 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -99,63 +99,14 @@ function rcmail_mailbox_list($attrib) // var_dump($a_mailboxes); if ($type=='select') - $out .= rcmail_render_folder_tree_select($a_mailboxes, $special_mailboxes, $mbox); + $out .= rcmail_render_folder_tree_select($a_mailboxes, $special_mailboxes, $mbox, $attrib['maxlength']); else - $out .= rcmail_render_folder_tree_html($a_mailboxes, $special_mailboxes, $mbox); + $out .= rcmail_render_folder_tree_html($a_mailboxes, $special_mailboxes, $mbox, $attrib['maxlength']); -/* - foreach ($a_folders as $i => $folder) - { - $zebra_class = $i%2 ? 'even' : 'odd'; - $folder_prop = $a_subfolders[$folder]; - $foldername = isset($folder_prop) ? $folder_prop['name'] : $folder; - - $folder_lc = strtolower($foldername); - if (in_array($folder_lc, $special_mailboxes)) - $foldername = rcube_label($folder_lc); - - if ($unread_count = $IMAP->messagecount($folder, 'UNSEEN')) - $foldername .= sprintf(' (%d)', $unread_count); - - $indent = isset($folder_prop) ? sprintf(' indent%d', $folder_prop['level']) : ''; - $indent_str = isset($folder_prop) ? str_repeat('  ', (int)$folder_prop['level']) : ''; - - // compose mailbox line - if ($type=='select') - $out .= sprintf(''."\n", - $folder, - $indent_str, - rep_specialchars_output($foldername)); - - else - $out .= sprintf('
  • %s
  • '."\n", - preg_replace('/[^a-z0-9\-_]/', '', strtolower($folder)), - $zebra_class, - $unread_count ? ' unread' : '', - $folder==$mbox ? ' selected' : '', - $indent, - $folder, - $JS_OBJECT_NAME, - $folder, - $JS_OBJECT_NAME, - $folder, - rep_specialchars_output($foldername)); - } -*/ - if ($type=='ul') $OUTPUT->add_script(sprintf("%s.gui_object('mailboxlist', '%s');", $JS_OBJECT_NAME, $attrib['id'])); - -/* this is added further up - if (!$s_added_script) - { - $javascript .= sprintf("%s.set_env('mailbox', '%s');", $JS_OBJECT_NAME, $mbox); - $OUTPUT->add_script($javascript); - $s_added_script = TRUE; - } -*/ return $out . ""; } @@ -192,7 +143,7 @@ function rcmail_build_folder_tree(&$arrFolders, $folder, $delm='/', $path='') // return html for a structured list