mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:07 +01:00
WIP multitab:
- fix duplicated sidebox view id
This commit is contained in:
parent
d4d63d382e
commit
6a5c6599dd
@ -38,7 +38,7 @@ class addressbook_hooks
|
||||
{
|
||||
display_sidebox($appname, lang('Contact data'), array(
|
||||
array(
|
||||
'text' => '<div id="addressbook_'.$_GET['contact_id'].'_view_sidebox" class="addressbook_view_sidebox"/>',
|
||||
'text' => '<div id="'.self::getViewDOMID($_GET['contact_id'], $_GET['crm_list']).'" class="addressbook_view_sidebox"/>',
|
||||
'no_lang' => true,
|
||||
'link' => false,
|
||||
'icon' => false,
|
||||
@ -102,6 +102,17 @@ class addressbook_hooks
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate unique Id for addressbook view sidebox
|
||||
* @param $contact_id
|
||||
* @param $view
|
||||
* @return string
|
||||
*/
|
||||
static function getViewDOMID($contact_id, $view)
|
||||
{
|
||||
return 'addressbook_'.$contact_id.'_'.$view.'_view_sidebox';
|
||||
}
|
||||
|
||||
/**
|
||||
* populates $settings for the Api\Preferences
|
||||
*
|
||||
|
@ -3149,7 +3149,7 @@ class addressbook_ui extends addressbook_bo
|
||||
|
||||
// Load CRM code
|
||||
Framework::includeJS('.','CRM','addressbook');
|
||||
$content['view_sidebox'] = 'addressbook_'.$contact_id.'_view_sidebox';
|
||||
$content['view_sidebox'] = addressbook_hooks::getViewDOMID($contact_id, $crm_list);
|
||||
$this->tmpl->exec('addressbook.addressbook_ui.view',$content,$sel_options,$readonlys,array(
|
||||
'id' => $content['id'],
|
||||
'index' => $content['index'],
|
||||
|
@ -90,10 +90,12 @@ var AddressbookApp = /** @class */ (function (_super) {
|
||||
break;
|
||||
}
|
||||
jQuery('select[id*="adr_one_countrycode"]').each(function () {
|
||||
app.addressbook.show_custom_country(this);
|
||||
if (app.addressbook)
|
||||
app.addressbook.show_custom_country(this);
|
||||
});
|
||||
jQuery('select[id*="adr_two_countrycode"]').each(function () {
|
||||
app.addressbook.show_custom_country(this);
|
||||
if (app.addressbook)
|
||||
app.addressbook.show_custom_country(this);
|
||||
});
|
||||
};
|
||||
/**
|
||||
@ -206,7 +208,7 @@ var AddressbookApp = /** @class */ (function (_super) {
|
||||
this.egw.openTab(id, 'addressbook', 'view', extras, {
|
||||
displayName: data.n_fn,
|
||||
icon: data.photo,
|
||||
id: id
|
||||
id: id + '_' + extras.crm_list
|
||||
});
|
||||
};
|
||||
/**
|
||||
|
@ -92,10 +92,10 @@ class AddressbookApp extends EgwApp
|
||||
}
|
||||
|
||||
jQuery('select[id*="adr_one_countrycode"]').each(function() {
|
||||
app.addressbook.show_custom_country(this);
|
||||
if (app.addressbook) app.addressbook.show_custom_country(this);
|
||||
});
|
||||
jQuery('select[id*="adr_two_countrycode"]').each(function() {
|
||||
app.addressbook.show_custom_country(this);
|
||||
if (app.addressbook) app.addressbook.show_custom_country(this);
|
||||
});
|
||||
}
|
||||
|
||||
@ -231,7 +231,7 @@ class AddressbookApp extends EgwApp
|
||||
this.egw.openTab(id, 'addressbook', 'view', extras, {
|
||||
displayName: data.n_fn,
|
||||
icon: data.photo,
|
||||
id: id
|
||||
id: id+'_'+extras.crm_list
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user