From 2d9444bef0cdcb529317fc0ba4be20fc82f2ea50 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Wed, 1 Feb 2017 17:59:41 +0100 Subject: [PATCH] Display contact import and advanced search in popup dialogs --- program/js/app.js | 85 +++++++++++++++------ program/steps/addressbook/func.inc | 3 +- program/steps/addressbook/import.inc | 38 ++------- program/steps/addressbook/search.inc | 12 +-- skins/classic/common.css | 12 +++ skins/classic/templates/contactsearch.html | 4 +- skins/classic/templates/importcontacts.html | 14 +--- skins/larry/styles.css | 11 +++ skins/larry/templates/contactsearch.html | 7 +- skins/larry/templates/importcontacts.html | 25 +----- 10 files changed, 101 insertions(+), 110 deletions(-) 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 = $('