diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index cf6ada523a..cc18aecfad 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -2115,12 +2115,17 @@ window.egw_LAB.wait(function() { egw_json_response::get()->data($ret); } - function view($content=null) + /** + * CRM view + * + * @param array $content + */ + function view(array $content=null) { if(is_array($content)) { list($button) = each($content['button']); - switch ($button) + switch ($content['toolbar'] ? $content['toolbar'] : $button) { case 'vcard': egw::redirect_link('/index.php','menuaction=addressbook.uivcard.out&ab_id=' .$content['id']); @@ -2151,7 +2156,7 @@ window.egw_LAB.wait(function() { // make everything not explicit mentioned readonly $readonlys['__ALL__'] = true; $readonlys['photo'] = $readonlys['button[cancel]'] = $readonlys['button[copy]'] = - $readonlys['button[ok]'] = $readonlys['button[more]'] = false; + $readonlys['button[ok]'] = $readonlys['button[more]'] = $readonlys['toolbar'] = false; foreach(array_keys($this->contact_fields) as $key) { @@ -2245,6 +2250,9 @@ window.egw_LAB.wait(function() { // load app.css for addressbook explicit, as addressbook_view hooks changes currentapp! egw_framework::includeCSS('addressbook', 'app'); + // dont show an app-header + $GLOBALS['egw_info']['flags']['app_header'] = ''; + $this->tmpl->setElementAttribute('toolbar', 'actions', array( 'edit' => array( 'caption' => 'Edit', diff --git a/addressbook/js/app.js b/addressbook/js/app.js index 7039737165..655c32c3d2 100644 --- a/addressbook/js/app.js +++ b/addressbook/js/app.js @@ -102,11 +102,10 @@ app.classes.addressbook = AppJS.extend( this.egw.open(id, 'addressbook', 'edit', { makecp: 1}); break; case 'cancel': - default: this.egw.open(null, 'addressbook', 'list', null, '_self', 'addressbook'); break; - //default: - this.et2._inst.template.submit(_action.id); + default: // submit all other buttons back to server + this.et2._inst.submit(); break; } },