* infolog: feature to be able to control max-width of description area in list-view

This commit is contained in:
Klaus Leithoff 2011-01-05 15:45:27 +00:00
parent 938a999ab0
commit d39b9f3594
2 changed files with 14 additions and 3 deletions

View File

@ -250,6 +250,15 @@ class infolog_hooks
'admin' => False, 'admin' => False,
'default'=> 5, 'default'=> 5,
), ),
'limit_des_width' => array(
'type' => 'input',
'size' => 5,
'label' => 'Limit width of description column ((effective only if lines limit is set), 0 for no limit)',
'name' => 'limit_des_width',
'help' => 'How wide should the description area be. This value is numeric and interpreted as em; 60 works reasonably well.',
'xmlrpc' => True,
'admin' => False,
),
'set_start' => array( 'set_start' => array(
'type' => 'select', 'type' => 'select',
'label' => 'Startdate for new entries', 'label' => 'Startdate for new entries',

View File

@ -728,13 +728,15 @@ class infolog_ui
{ {
$values['css'] = '<style type="text/css">@import url('.$GLOBALS['egw_info']['server']['webserver_url'].'/infolog/templates/default/app.css);'."</style>"; $values['css'] = '<style type="text/css">@import url('.$GLOBALS['egw_info']['server']['webserver_url'].'/infolog/templates/default/app.css);'."</style>";
} }
// add scrollbar to long describtion, if user choose so in his prefs // add scrollbar to long description, if user choose so in his prefs
if ($this->prefs['limit_des_lines'] > 0 || (string)$this->prefs['limit_des_lines'] == '') if ($this->prefs['limit_des_lines'] > 0 || (string)$this->prefs['limit_des_lines'] == '');
{ {
$values['css'] .= '<style type="text/css">@media screen { .infoDes { max-height: '. $values['css'] .= '<style type="text/css">@media screen { .infoDes { '.
($this->prefs['limit_des_width']?'max-width:'.$this->prefs['limit_des_width'].'em;':'').' max-height: '.
(($this->prefs['limit_des_lines'] ? $this->prefs['limit_des_lines'] : 5) * 1.35). // dono why em is not real lines (($this->prefs['limit_des_lines'] ? $this->prefs['limit_des_lines'] : 5) * 1.35). // dono why em is not real lines
'em; overflow: auto; }}</style>'; 'em; overflow: auto; }}</style>';
} }
$sel_options = array( $sel_options = array(
'info_type' => $this->bo->enums['type'], 'info_type' => $this->bo->enums['type'],
'pm_id' => array(lang('No project')), 'pm_id' => array(lang('No project')),