Add message source entry to contextmenu if preview is closed
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 18 Dec 2009 23:12:46 +0000 (16:12 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 18 Dec 2009 23:37:46 +0000 (16:37 -0700)
imp/js/DimpBase.js
imp/templates/index/index-dimp.inc
imp/themes/screen-dimp.css
imp/themes/silver/screen-dimp.css

index 5c50266..5b3da7b 100644 (file)
@@ -774,6 +774,12 @@ var DimpBase = {
             this.composeMailbox('forward');
             break;
 
+        case 'ctx_message_source':
+            this.viewport.getSelected().get('dataob').each(function(v) {
+                DimpCore.popupWindow(DimpCore.addURLParam(DIMP.conf.URI_VIEW, { uid: v.imapuid, mailbox: v.view, actionID: 'view_source', id: 0 }, true), v.imapuid + '|' + v.view);
+            }, this);
+            break;
+
         case 'ctx_draft_resume':
             this.composeMailbox('resume');
             break;
@@ -941,6 +947,10 @@ var DimpBase = {
             $(ctx_id + '_' + DIMP.conf.qsearchfield).addClassName('contextSelected');
             break;
 
+        case 'ctx_message':
+            [ $('ctx_message_source').up() ].invoke(DIMP.conf.preview_pref ? 'hide' : 'show');
+            break;
+
         default:
             parentfunc(e);
             break;
index 4e6db81..ecacc71 100644 (file)
@@ -389,6 +389,10 @@ function _simpleButton($id, $text, $image)
 <?php if (!$usetrash): ?>
  <a id="ctx_message_undeleted"><span class="contextImg"></span><?php echo _("Undelete") ?></a>
 <?php endif; ?>
+ <div style="display:none">
+  <div class="sep"></div>
+  <a id="ctx_message_source"><span class="contextImg"></span><?php echo _("View Source") ?></a>
+ </div>
 </div>
 
 <div class="context" id="ctx_draft" style="display:none">
index df8ec67..e170818 100644 (file)
@@ -944,6 +944,9 @@ span.dimpactionDrafts {
 #ctx_message_unsetflag span.contextImg, #ctx_draft_unsetflag span.contextImg, #oa_unsetflag span.contextImg {
     background-image: url("graphics/mail_clearflag.png");
 }
+#ctx_message_source span.contextImg, #msg_view_source span.iconImg {
+    background-image: url("graphics/message_source.png");
+}
 #ctx_draft_resume span.contextImg {
     background-image: url("graphics/mail_draft.png");
 }
@@ -1034,9 +1037,6 @@ div.msgSubject span.treeImg {
     cursor: pointer;
     margin-right: 0;
 }
-#msg_view_source span.iconImg {
-    background-image: url("graphics/message_source.png");
-}
 
 span.popdownImg, span.spellcheckPopdownImg {
     background-image: url("graphics/popdown.png");
index 45bc706..9bb73ae 100644 (file)
@@ -140,6 +140,9 @@ span.dimpactionDrafts {
 #ctx_message_whitelist span.contextImg, #oa_whitelist span.contextImg {
     background-image: url("graphics/whitelist.png");
 }
+#ctx_message_source span.contextImg, #msg_view_source span.iconImg {
+    background-image: url("graphics/message_source.png");
+}
 #ctx_contacts_new span.contextImg {
     background-image: url("graphics/compose.png");
 }
@@ -168,9 +171,6 @@ span.dimpactionDrafts {
 #th_collapse span.iconImg, #partlist_exp, #msgloglist_exp {
     background-image: url("graphics/arrow_expanded.png");
 }
-#msg_view_source span.iconImg {
-    background-image: url("graphics/message_source.png");
-}
 
 span.popdownImg, span.spellcheckPopdownImg {
     background-image: url("graphics/popdown.png");