diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2013-10-30 16:53:22 +0100 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2013-10-30 16:53:22 +0100 |
commit | 8d9dcca2b6fc1117e170195aa4104980e5bfa238 (patch) | |
tree | 34d0b607a4907504567be21d7c99719658b34112 /program/js/app.js | |
parent | 4c02ef0c5c23fc31d5d89ccd012698ea325acc1b (diff) | |
parent | 8f8e263977cc356bf754236ed0182515b26337ca (diff) |
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/js/app.js')
-rw-r--r-- | program/js/app.js | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/program/js/app.js b/program/js/app.js index 81b796ec1..55dea3620 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -2062,12 +2062,14 @@ function rcube_webmail() if (name && (frame = this.get_frame_element(name))) { if (!show && (win = this.get_frame_window(name))) { - if (win.stop) - win.stop(); - else // IE - win.document.execCommand('Stop'); + if (win.location.href.indexOf(this.env.blankpage) < 0) { + if (win.stop) + win.stop(); + else // IE + win.document.execCommand('Stop'); - win.location.href = this.env.blankpage; + win.location.href = this.env.blankpage; + } } else if (!bw.safari && !bw.konq) $(frame)[show ? 'show' : 'hide'](); @@ -3030,9 +3032,12 @@ function rcube_webmail() // test if purge command is allowed this.purge_mailbox_test = function() { - return (this.env.exists && (this.env.mailbox == this.env.trash_mailbox || this.env.mailbox == this.env.junk_mailbox - || this.env.mailbox.match('^' + RegExp.escape(this.env.trash_mailbox) + RegExp.escape(this.env.delimiter)) - || this.env.mailbox.match('^' + RegExp.escape(this.env.junk_mailbox) + RegExp.escape(this.env.delimiter)))); + return (this.env.exists && ( + this.env.mailbox == this.env.trash_mailbox + || this.env.mailbox == this.env.junk_mailbox + || this.env.mailbox.indexOf(this.env.trash_mailbox + this.env.delimiter) == 0 + || this.env.mailbox.indexOf(this.env.junk_mailbox + this.env.delimiter) == 0 + )); }; |