diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index 15d5c6e3bc..c414d56e47 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -221,11 +221,12 @@ class addressbook_ui extends addressbook_bo 'lettersearch' => true, 'do_email' => $do_email ? 1 : 0, 'default_cols' => '!cat_id,contact_created_contact_modified,distribution_list,contact_id,owner,legacy_actions', - 'filter2_onchange' => "if(this.value=='add') { add_new_list(document.getElementById(form::name('filter')).value); this.value='';} else this.form.submit();", + 'filter2_onchange' => "if(this.value=='add') { add_new_list(typeof widget == 'undefined' ? document.getElementById(\"exec[nm][filter]\").value : widget.header.filter.get_value()); this.value='';} else this.form.submit();", 'manual' => $do_email ? ' ' : false, // space for the manual icon //'actions' => $this->get_actions(), // set on each request, as it depends on some filters 'row_id' => 'id', - 'favorites' => true + 'favorites' => true, + 'placeholder_actions' => array('add','delete_list') ); $csv_export = new addressbook_csv($this); $content['nm']['csv_fields'] = $GLOBALS['egw_info']['user']['preferences']['addressbook']['nextmatch-export-definition'] ? @@ -2363,9 +2364,8 @@ class addressbook_ui extends addressbook_bo return false; } - function add_new_list() + function add_new_list(owner) { - var owner=document.getElementById("exec[nm][filter]").value; var name = window.prompt("'.lang('Name for the distribution list').'"); if (name) {