Allow auto forward/reply notice box to be closed
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 10 Mar 2010 06:08:51 +0000 (23:08 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 10 Mar 2010 06:08:51 +0000 (23:08 -0700)
imp/js/compose-dimp.js
imp/templates/chunks/compose.php
imp/themes/dimp/screen.css

index ad4a153..6b35b6d 100644 (file)
@@ -668,7 +668,8 @@ var DimpCompose = {
             return;
         }
 
-        var elt = orig = e.element(),
+        var elt = e.element(),
+            orig = elt,
             atc_num, id;
 
         while (Object.isElement(elt)) {
@@ -733,12 +734,14 @@ var DimpCompose = {
                     }.bind(this),
                     duration: 0.4
                 });
-                if (id.startsWith('reply')) {
-                    $('to_loading_img').show();
-                    DimpCore.doAction('getReplyData', { headeronly: 1, imp_compose: $F('composeCache'), type: 'reply' }, { callback: this.swapToAddressCallback.bind(this) });
-                } else {
-                    DimpCore.doAction('GetForwardData', { dataonly: 1, imp_compose: $F('composeCache'), type: (id == 'fwdattachnotice' ? 'forward_body' : 'forward_attach') }, { callback: this.forwardAddCallback.bind(this) });
-                    $('composeMessage').stopObserving('keydown');
+                if (!orig.match('SPAN.closeImg')) {
+                    if (id.startsWith('reply')) {
+                        $('to_loading_img').show();
+                        DimpCore.doAction('getReplyData', { headeronly: 1, imp_compose: $F('composeCache'), type: 'reply' }, { callback: this.swapToAddressCallback.bind(this) });
+                    } else {
+                        DimpCore.doAction('GetForwardData', { dataonly: 1, imp_compose: $F('composeCache'), type: (id == 'fwdattachnotice' ? 'forward_body' : 'forward_attach') }, { callback: this.forwardAddCallback.bind(this) });
+                        $('composeMessage').stopObserving('keydown');
+                    }
                 }
                 e.stop();
                 return;
index f8fe205..32ec64c 100644 (file)
@@ -125,10 +125,10 @@ $compose_disable = !IMP::canCompose();
    <tr id="noticerow" style="display:none">
     <td colspan="2">
      <ul class="notices">
-      <li id="replyallnotice" style="display:none"><?php echo _("You are currently replying to ALL recipients. Click here to reply to the original sender instead.") ?></li>
-      <li id="replylistnotice" style="display:none"><?php echo _("You are currently replying to the mailing list. Click here to reply to the original sender instead.") ?></li>
-      <li id="fwdattachnotice" style="display:none"><?php echo _("Click here to add the original message text to the body.") ?></li>
-      <li id="fwdbodynotice" style="display:none"><?php echo _("Click here to add the original message as an attachment.") ?></li>
+      <li id="replyallnotice" style="display:none"><span class="iconImg closeImg"></span><?php echo _("You are currently replying to ALL recipients. Click here to reply to the original sender instead.") ?></li>
+      <li id="replylistnotice" style="display:none"><span class="iconImg closeImg"></span><?php echo _("You are currently replying to the mailing list. Click here to reply to the original sender instead.") ?></li>
+      <li id="fwdattachnotice" style="display:none"><span class="iconImg closeImg"></span><?php echo _("Click here to add the original message text to the body.") ?></li>
+      <li id="fwdbodynotice" style="display:none"><span class="iconImg closeImg"></span><?php echo _("Click here to add the original message as an attachment.") ?></li>
      </ul>
     </td>
    </tr>
index 023a8f4..b99734d 100644 (file)
@@ -624,6 +624,11 @@ div.dimpActionsCompose, div.dimpActionsMsg {
 .msgwrite .dimpOptions label, #replyallnotice, #replylistnotice {
     cursor: pointer;
 }
+#noticerow li span.closeImg {
+    float: right;
+    margin: -1px 0 0;
+    padding-left: 3px;
+}
 .msgwrite tr {
     vertical-align: top;
 }