From 4591de7018414267311b421ef42ef1b4a2f6aa89 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Thu, 10 Mar 2011 15:21:21 -0500
Subject: [PATCH] Prepare for multiple concurrent compose windows

---
 program/js/app.js |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/program/js/app.js b/program/js/app.js
index a155653..fdd9d9c 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -227,7 +227,7 @@
           }
         }
         else if (this.env.action == 'compose') {
-          this.env.compose_commands = ['send-attachment', 'remove-attachment', 'send', 'toggle-editor'];
+          this.env.compose_commands = ['send-attachment', 'remove-attachment', 'send', 'cancel', 'toggle-editor'];
 
           if (this.env.drafts_mailbox)
             this.env.compose_commands.push('savedraft')
@@ -3270,7 +3270,7 @@
   this.remove_attachment = function(name)
   {
     if (name && this.env.attachments[name])
-      this.http_post('remove-attachment', '_file='+urlencode(name));
+      this.http_post('remove-attachment', { _id:this.env.compose_id, _file:name });
 
     return true;
   };
@@ -5408,7 +5408,7 @@
     $(frame_name).bind('load', {ts:ts}, onload);
 
     form.target = frame_name;
-    form.action = this.url(action, { _uploadid:ts });
+    form.action = this.url(action, { _id:this.env.compose_id||'', _uploadid:ts });
     form.setAttribute('enctype', 'multipart/form-data');
     form.submit();
 

--
Gitblit v1.9.1