More Home progress:

- Remove app header from addressbook
 - Always load app's CSS for single entry
This commit is contained in:
Nathan Gray 2014-11-27 18:31:08 +00:00
parent bcc3499c4c
commit 8c5ea8eba9
3 changed files with 23 additions and 2 deletions

View File

@ -38,7 +38,7 @@ class addressbook_favorite_portlet extends home_favorite_portlet
}
error_log(array2string($this->nm_settings['col_filter']));
$this->nm_settings += array(
'get_rows' => 'addressbook.addressbook_ui.get_rows',
'get_rows' => 'addressbook_favorite_portlet::get_rows',
// Use a different template so it can be accessed from client side
'template' => 'addressbook.index.rows',
'default_cols' => 'type,n_fileas_n_given_n_family_n_family_n_given_org_name_n_family_n_given_n_fileas,'.
@ -55,6 +55,23 @@ class addressbook_favorite_portlet extends home_favorite_portlet
parent::exec($id, $etemplate);
}
/**
* Override from addressbook to clear the app header
*
* @param type $query
* @param type $rows
* @param type $readonlys
* @return integer Total rows found
*/
public static function get_rows(&$query, &$rows, &$readonlys)
{
$ui = new addressbook_ui();
$total = $ui->get_rows($query, $rows, $readonlys);
unset($GLOBALS['egw_info']['flags']['app_header']);
return $total;
}
/**
* Here we need to handle any incoming data. Setup is done in the constructor,
* output is handled by parent.

View File

@ -75,7 +75,7 @@ var et2_portlet = et2_valueWidget.extend(
},
createNamespace: true,
GRID: 50,
GRID: 55,
/**
* These are the "normal" actions that every portlet is expected to have.

View File

@ -115,6 +115,10 @@ class home_link_portlet extends home_portlet
// Try to load entry
if($this->context['entry'] && $this->context['entry']['app'])
{
// Always load app's css
egw_framework::includeCSS($this->context['entry']['app'],'app');
try
{
$classname = $this->context['entry']['app'] . '_egw_record';