diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index 95b3952f08..c9c7f8df14 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -931,36 +931,6 @@ window.egw_LAB.wait(function() { ),'infolog'); } - function ajax_add_whole_list($list, $email_type = 'email') - { - $query = Api\Cache::getSession('addressbook', 'email'); - $query['filter2'] = (int)$list; - $success = $failed = $action_msg = $msg = null; - $this->action($email_type,array(),true,$success,$failed,$action_msg,$query,$msg); - - $response = Api\Json\Response::get(); - - if ($success) $response->addScript(Framework::set_onload('')); - - // close window only if no errors AND something added - if ($failed || !$success) - { - if (!$msg) $msg = $failed ? lang('%1 contact(s) %2, %3 failed because of insufficent rights !!!',$success,$action_msg,$failed) : - lang('%1 contact(s) %2',$success,$action_msg); - - $response->addScript("alert('".addslashes($msg)."')"); - // reset the filter - $response->addScript("document.getElementById('exec[nm][filter2]').value='';"); - } - else - { - if (!$msg) $msg = lang('%1 contact(s) %2',$success,$action_msg); - $response->addScript("alert('".addslashes($msg)."')"); - $response->addScript('egw(window).close();'); - } - - } - /** * Create or rename an existing email list * diff --git a/addressbook/js/app.js b/addressbook/js/app.js index 0a2be09ebd..141a250a6c 100644 --- a/addressbook/js/app.js +++ b/addressbook/js/app.js @@ -519,20 +519,6 @@ app.classes.addressbook = AppJS.extend( egw.json('addressbook.addressbook_ui.ajax_check_values', [values, widget.id, own_id],this._confirmdialog_callback,this,true,this).sendRequest(); }, - add_whole_list: function(list) - { - if (document.getElementById("exec[nm][email_type][email_home]").checked == true) - { - email_type = "email_home"; - } - else - { - email_type = "email"; - } - var request = new egw_json_request("addressbook.addressbook_ui.ajax_add_whole_list",list,email_type); - request.sendRequest(true); - }, - show_custom_country: function(selectbox) { if(!selectbox) return; @@ -652,19 +638,6 @@ app.classes.addressbook = AppJS.extend( } }, - filter2_onchnage_email: function () - { - this.form.submit(); - if (this.value && confirm('Add emails of whole distribution list?')) - { - this.add_whole_list(this.value); - } - else - { - this.form.submit(); - } - }, - /** * Method to enable actions by comparing a field with given value */