From 93be5b7606ed7a85323732b074ce380ac06875b7 Mon Sep 17 00:00:00 2001 From: svncommit Date: Thu, 26 Jul 2007 12:13:34 +0000 Subject: Move folder rendering functions so they can be used in the settings section. --- program/include/main.inc | 216 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 216 insertions(+) (limited to 'program/include') diff --git a/program/include/main.inc b/program/include/main.inc index 53d4d8560..e46cb5385 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -1658,4 +1658,220 @@ function rcube_print_time($timer, $label='Timer') console(sprintf("%s: %0.4f sec", $label, $diff)); } + +// return the mailboxlist in HTML +function rcmail_mailbox_list($attrib) + { + global $IMAP, $CONFIG, $OUTPUT, $COMM_PATH; + static $s_added_script = FALSE; + static $a_mailboxes; + + // add some labels to client + rcube_add_label('purgefolderconfirm'); + rcube_add_label('deletemessagesconfirm'); + +// $mboxlist_start = rcube_timer(); + + $type = $attrib['type'] ? $attrib['type'] : 'ul'; + $add_attrib = $type=='select' ? array('style', 'class', 'id', 'name', 'onchange') : + array('style', 'class', 'id'); + + if ($type=='ul' && !$attrib['id']) + $attrib['id'] = 'rcmboxlist'; + + // allow the following attributes to be added to the