Fix redundant alert message on over-size uploads (#1489817)

pull/171/merge
Aleksander Machniak 10 years ago
parent 5515dbb970
commit fb162e7445

@ -19,6 +19,7 @@ CHANGELOG Roundcube Webmail
- Fix lack of translation of special folders in some configurations (#1489799) - Fix lack of translation of special folders in some configurations (#1489799)
- Fix XSS issue in plain text spellchecker (#1489806) - Fix XSS issue in plain text spellchecker (#1489806)
- Fix invalid page title for some folders (1489804) - Fix invalid page title for some folders (1489804)
- Fix redundant alert message on over-size uploads (#1489817)
RELEASE 1.0.0 RELEASE 1.0.0
------------- -------------

@ -1074,8 +1074,9 @@ function rcube_webmail()
// Reset the auto-save timer // Reset the auto-save timer
clearTimeout(this.save_timer); clearTimeout(this.save_timer);
if (!this.upload_file(props || this.gui_objects.uploadform, 'upload')) { if (!(flag = this.upload_file(props || this.gui_objects.uploadform, 'upload'))) {
alert(this.get_label('selectimportfile')); if (flag !== false)
alert(this.get_label('selectimportfile'));
aborted = true; aborted = true;
} }
break; break;
@ -1200,12 +1201,15 @@ function rcube_webmail()
break; break;
case 'import-messages': case 'import-messages':
var form = props || this.gui_objects.importform; var form = props || this.gui_objects.importform,
var importlock = this.set_busy(true, 'importwait'); importlock = this.set_busy(true, 'importwait');
$('input[name="_unlock"]', form).val(importlock); $('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); this.set_busy(false, null, importlock);
alert(this.get_label('selectimportfile')); if (flag !== false)
alert(this.get_label('selectimportfile'));
aborted = true; aborted = true;
} }
break; break;
@ -4016,7 +4020,7 @@ function rcube_webmail()
this.upload_file = function(form, action) this.upload_file = function(form, action)
{ {
if (!form) if (!form)
return false; return;
// count files and size on capable browser // count files and size on capable browser
var size = 0, numfiles = 0; var size = 0, numfiles = 0;
@ -4076,8 +4080,6 @@ function rcube_webmail()
this.gui_objects.attachmentform = form; this.gui_objects.attachmentform = form;
return true; return true;
} }
return false;
}; };
// add file name to attachment list // add file name to attachment list

Loading…
Cancel
Save