Fix Rename/Create Subfolder.
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 7 Apr 2009 04:18:25 +0000 (22:18 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 7 Apr 2009 04:41:49 +0000 (22:41 -0600)
imp/js/src/DimpBase.js

index 66fcd99..b882c57 100644 (file)
@@ -1768,6 +1768,7 @@ var DimpBase = {
         if (val) {
             switch (mode) {
             case 'rename':
+                folder = folder.up('LI');
                 if (folder.readAttribute('l') != val) {
                     action = 'RenameFolder';
                     params = { old_name: folder.readAttribute('mbox'),
@@ -1781,10 +1782,11 @@ var DimpBase = {
                 action = 'CreateFolder';
                 params = { view: val };
                 if (mode == 'createsub') {
-                    params.parent = folder.readAttribute('mbox');
+                    params.parent = folder.up('LI').readAttribute('mbox');
                 }
                 break;
             }
+
             if (action) {
                 DimpCore.doAction(action, params, null, this.bcache.get('folderC') || this.bcache.set('folderC', this._folderCallback.bind(this)));
             }