diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-02-02 08:50:57 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-02-02 08:50:57 +0000 |
| commit | 631e23d9be7c5870b015c038149e8dac827bd742 (patch) | |
| tree | 55700ff33105c06262dfdd2654689148f92ab779 /roundcubemail/program | |
| parent | 4f3e3b01f2d495581bc14bbc4bfc2bc54b2befc9 (diff) | |
- Fix folder rename/delete buttons do not appear on creation of first folder (#1486468)
git-svn-id: https://svn.roundcube.net/trunk@3241 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rw-r--r-- | roundcubemail/program/js/app.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index fc24a77d8..747a69f4e 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -3368,10 +3368,13 @@ function rcube_webmail() if (!this.gui_objects.subscriptionlist) return false; - // find not protected folder - for (var refid in this.env.subscriptionrows) - if (this.env.subscriptionrows[refid]!=null && !this.env.subscriptionrows[refid][2]) + // find not protected folder + var refid; + for (var rid in this.env.subscriptionrows) + if (this.env.subscriptionrows[rid]!=null && !this.env.subscriptionrows[rid][2]) { + refid = rid; break; + } var refrow, form; var tbody = this.gui_objects.subscriptionlist.tBodies[0]; @@ -3384,10 +3387,11 @@ function rcube_webmail() refid = replace.id; } - if (!id || !(refrow = document.getElementById(refid))) + if (!id || !refid || !(refrow = document.getElementById(refid))) { // Refresh page if we don't have a table row to clone this.goto_url('folders'); + return false; } else { @@ -3413,7 +3417,7 @@ function rcube_webmail() // set messages count to zero if (!replace) row.cells[1].innerHTML = '*'; - + if (!replace && row.cells[2] && row.cells[2].firstChild.tagName.toLowerCase()=='input') { row.cells[2].firstChild.value = name; @@ -4175,7 +4179,7 @@ function rcube_webmail() if (this.env.framed && window.parent) parent.location.href = url; - else + else location.href = url; }; |
