diff options
author | alecpl <alec@alec.pl> | 2010-05-22 18:24:33 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2010-05-22 18:24:33 +0000 |
commit | 87a8685fbfdff814c5e72b121644b3e0dae59340 (patch) | |
tree | f6cd414af47e72111c3665b8a78432e22c2a46ae /program | |
parent | 0b7f3a8ab26f992ebd83e8b9ab1deabab6d51957 (diff) |
- Fix wrong message on file upload error (#1486725)
Diffstat (limited to 'program')
-rw-r--r-- | program/js/app.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/program/js/app.js b/program/js/app.js index 991ba0385..dac6e6f4a 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -3103,20 +3103,20 @@ function rcube_webmail() } // handle upload errors, parsing iframe content in onload - var fr = document.getElementsByName(frame_name)[0]; - $(fr).bind('load', {ts:ts}, function(e) { - var content = ''; + $(frame_name).bind('load', {ts:ts}, function(e) { + var d, content = ''; try { if (this.contentDocument) { - var d = this.contentDocument; + d = this.contentDocument; } else if (this.contentWindow) { - var d = this.contentWindow.document; + d = this.contentWindow.document; } content = d.childNodes[0].innerHTML; } catch (e) {} - if (!String(content).match(/add2attachment/) && (!bw.opera || (rcmail.env.uploadframe && rcmail.env.uploadframe == e.data.ts))) { - rcmail.display_message(rcmail.get_label('fileuploaderror'), 'error'); + if (!content.match(/add2attachment/) && (!bw.opera || (rcmail.env.uploadframe && rcmail.env.uploadframe == e.data.ts))) { + if (!content.match(/display_message/)) + rcmail.display_message(rcmail.get_label('fileuploaderror'), 'error'); rcmail.remove_from_attachment_list(e.data.ts); } // Opera hack: handle double onload |