Use getActionById instead of addressing the action through its parent, which is high potential to break the code

This commit is contained in:
Hadi Nategh 2014-01-15 09:11:32 +00:00
parent 4b2dbc6526
commit f4d4f9600a

View File

@ -435,8 +435,8 @@ app.classes.addressbook = AppJS.extend(
// Pull data from global cache
var data = egw.dataGetUIDdata(selected[i].id) || {data:{}};
var email_business = data.data[action.parent.children[3].checked ? 'email' : ''];
var email = data.data[action.parent.children[4].checked ? 'email_home' : ''];
var email_business = data.data[action.getManager().getActionById('email_business').checked ? 'email' : ''];
var email = data.data[action.getManager().getActionById('email_home').checked ? 'email_home' : ''];
if(email_business)
{
emails.push(email_business);