remove unused code calling not existing Api\Framework::set_onload()

This commit is contained in:
Ralf Becker 2016-06-07 15:19:18 +02:00
parent e9f854a074
commit 93853cbfe0
2 changed files with 0 additions and 57 deletions

View File

@ -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
*

View File

@ -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
*/