diff --git a/program/js/app.js b/program/js/app.js index 7657a5223..9ac3279eb 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -932,11 +932,8 @@ function rcube_webmail() case 'save': var input, form = this.gui_objects.editform; if (form) { - // adv. search - if (this.env.action == 'search') { - } // user prefs - else if ((input = $("input[name='_pagesize']", form)) && input.length && isNaN(parseInt(input.val()))) { + if ((input = $("input[name='_pagesize']", form)) && input.length && isNaN(parseInt(input.val()))) { alert(this.get_label('nopagesizewarning')); input.focus(); break; @@ -1349,19 +1346,41 @@ function rcube_webmail() break; case 'import': - if (this.env.action == 'import' && this.gui_objects.importform) { - var file = document.getElementById('rcmimportfile'); - if (file && !file.value) { - alert(this.get_label('selectimportfile')); - aborted = true; - break; - } - this.gui_objects.importform.submit(); - this.set_busy(true, 'importwait'); - this.lock_form(this.gui_objects.importform, true); - } - else - this.goto_url('import', (this.env.source ? '_target='+urlencode(this.env.source)+'&' : '')); + var reload = false, + dialog = $('