Remove priority icon from preview pane.
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 9 Jun 2009 23:54:33 +0000 (17:54 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 10 Jun 2009 03:33:38 +0000 (21:33 -0600)
The priority of the message can be determined from the message list
entry above so it is redundant information.

imp/js/src/DimpBase.js
imp/lib/Views/ShowMessage.php

index 656b6de..0406997 100644 (file)
@@ -962,19 +962,9 @@ var DimpBase = {
         DIMP.conf.msg_index = r.index;
         DIMP.conf.msg_folder = r.folder;
 
-        // Add subject/priority
+        // Add subject
         tmp = pm.select('.subject');
         tmp.invoke('update', r.subject === null ? '[' + DIMP.text.badsubject + ']' : r.subject);
-        switch (r.priority) {
-        case 'high':
-        case 'low':
-            // Can't use invoke() here - new Element must be created for
-            // each object.
-            tmp.each(function(t) {
-                t.insert({ top: new Element('DIV', { className: 'msgflags flag' + r.priority.capitalize() + 'priority' }) });
-            });
-            break;
-        }
 
         // Add date
         $('msgHeadersColl').select('.date').invoke('update', r.minidate);
index 34cdd9c..67ce70b 100644 (file)
@@ -70,7 +70,6 @@ class IMP_Views_ShowMessage
      * 'folder' - The IMAP folder
      * 'index' - The IMAP UID
      * 'msgtext' - The text of the message
-     * 'priority' - The X-Priority of the message ('low', 'high', 'normal')
      * 'to' - The To addresses
      *
      * FOR PREVIEW MODE:
@@ -83,6 +82,7 @@ class IMP_Views_ShowMessage
      * 'bcc' - The Bcc addresses
      * 'headers' - An array of headers (not including basic headers)
      * 'list_info' - List information.
+     * 'priority' - The X-Priority of the message ('low', 'high', 'normal')
      * 'replyTo' - The Reply-to addresses
      * </pre>
      */
@@ -219,7 +219,9 @@ class IMP_Views_ShowMessage
             : htmlspecialchars(_("[No Subject]"));
 
         /* Get X-Priority. */
-        $result['priority'] = $imp_ui->getXpriority($mime_headers->getValue('x-priority'));
+        if (!$preview) {
+            $result['priority'] = $imp_ui->getXpriority($mime_headers->getValue('x-priority'));
+        }
 
         // Create message text and attachment list.
         $parts_list = $imp_contents->getContentTypeMap();