summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authorsvncommit <devs@roundcube.net>2007-09-27 07:31:40 +0000
committersvncommit <devs@roundcube.net>2007-09-27 07:31:40 +0000
commit41841bc0985959bc938200f3f3f119985be4daa6 (patch)
treeb59eb1f762a10cafd41f0add02dece45a3fc80f6 /program/js
parent69f17cfda10febf0e4b8401b2f1cf371b8f49568 (diff)
When a folder is deleted, delete the children as well.
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 3e1129bf1..b2fccb717 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -2637,11 +2637,17 @@ function rcube_webmail()
// delete a specific mailbox with all its messages
this.delete_folder = function(folder)
{
- if (this.edit_folder)
- this.reset_folder_rename();
+ if (this.edit_folder)
+ this.reset_folder_rename();
if (folder)
+ {
this.http_post('delete-folder', '_mboxes='+urlencode(folder));
+ var folders = new Array(folder);
+ for (var row in this.env.subscriptionrows)
+ if (this.env.subscriptionrows[row][0].match(new RegExp('^'+RegExp.escape(folder+this.env.delimiter))))
+ this.http_post('delete-folder', '_mboxes='+urlencode(this.env.subscriptionrows[row][0]));
+ }
};