summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-04-18 11:26:07 +0200
committerAleksander Machniak <alec@alec.pl>2014-04-18 11:27:03 +0200
commite1e65c49803e5236a7b6e9527b90e5a894b02281 (patch)
treee5635baa3b1fe891f886138cedfe3bdf2df026d2 /program/js/app.js
parent701d7a369b36813fd0673e0f4e373df6951e1c78 (diff)
Fix redundant alert message on over-size uploads (#1489817)
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 49a74d2cb..a72f49e53 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1054,8 +1054,9 @@ function rcube_webmail()
// Reset the auto-save timer
clearTimeout(this.save_timer);
- if (!this.upload_file(props || this.gui_objects.uploadform, 'upload')) {
- alert(this.get_label('selectimportfile'));
+ if (!(flag = this.upload_file(props || this.gui_objects.uploadform, 'upload'))) {
+ if (flag !== false)
+ alert(this.get_label('selectimportfile'));
aborted = true;
}
break;
@@ -1179,12 +1180,15 @@ function rcube_webmail()
break;
case 'import-messages':
- var form = props || this.gui_objects.importform;
- var importlock = this.set_busy(true, 'importwait');
+ var form = props || this.gui_objects.importform,
+ importlock = this.set_busy(true, 'importwait');
+
$('input[name="_unlock"]', form).val(importlock);
- if (!this.upload_file(form, 'import')) {
+
+ if (!(flag = this.upload_file(form, 'import'))) {
this.set_busy(false, null, importlock);
- alert(this.get_label('selectimportfile'));
+ if (flag !== false)
+ alert(this.get_label('selectimportfile'));
aborted = true;
}
break;
@@ -3973,7 +3977,7 @@ function rcube_webmail()
this.upload_file = function(form, action)
{
if (!form)
- return false;
+ return;
// count files and size on capable browser
var size = 0, numfiles = 0;
@@ -4033,8 +4037,6 @@ function rcube_webmail()
this.gui_objects.attachmentform = form;
return true;
}
-
- return false;
};
// add file name to attachment list