summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authorsvncommit <devs@roundcube.net>2007-09-27 07:40:30 +0000
committersvncommit <devs@roundcube.net>2007-09-27 07:40:30 +0000
commit65fb1a5771d4ac0226ed51fff44f2762848c1e11 (patch)
tree590175cd9c63c8a9475a084c647765cec959822c /program/js/app.js
parent120855f6df2ddecb34cd1ed287117deec524d5fb (diff)
When a folder is renamed, rename the children as well.
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 2d569f860..5b30d0914 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -2559,7 +2559,16 @@ function rcube_webmail()
}
if (oldname && newname)
+ {
this.http_post('rename-folder', '_folder_oldname='+urlencode(oldname)+'&_folder_newname='+urlencode(newname));
+ for (var row in this.env.subscriptionrows)
+ if (this.env.subscriptionrows[row][0].match(new RegExp('^'+RegExp.escape(oldname+this.env.delimiter))))
+ {
+ var subnewname = this.env.subscriptionrows[row][0].replace(new RegExp('^'+RegExp.escape(oldname+this.env.delimiter)), newname+this.env.delimiter);
+ this.http_post('rename-folder', '_folder_oldname='+urlencode(this.env.subscriptionrows[row][0])+
+ '&_folder_newname='+urlencode(subnewname));
+ }
+ }
};