From 7c02cd3cd47329fbab7735dcc9ba6af5f1f32329 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 12 Feb 2014 11:07:33 +0000 Subject: [PATCH] explicitly loading addressbook css for CRM view and moved loading of infolog javascript to its hook --- addressbook/inc/class.addressbook_ui.inc.php | 13 +++++++------ infolog/inc/class.infolog_ui.inc.php | 5 ++++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index e0a6f552b2..442f563337 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -420,7 +420,7 @@ class addressbook_ui extends addressbook_bo )+array( 'icon' => 'foldertree_nolines_minus', 'disableClass' => 'rowNoEdit', - ), + ), ), ); if (!$GLOBALS['egw_info']['user']['apps']['preferences']) unset($actions['cats']['children']['cat_edit']); @@ -2238,8 +2238,9 @@ window.egw_LAB.wait(function() { // set id for automatic linking via quick add $GLOBALS['egw_info']['flags']['currentid'] = $content['id']; - // Load JS for infolog actions - egw_framework::validate_file('.','app','infolog'); + + // load app.css for addressbook explicit, as addressbook_view hooks changes currentapp! + egw_framework::includeCSS('addressbook', 'app'); $this->tmpl->exec('addressbook.addressbook_ui.view',$content,$sel_options,$readonlys,array('id' => $content['id'])); @@ -2286,7 +2287,7 @@ window.egw_LAB.wait(function() { { if(!empty($_content)) { - + $response = egw_json_response::get(); $query = egw_session::appsession('index','addressbook'); @@ -2314,7 +2315,7 @@ window.egw_LAB.wait(function() { if ($_content['button']['search']) $response->call("app.addressbook.adv_search"); if ($_content['button']['cancelsearch']) egw_framework::window_close (); //$response->addScript('this.close();'); } - + //$GLOBALS['egw_info']['flags']['include_xajax'] = true; //$GLOBALS['egw_info']['flags']['java_script'] .= ""; $GLOBALS['egw_info']['etemplate']['advanced_search'] = true; @@ -2369,7 +2370,7 @@ window.egw_LAB.wait(function() { $content['showsearchbuttons'] = true; // enable search operation and search buttons| they're disabled by default if ($this->config['private_cf_tab']) $content['no_private_cfs'] = 0; - + $this->tmpl->read('addressbook.edit'); $this->tmpl->set_cell_attribute('change_org','disabled',true); return $this->tmpl->exec('addressbook.addressbook_ui.search',$content,$sel_options,$readonlys,array(),2); diff --git a/infolog/inc/class.infolog_ui.inc.php b/infolog/inc/class.infolog_ui.inc.php index 0fc3f2e89d..18fc0ba0ec 100644 --- a/infolog/inc/class.infolog_ui.inc.php +++ b/infolog/inc/class.infolog_ui.inc.php @@ -1952,7 +1952,7 @@ class infolog_ui } } $preserv = $content; - + // Don't preserve message unset($preserv['msg']); @@ -2566,6 +2566,9 @@ class infolog_ui */ function hook_view($args) { + // Load JS for infolog actions + egw_framework::validate_file('.','app','infolog'); + switch ($args['location']) { case 'addressbook_view':