- primary link / contact con now be set direct in the contact line

- checkbox to set a custom contact (additional to the linked contact)
- new select/link entry custom fields (eg. to store a contact)
- uses the stock customfield widget now
- email is now a stock infolog type
This commit is contained in:
Ralf Becker 2006-10-04 17:40:33 +00:00
parent 532264b3fa
commit 4259d8d622
14 changed files with 3242 additions and 3127 deletions

View File

@ -1,32 +1,34 @@
<?php
/**************************************************************************\
* eGroupWare - InfoLog *
* http://www.egroupware.org *
* Written and (c) by Ralf Becker <RalfBecker@outdoor-training.de> *
* originaly based on todo written by Joseph Engo <jengo@phpgroupware.org> *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
/**
* InfoLog - Business object
*
* @link http://www.egroupware.org
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @package infolog
* @copyright (c) 2003-6 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
include_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.soinfolog.inc.php');
/**
* This class is the BO-layer of InfoLog, it also handles xmlrpc requests
*
* @package infolog
* @author Ralf Becker <RalfBecker@outdoor-training.de>
* @copyright (c) by Ralf Becker <RalfBecker@outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
*/
class boinfolog
{
var $enums;
/**
* Instance of our so class
*
* @var soinfolog
*/
var $so;
/**
* Instance of the link class
*
* @var bolink
*/
var $link;
var $vfs;
var $vfs_basedir='/infolog';
@ -60,27 +62,43 @@
var $tz_offset = 0;
/**
* @var int $tz_offset_s offset in secconds between user and server-time,
* offset in secconds between user and server-time,
* it need to be add to a server-time to get the user-time or substracted from a user-time to get the server-time
*
* @var int
*/
var $tz_offset_s = 0;
var $user_time_now;
/**
* @var array $timestamps name of timestamps in an InfoLog entry
* name of timestamps in an InfoLog entry
*
* @var array
*/
var $timestamps = array('info_startdate','info_enddate','info_datemodified','info_datecompleted');
/**
* @var array $config infolog configuration
* instance of the config class for infolog
*
* @var config
*/
var $config;
/**
* @var array $responsible_edit=array('info_status','info_percent','info_datecompleted') fields the responsible user can change
* fields the responsible user can change
*
* @var array
*/
var $responsible_edit=array('info_status','info_percent','info_datecompleted');
/**
* @var string $implicit_rights='read' implicit ACL rights of the responsible user: read or edit
* implicit ACL rights of the responsible user: read or edit
*
* @var string
*/
var $implicit_rights='read';
/**
* Custom fields read from the infolog config
*
* @var array
*/
var $customfields=array();
/**
* Constructor Infolog BO
@ -97,21 +115,16 @@
1 => 'normal',
0 => 'low'
),
/* 'status' => array(
'offer' => 'offer','ongoing' => 'ongoing','call' => 'call',
'will-call' => 'will-call','done' => 'done',
'billed' => 'billed' ),
*/ 'confirm' => array(
'confirm' => array(
'not' => 'not','accept' => 'accept','finish' => 'finish',
'both' => 'both' ),
'type' => array(
'task' => 'task','phone' => 'phone','note' => 'note'
/* ,'confirm' => 'confirm','reject' => 'reject','email' => 'email',
'fax' => 'fax' not implemented so far */ )
'task' => 'task','phone' => 'phone','note' => 'note','email' => 'email'
/* ,'confirm' => 'confirm','reject' => 'reject','fax' => 'fax' not implemented so far */ )
);
$this->status = $this->stock_status = array(
'defaults' => array(
'task' => 'not-started', 'phone' => 'not-started', 'note' => 'done'),
'task' => 'not-started', 'phone' => 'not-started', 'note' => 'done','email' => 'done'),
'task' => array(
'offer' => 'offer', // --> NEEDS-ACTION
'not-started' => 'not-started', // iCal NEEDS-ACTION
@ -125,6 +138,9 @@
'done' => 'done', // iCal COMPLETED
'billed' => 'billed' ), // --> DONE
'note' => array(
'ongoing' => 'ongoing', // iCal has no status on notes
'done' => 'done'),
'email' => array(
'ongoing' => 'ongoing', // iCal has no status on notes
'done' => 'done'
));
@ -140,7 +156,6 @@
$this->config =& CreateObject('phpgwapi.config','infolog');
$this->config->read_repository();
$this->customfields = array();
if ($this->config->config_data)
{
$this->link_pathes = $this->config->config_data['link_pathes'];
@ -166,7 +181,23 @@
}
if (isset($this->config->config_data['customfields']) && is_array($this->config->config_data['customfields']))
{
$this->customfields = $this->config->config_data['customfields'];
if (!($this->customfields = $this->config->config_data['customfields'])) $this->customfields = array();
foreach($this->customfields as $name => $field)
{
// old infolog customefield record
if(empty($field['type']))
{
if (count($field['values'])) $field['type'] = 'select'; // selectbox
elseif ($field['rows'] > 1) $field['type'] = 'textarea'; // textarea
elseif (intval($field['len']) > 0) $field['type'] = 'text'; // regular input field
else $field['type'] = 'label'; // header-row
$field['type2'] = $field['typ'];
unset($field['typ']);
$this->customfields[$name] = $this->config->config_data['customfields'][$name] = $field;
$save_config = true;
}
}
if ($save_config) $this->config->save_repository();
}
if (count(explode(',',$this->config->config_data['responsible_edit'])))
{
@ -178,10 +209,7 @@
}
}
$this->user = $GLOBALS['egw_info']['user']['account_id'];
/**
* @var int $tz_offset_s offset in secconds between user and server-time,
* it need to be add to a server-time to get the user-time or substracted from a user-time to get the server-time
*/
$this->tz_offset = $GLOBALS['egw_info']['user']['preferences']['common']['tz_offset'];
$this->tz_offset_s = 60*60*$this->tz_offset;
$this->user_time_now = time() + $this->tz_offset_s;
@ -202,14 +230,18 @@
/**
* checks if there are customfields for typ $typ
*
* @param string $typ
* @param string $type
* @param boolean $links=false if true check only customfields containing links, default false = all custom fields
* @return boolean True if there are customfields for $typ, else False
*/
function has_customfields($typ)
function has_customfields($type,$links=false)
{
if ($links) $link_types = $this->get_customfield_link_types();
foreach($this->customfields as $name => $field)
{
if (empty($field['typ']) || $field['typ'] == $typ)
if ((!$type || empty($field['type2']) || $field['type2'] == $type) &&
(!$links || in_array($field['type'],$link_types)))
{
return True;
}
@ -217,6 +249,23 @@
return False;
}
/**
* Get the customfield types containing links
*
* @return array with customefield types as values
*/
function get_customfield_link_types()
{
static $link_types;
if (is_null($link_types))
{
$link_types = array_keys($this->link->app_list());
$link_types[] = 'link-entry';
}
return $link_types;
}
/**
* check's if user has the requiered rights on entry $info_id
*
@ -262,9 +311,14 @@
$nr = $link['link_app1'] == 'infolog' && $link['link_id1'] == $info['info_id'] ? '2' : '1';
$title = $this->link->title($link['link_app'.$nr],$link['link_id'.$nr]);
if ($title == $info['info_from'] || @htmlentities($title) == $info['info_from'])
if ((string)$info['info_custom_from'] === '') // old entry
{
$info['info_custom_from'] = (int) ($title != $info['info_from'] && @htmlentities($title) != $info['info_from']);
}
if (!$info['info_custom_from'])
{
$info['info_from'] = '';
$info['info_custom_from'] = 0;
}
if ($link['link_app'.$nr] == $not_app && $link['link_id'.$nr] == $not_id)
{
@ -275,6 +329,7 @@
'id' => $link['link_id'.$nr],
'title' => (!empty($info['info_from']) ? $info['info_from'] : $title),
);
$info['info_contact'] = $link['link_app'.$nr].':'.$link['link_id'.$nr];
//echo " title='$title'</p>\n";
return $info['blur_title'] = $title;
@ -283,6 +338,7 @@
{
$info['info_link'] = array('title' => $info['info_from']);
$info['info_link_id'] = 0; // link might have been deleted
$info['info_custom_from'] = (int)!!$info['info_from'];
}
return False;
}
@ -512,6 +568,11 @@
{
if ($to_write[$time]) $to_write[$time] -= $this->tz_offset_s;
}
// if we have links in customfields, we need to get the old values, to be able to remove changed links
if ($this->has_customfields($values['info_type'],true) && $values['info_id'])
{
$old = $this->read($values['info_id']);
}
if(($info_id = $this->so->write($to_write,$check_modified)))
{
if (!isset($values['info_type']) || $status_only)
@ -536,6 +597,9 @@
}
$values['info_id'] = $info_id;
// create (and remove) links in custom fields
$this->update_customfield_links($values,$old);
// notify the link-class about the update, as other apps may be subscribt to it
$this->link->notify_update('infolog',$info_id,$values);
}
@ -544,6 +608,50 @@
return $info_id;
}
/**
* Check if there are links in the custom fields and update them
*
* @param array $values new values including the custom fields
* @param array $old=null old values before the update, if existing
*/
function update_customfield_links($values,$old=null)
{
$link_types = $this->get_customfield_link_types();
foreach($this->customfields as $name => $data)
{
if (!in_array($data['type'],$link_types)) continue;
// do we have a different old value --> delete that link
if ($old && $old['#'.$name] && $old['#'.$name] != $values['#'.$name])
{
if ($data['type'] == 'link-entry')
{
list($app,$id) = explode(':',$old['#'.$name]);
}
else
{
$app = $data['type'];
$id = $old['#'.$name];
}
$this->link->unlink(false,'infolog',$values['info_id'],'',$app,$id);
}
if ($data['type'] == 'link-entry')
{
list($app,$id) = explode(':',$values['#'.$name]);
}
else
{
$app = $data['type'];
$id = $values['#'.$name];
}
if ($id) // create new link, does nothing for already existing links
{
$this->link->link('infolog',$values['info_id'],$app,$id);
}
}
}
/**
* Query the number of children / subs
*
@ -641,7 +749,7 @@
);
// find the addressbookentry to link with
$addressbook = CreateObject('addressbook.bocontacts');
$addressbook =& CreateObject('addressbook.bocontacts');
$contacts = array();
foreach ($email as $mailadr)
{

View File

@ -1,17 +1,14 @@
<?php
/**************************************************************************\
* eGroupWare - InfoLog *
* http://www.eGroupWare.org *
* Written by Ralf Becker <RalfBecker@outdoor-training.de> *
* originaly based on todo written by Joseph Engo <jengo@phpgroupware.org> *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
/**
* InfoLog - Storage object
*
* @link http://www.egroupware.org
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @package infolog
* @copyright (c) 2003-6 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
include_once(EGW_API_INC.'/class.solink.inc.php');

View File

@ -1,31 +1,54 @@
<?php
/**************************************************************************\
* eGroupWare - InfoLog: Administration of custom fields, type and status *
* http://www.egroupware.org *
* Written and (c) by Ralf Becker <RalfBecker@outdoor-training.de> *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
/**
* InfoLog - Custome fields
*
* @link http://www.egroupware.org
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @package infolog
* @copyright (c) 2003-6 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
/**
* Administration of custom fields, type and status
*
* @package infolog
* @author Ralf Becker <RalfBecker@outdoor-training.de>
* @copyright (c) by Ralf Becker <RalfBecker@outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
*/
class uicustomfields
{
var $public_functions = array
(
var $public_functions = array(
'edit' => True
);
/**
* Customfield types, without the link app-names
*
* @var array
*/
var $cf_types = array(
'text' => 'Text',
'label' => 'Label',
'select' => 'Selectbox',
'radio' => 'Radiobutton',
'checkbox' => 'Checkbox',
'link-entry' => 'Select an entry',
);
/**
* Instance of the infolog BO class
*
* @var boinfolog
*/
var $bo;
/**
* Instance of the etemplate class
*
* @var etemplate
*/
var $tmpl;
/**
* instance of the config class for infolog
*
* @var config
*/
var $config;
function uicustomfields( )
{
@ -35,6 +58,12 @@
$this->status = &$this->bo->status;
$this->config = &$this->bo->config;
$this->fields = &$this->bo->customfields;
$GLOBALS['egw']->translation->add_app('etemplate');
foreach($this->cf_types as $name => $label) $this->cf_types[$name] = lang($label);
$link_types = $this->bo->link->app_list();
ksort($link_types);
foreach($link_types as $name => $label) $this->cf_types[$name] = '- '.$label;
}
/**
@ -79,17 +108,17 @@
{
list($typ) = each($this->types);
$content = array(
'typ' => $typ,
'type2' => $typ,
);
}
$readonlys = array();
$readonlys['button[delete]'] = isset($this->bo->stock_enums['type'][$content['typ']]);
$readonlys['button[delete]'] = isset($this->bo->stock_enums['type'][$content['type2']]);
$content['status'] = array(
'default' => $this->status['defaults'][$content['typ']]
'default' => $this->status['defaults'][$content['type2']]
);
$n = 0;
foreach($this->status[$content['typ']] as $name => $label)
foreach($this->status[$content['type2']] as $name => $label)
{
$content['status'][++$n] = array(
'name' => $name,
@ -97,7 +126,7 @@
'disabled' => False
);
$preserv_status[$n]['old_name'] = $name;
if (isset($this->bo->stock_status[$content['typ']][$name]))
if (isset($this->bo->stock_status[$content['type2']][$name]))
{
$readonlys['status']["delete[$name]"] =
$readonlys['status'][$n.'[name]'] = True;
@ -110,40 +139,41 @@
//echo 'customfields=<pre style="text-align: left;">'; print_r($this->fields); echo "</pre>\n";
$content['fields'] = array();
$n = 0;
foreach($this->fields as $name => $data)
foreach($this->fields as $name => $field)
{
if (is_array($data['values']))
if (is_array($field['values']))
{
$values = '';
foreach($data['values'] as $var => $value)
foreach($field['values'] as $var => $value)
{
$values .= (!empty($values) ? "\n" : '').$var.'='.$value;
}
$data['values'] = $values;
$field['values'] = $values;
}
$content['fields'][++$n] = $data + array(
$content['fields'][++$n] = $field + array(
'name' => $name
);
$preserv_fields[$n]['old_name'] = $name;
$readonlys['fields']["create$name"] = True;
}
$content['fields'][++$n] = array('typ'=>'','order' => 10 * $n); // new line for create
$content['fields'][++$n] = array('type2'=>'','order' => 10 * $n); // new line for create
$readonlys['fields']["delete[]"] = True;
//echo '<p>uicustomfields.edit(content = <pre style="text-align: left;">'; print_r($content); echo "</pre>\n";
//echo 'readonlys = <pre style="text-align: left;">'; print_r($readonlys); echo "</pre>\n";
$this->tmpl->read('infolog.customfields');
$this->tmpl->exec('infolog.uicustomfields.edit',$content,array(
'typ' => $this->types,
'type2' => $this->types,
'type' => $this->cf_types,
),$readonlys,array(
'status' => $preserv_status,
'fields' => $preserv_fields
'fields' => $preserv_fields,
));
}
function update_fields(&$content)
{
$typ = $content['typ'];
$typ = $content['type2'];
$fields = &$content['fields'];
$create = $fields['create'];
@ -195,13 +225,14 @@
}
}
$this->fields[$name] = array(
'typ' => $field['typ'],
'type2' => $field['type2'],
'type' => $field['type'],
'label' => empty($field['label']) ? $name : $field['label'],
'help' => $field['help'],
'values'=> $values,
'len' => $field['len'],
'rows' => intval($field['rows']),
'order' => intval($field['order'])
'rows' => (int)$field['rows'],
'order' => (int)$field['order'],
);
}
if (!function_exists('sort_by_order'))
@ -222,7 +253,7 @@
function update_status(&$content)
{
$typ = $content['typ'];
$typ = $content['type2'];
$status = &$content['status'];
$default = $status['default'];
@ -291,15 +322,15 @@
function delete(&$content)
{
if (isset($this->bo->stock_enums['type'][$content['typ']]))
if (isset($this->bo->stock_enums['type'][$content['type2']]))
{
$content['error_msg'] .= lang("You can't delete one of the stock types !!!");
return;
}
unset($this->types[$content['typ']]);
unset($this->status[$content['typ']]);
unset($this->status['defaults'][$content['typ']]);
$content['typ'] = '';
unset($this->types[$content['type2']]);
unset($this->status[$content['type2']]);
unset($this->status['defaults'][$content['type2']]);
list($content['type2']) = each($this->types);
// save changes to repository
$this->save_repository();
@ -327,7 +358,7 @@
// save changes to repository
$this->save_repository();
$content['typ'] = $new_name; // show the new entry
$content['type2'] = $new_name; // show the new entry
}
}

View File

@ -1,27 +1,19 @@
<?php
/**************************************************************************\
* eGroupWare - InfoLog *
* http://www.egroupware.org *
* Written and copyright by Ralf Becker <RalfBecker@outdoor-training.de> *
* originaly based on todo written by Joseph Engo <jengo@phpgroupware.org> *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
/**
* InfoLog - User interface
*
* @link http://www.egroupware.org
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @package infolog
* @copyright (c) 2003-6 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
include_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.boinfolog.inc.php');
/**
* This class is the UI-layer (user interface) of InfoLog
*
* @package infolog
* @author Ralf Becker <RalfBecker@outdoor-training.de>
* @copyright (c) by Ralf Becker <RalfBecker@outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
*/
class uiinfolog
{
@ -589,15 +581,20 @@
$no_popup = $content['no_popup'];
$caller = $content['caller'];
if (isset($content['link_to']['primary']))
/* if (isset($content['link_to']['primary']))
{
$content['info_link_id'] = $content['link_to']['primary'];
}
}*/
list($button) = @each($content['button']);
unset($content['button']);
if ($button)
{
//echo "<p>uiinfolog::edit(info_id=$info_id) '$button' button pressed, content="; _debug_array($content);
if (($button == 'save' || $button == 'apply') && empty($content['info_subject']))
{
$this->tmpl->set_validation_error('info_subject',lang('Field must not be empty !!!'));
$button = ''; // stop save or apply
}
if (($button == 'save' || $button == 'apply') && $info_id)
{
if (!($edit_acl = $this->bo->check_access($info_id,EGW_ACL_EDIT)))
@ -608,14 +605,17 @@
}
if (($button == 'save' || $button == 'apply') && (!$info_id || $edit_acl || $status_only))
{
if ($content['info_contact'])
{
$old_link_id = (int)$content['info_link_id'];
list($app,$id) = explode(':',$content['info_contact']);
$content['info_link_id'] = (int)($info_link_id = $this->link->link('infolog',$content['link_to']['to_id'],$app,$id));
if ($old_link_id && $old_link_id != $content['info_link_id']) $this->link->unlink($old_link_id);
}
if (is_array($content['link_to']['to_id']) && count($content['link_to']['to_id']))
{
if (strstr($content['info_link_id'],':') !== False)
{
$info_link_id = $content['info_link_id'];
$content['info_link_id'] = 0; // as field has to be int
}
}
$active_tab = $content[$tabs];
if (!($info_id = $this->bo->write($content)))
{
@ -747,11 +747,11 @@
case 'datetime': $set_startdate = $this->bo->user_time_now; break;
case 'empty': $set_startdate = 0; break;
}
if (intval($content['info_link_id']) > 0 && !$this->link->get_link($content['info_link_id']))
if ((int)$content['info_link_id'] > 0 && !$this->link->get_link($content['info_link_id']))
{
$content['info_link_id'] = 0; // link has been deleted
if (!$content['info_custom_link']) $content['info_from'] = '';
}
if (!$info_id && $action_id && $action == 'sp') // new SubProject
{
if (!$this->bo->check_access($action_id,EGW_ACL_ADD))
@ -871,7 +871,8 @@
}
}
// we allways need to set a non-empty/-zero primary, to make the radiobutton appear
$content['link_to']['primary'] = $content['info_link_id'] ? $content['info_link_id'] : '#';
// $content['link_to']['primary'] = $content['info_link_id'] ? $content['info_link_id'] : '#';
$content['hide_from_css'] = $content['info_custom_from'] ? '' : 'hideFrom';
if (!($readonlys['button[delete]'] = !$info_id || !$this->bo->check_access($info_id,EGW_ACL_DELETE)))
{
@ -886,8 +887,7 @@
}
if ($this->bo->has_customfields($content['info_type']))
{
$content['customfields'] = $this->bo->customfields;
$content['customfields']['###typ###'] = $content['info_type'];
$content['customfields'] = $content['info_type'];
}
else
{

View File

@ -1,22 +1,21 @@
<?php
/**************************************************************************\
* eGroupWare - Info Log *
* http://www.egroupware.org *
* Written by Ralf Becker <RalfBecker@outdoor-training.de> *
* originaly based on todo written by Joseph Engo <jengo@phpgroupware.org> *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/**
* InfoLog
*
* @link http://www.egroupware.org
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @package infolog
* @copyright (c) 2003-6 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
/* $Id$ */
$GLOBALS['egw_info']['flags'] = array(
$GLOBALS['egw_info'] = array(
'flags' => array(
'currentapp' => 'infolog',
'noheader' => True,
'nonavbar' => True
'nonavbar' => True,
)
);
include('../header.inc.php');
@ -35,4 +34,3 @@ unset($setup_info);
ExecMethod('infolog.uiinfolog.index','reset_action_view');
$GLOBALS['egw']->common->egw_exit();
?>

File diff suppressed because one or more lines are too long

View File

@ -48,6 +48,7 @@ category infolog de Kategorie
change the status of an entry, eg. close it infolog de Status eines Eintrags ändern, zB. ihn als erledigt markieren
charset of file infolog de Zeichensatz der Datei
check to set startday infolog de ankreutzen um Startdatum zu setzen
check to specify custom contact infolog de Ankreutzen um einen eigenen Kontakt anzugeben
click here to create the link infolog de hier klicken um die Verknüpfung zu erzeugen
click here to start the search infolog de hier klicken um die Suche zu starten
close infolog de Schließen
@ -280,6 +281,7 @@ typ infolog de Typ
typ '%1' already exists !!! infolog de Typ '%1' existiert bereits !!!
type infolog de Typ
type ... infolog de Typ ...
type of customfield infolog de Typ des benutzerdefinierten Feldes
type of the log-entry: note, phonecall or todo infolog de Typ des Eintrags: Notiz, Anruf oder Auftrag
unlink infolog de Verküpfung lösen
upcoming infolog de zukünftig

View File

@ -48,6 +48,7 @@ category infolog en Category
change the status of an entry, eg. close it infolog en Change the status of an entry, eg. close it
charset of file infolog en Charset of file
check to set startday infolog en check to set startday
check to specify custom contact infolog en Check to specify custom contact
click here to create the link infolog en click here to create the Link
click here to start the search infolog en click here to start the search
close infolog en Close
@ -279,6 +280,7 @@ typ infolog en Type
typ '%1' already exists !!! infolog en Type '%1' already exists !!!
type infolog en Type
type ... infolog en Type ...
type of customfield infolog en Type of customfield
type of the log-entry: note, phonecall or todo infolog en Type of the log-entry: Note, Phone call or ToDo
unlink infolog en Unlink
upcoming infolog en upcoming

View File

@ -12,7 +12,7 @@
/* $Id$ */
$setup_info['infolog']['name'] = 'infolog';
$setup_info['infolog']['version'] = '1.2.004';
$setup_info['infolog']['version'] = '1.3.001';
$setup_info['infolog']['app_order'] = 5;
$setup_info['infolog']['tables'] = array('egw_infolog','egw_infolog_extra');
$setup_info['infolog']['enable'] = 1;
@ -75,3 +75,4 @@

View File

@ -39,7 +39,8 @@
'info_price' => array('type' => 'float','precision' => '8'),
'info_percent' => array('type' => 'int','precision' => '2','default' => '0'),
'info_datecompleted' => array('type' => 'int','precision' => '8'),
'info_location' => array('type' => 'varchar','precision' => '255')
'info_location' => array('type' => 'varchar','precision' => '255'),
'info_custom_from' => array('type' => 'int','precision' => '1')
),
'pk' => array('info_id'),
'fk' => array(),

View File

@ -556,3 +556,15 @@
return $GLOBALS['setup_info']['infolog']['currentver'] = '1.2.004';
}
$test[] = '1.2.004';
function infolog_upgrade1_2_004()
{
// column to save if from contains a custom text
$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','info_custom_from',array(
'type' => 'int',
'precision' => '1',
));
return $GLOBALS['setup_info']['infolog']['currentver'] = '1.3.001';
}

View File

@ -15,3 +15,4 @@
.fullWidth table { width: 100%; }
.infoId:before { content:"#" }
.fixedHeight { line-height: 12px; }
.noWrap { white-space: nowrap; }

View File

@ -34,7 +34,7 @@
</rows>
</grid>
</template>
<template id="infolog.customfields.fields" template="" lang="" group="0" version="1.2.001">
<template id="infolog.customfields.fields" template="" lang="" group="0" version="1.3.001">
<grid>
<columns>
<column/>
@ -44,12 +44,14 @@
<column/>
<column/>
<column/>
<column/>
</columns>
<rows>
<row class="th">
<description value="Typ"/>
<description value="Name"/>
<description value="Label"/>
<description value="Type"/>
<description value="Values for selectbox"/>
<description value="Length&lt;br&gt;Rows"/>
<description value="Order"/>
@ -57,15 +59,18 @@
</row>
<row class="row" valign="top">
<menulist>
<menupopup options="All" id="${row}[typ]" statustext="for which types should this field be used"/>
<menupopup options="All" id="${row}[type2]" statustext="for which types should this field be used"/>
</menulist>
<textbox size="20" maxlength="32" id="${row}[name]" statustext="the name used internaly (&lt;= 20 chars), changeing it makes existing data unavailible"/>
<vbox>
<vbox options="0,0">
<textbox maxlength="255" id="${row}[label]" statustext="the text displayed to the user"/>
<description id="${row}[label]"/>
</vbox>
<menulist>
<menupopup id="${row}[type]" statustext="Type of customfield" no_lang="1"/>
</menulist>
<textbox multiline="true" rows="2" cols="30" id="${row}[values]" statustext="each value is a line like &lt;id&gt;[=&lt;label&gt;]"/>
<vbox>
<vbox options="0,0">
<textbox size="5" id="${row}[len]" statustext="max length of the input [, length of the inputfield (optional)]"/>
<int options="0,10,2" id="${row}[rows]" statustext="number of row for a multiline inputfield or line of a multi-select-box" blur="1"/>
</vbox>
@ -78,7 +83,7 @@
</rows>
</grid>
</template>
<template id="infolog.customfields" template="" lang="" group="0" version="1.2.001">
<template id="infolog.customfields" template="" lang="" group="0" version="1.3.001">
<grid>
<columns>
<column/>
@ -92,7 +97,7 @@
<row>
<description value="Typ"/>
<menulist>
<menupopup id="typ" onchange="1" statustext="select a typ to edit it's status-values or delete it"/>
<menupopup id="type2" onchange="1" statustext="select a typ to edit it's status-values or delete it"/>
</menulist>
<button label="Delete" id="button[delete]" statustext="deletes the selected typ"/>
<textbox size="10" maxlength="40" id="new_name" statustext="name of new type to create" blur="new name"/>

View File

@ -123,7 +123,7 @@
</rows>
</grid>
</template>
<template id="infolog.edit" template="" lang="" group="0" version="1.2.002">
<template id="infolog.edit" template="" lang="" group="0" version="1.3.001">
<grid width="100%">
<columns>
<column width="103"/>
@ -152,13 +152,19 @@
</row>
<row class="row">
<description value="Contact" options=",,,info_from"/>
<textbox size="36" maxlength="255" id="info_from" statustext="Custom contact-information, leave emtpy to use information from most recent link" blur="@blur_title"/>
<vbox options="0,0">
<hbox options="0,0">
<link-entry id="info_contact" class="noWrap"/>
<checkbox id="info_custom_from" onchange="document.getElementById(form::name('info_from')).style.display=this.checked?'block':'none';" statustext="Check to specify custom contact"/>
</hbox>
<textbox size="36" maxlength="255" id="info_from" statustext="Custom contact-information, leave emtpy to use information from most recent link" blur="@blur_title" class="$cont[hide_from_css]"/>
</vbox>
<description value="Phone/Email" options=",,,_info_addr"/>
<textbox size="30" maxlength="255" id="info_addr" statustext="Custom contact-address, leave empty to use information from most recent link"/>
</row>
<row class="row">
<description value="Subject" options=",,,info_subject"/>
<textbox size="80" maxlength="255" span="all" id="info_subject" needed="1" statustext="a short subject for the entry"/>
<textbox size="80" maxlength="255" span="all" id="info_subject" statustext="a short subject for the entry"/>
</row>
<row valign="top" height="250">
<tabbox span="all">
@ -209,7 +215,7 @@
<menupopup type="select-account" id="info_owner" readonly="true"/>
</menulist>
<description value="Last modified"/>
<hbox orient="0,0">
<hbox options="0" orient="0">
<menulist>
<menupopup type="select-account" id="info_modifier" readonly="true"/>
</menulist>
@ -228,5 +234,8 @@
</row>
</rows>
</grid>
<styles>
.hideFrom input { display: none; }
</styles>
</template>
</overlay>