From: Jan Schneider Date: Thu, 25 Feb 2010 10:17:28 +0000 (+0100) Subject: Link to DIMP from summary block. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=14bdaccf635993942b6feb48158537f8b9c4f9b0;p=horde.git Link to DIMP from summary block. --- diff --git a/imp/lib/Block/summary.php b/imp/lib/Block/summary.php index 5b886a11e..8d7ee8131 100644 --- a/imp/lib/Block/summary.php +++ b/imp/lib/Block/summary.php @@ -34,7 +34,7 @@ class Horde_Block_imp_summary extends Horde_Block protected function _content() { $imp_ui = new IMP_Ui_Block(); - list($html_out, $newmsgs) = $imp_ui->folderSummary('imp'); + list($html_out, $newmsgs) = $imp_ui->folderSummary($_SESSION['imp']['view']); $html = ''; diff --git a/imp/lib/Ui/Block.php b/imp/lib/Ui/Block.php index 665198871..2ddf975a8 100644 --- a/imp/lib/Ui/Block.php +++ b/imp/lib/Ui/Block.php @@ -36,11 +36,13 @@ class IMP_Ui_Block $status = $GLOBALS['imp_imap']->ob()->statusMultiple($poll, Horde_Imap_Client::STATUS_UNSEEN | Horde_Imap_Client::STATUS_MESSAGES | Horde_Imap_Client::STATUS_RECENT); $anyUnseen = false; - $html = ''; + $html = $onclick = ''; $newmsgs = array(); if ($mode == 'imp') { $mbox_url = Horde::applicationUrl('mailbox.php'); + } else { + $mbox_url = Horde::applicationUrl('') . '#folder'; } foreach ($poll as $folder) { @@ -53,20 +55,21 @@ class IMP_Ui_Block $newmsgs[$folder] = $status[$folder]['recent']; } - if ($mode == 'imp') { - $onclick = 'self.location=\'' . $mbox_url->copy()->add(array('no_newmail_popup' => 1, 'mailbox' => $folder)) . '\''; - } else { - $onclick = 'DimpBase.go(\'folder:' . htmlspecialchars($folder) . '\');return false;'; + if ($mode != 'imp') { + $onclick = ' onclick="try{DimpBase.go(\'folder:' . htmlspecialchars($folder) . '\');}catch(e){window.location=\'' . htmlspecialchars($mbox_url . rawurlencode(':' . $folder)) . '\';}return false;"'; } - $html .= '
'; + $html .= '
'; if (!empty($status[$folder]['unseen'])) { $html .= ''; $anyUnseen = true; } - $html .= (($mode == 'imp') ? Horde::link($mbox_url) : '') . IMP::displayFolder($folder) . ''; + $html .= ($mode == 'imp' + ? Horde::link($mbox_url->add(array('no_newmail_popup' => 1, 'mailbox' => $folder))) + : '') + . IMP::displayFolder($folder) . ''; if (!empty($status[$folder]['unseen'])) { $html .= '';