From: Michael M Slusarz Date: Wed, 24 Feb 2010 06:54:02 +0000 (-0700) Subject: Fixes/tweaks to IMP Mailbox UI X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=b91bb3fbaedd085555a9628060f2f3a13df4537f;p=horde.git Fixes/tweaks to IMP Mailbox UI Remove arrival # (message sequence number) Arrival sort now selected via Date column Fix some CSS formatting. --- diff --git a/imp/lib/Mailbox.php b/imp/lib/Mailbox.php index 9ad758b91..52682f6aa 100644 --- a/imp/lib/Mailbox.php +++ b/imp/lib/Mailbox.php @@ -185,7 +185,6 @@ class IMP_Mailbox * 'preview' - (string) If requested in $options['preview'], * the preview text. * 'previewcut'- (boolean) Has the preview text been cut? - * 'seq' - (integer) The sequence number of the message. * 'size' - (integer) The size of the message in bytes. * 'structure'- (array) The structure of the message. Only * set if $options['structure'] is true. See @@ -220,7 +219,6 @@ class IMP_Mailbox Horde_Imap_Client::FETCH_FLAGS => true, Horde_Imap_Client::FETCH_SIZE => true, Horde_Imap_Client::FETCH_UID => true, - Horde_Imap_Client::FETCH_SEQ => true ); if (!empty($options['headers'])) { diff --git a/imp/mailbox.php b/imp/mailbox.php index e238792a1..7b292f82a 100644 --- a/imp/mailbox.php +++ b/imp/mailbox.php @@ -573,13 +573,13 @@ if ($pageOb['msgcount']) { $headers = array( Horde_Imap_Client::SORT_ARRIVAL => array( 'stext' => _("Sort by Arrival"), - 'text' => _("#"), - 'width' => '4%' + 'text' => _("Arrival"), + 'width' => '14%' ), Horde_Imap_Client::SORT_DATE => array( 'stext' => _("Sort by Date"), 'text' => _("Dat_e"), - 'width' => '10%' + 'width' => '14%' ), Horde_Imap_Client::SORT_TO => array( 'stext' => _("Sort by To Address"), @@ -616,17 +616,29 @@ if ($pageOb['msgcount']) { unset($headers[Horde_Imap_Client::SORT_TO]); } + /* Determine which of Date/Arrival to emphasize. */ + if ($sortpref['by'] == Horde_Imap_Client::SORT_ARRIVAL) { + $extra = Horde_Imap_Client::SORT_DATE; + $standard = Horde_Imap_Client::SORT_ARRIVAL; + } else { + $extra = Horde_Imap_Client::SORT_ARRIVAL; + $standard = Horde_Imap_Client::SORT_DATE; + } + $headers[$standard]['extra'] = '[' . Horde::widget($mailbox_imp_url->copy()->add(array('sortby' => $extra, 'actionID' => 'change_sort', 'mailbox_token' => $mailbox_token)), $headers[$extra]['stext'], 'widget', null, null, $headers[$extra]['text']) . ']'; + unset($headers[$extra]); + /* Determine which of Subject/Thread to emphasize. */ if (!IMP::threadSortAvailable($imp_mbox['mailbox'])) { unset($headers[Horde_Imap_Client::SORT_THREAD]); } else { - $extra = Horde_Imap_Client::SORT_THREAD; - $standard = Horde_Imap_Client::SORT_SUBJECT; if ($sortpref['by'] == Horde_Imap_Client::SORT_THREAD) { $extra = Horde_Imap_Client::SORT_SUBJECT; $standard = Horde_Imap_Client::SORT_THREAD; + } else { + $extra = Horde_Imap_Client::SORT_THREAD; + $standard = Horde_Imap_Client::SORT_SUBJECT; } - $headers[$standard]['extra'] = ' [' . Horde::widget($mailbox_imp_url->copy()->add(array('sortby' => $extra, 'actionID' => 'change_sort', 'mailbox_token' => $mailbox_token)), $headers[$extra]['stext'], 'widget', null, 'if (window.event) window.event.cancelBubble = true; else if (event) event.stopPropagation();', $headers[$extra]['text']) . ']'; + $headers[$standard]['extra'] = '[' . Horde::widget($mailbox_imp_url->copy()->add(array('sortby' => $extra, 'actionID' => 'change_sort', 'mailbox_token' => $mailbox_token)), $headers[$extra]['stext'], 'widget', null, null, $headers[$extra]['text']) . ']'; unset($headers[$extra]); } @@ -706,7 +718,6 @@ while (list(,$ob) = each($mbox_info['overview'])) { 'bg' => '', 'class' => '', 'date' => htmlspecialchars($imp_ui->getDate($ob['envelope']['date'])), - 'number' => $ob['seq'], 'preview' => '', 'status' => '', 'size' => htmlspecialchars($imp_ui->getSize($ob['size'])), diff --git a/imp/templates/mailbox/mailbox.html b/imp/templates/mailbox/mailbox.html index 39eb619ec..01097049a 100644 --- a/imp/templates/mailbox/mailbox.html +++ b/imp/templates/mailbox/mailbox.html @@ -3,9 +3,6 @@ - - -     diff --git a/imp/themes/screen.css b/imp/themes/screen.css index 9e8868696..c3bb515db 100644 --- a/imp/themes/screen.css +++ b/imp/themes/screen.css @@ -24,7 +24,7 @@ text-align: left; white-space: nowrap; } -.messageList th .subjectToggle { +.messageList th .toggleSort { font-size: 90%; } .messageList td {