autoloading of addressbook classes

This commit is contained in:
Ralf Becker 2008-05-10 12:06:15 +00:00
parent 7a2e1a66e2
commit 4885518b88
4 changed files with 86 additions and 90 deletions

View File

@ -11,8 +11,6 @@
* @version $Id$
*/
require_once(EGW_API_INC.'/class.html.inc.php');
/**
* Abstract base class for trackering:
* - logging all modifications of an entry
@ -132,11 +130,16 @@ class bo_tracking
*
* @return bo_tracking
*/
function bo_tracking()
function __construct()
{
}
function bo_tracking()
{
self::__construct
}
/**
* Get a config value, which can depend on $data and $old
*

View File

@ -983,6 +983,10 @@ class etemplate extends boetemplate
}
$extra_label = True;
if (strchr($cell['onchange'],'$') || $cell['onchange']{0} == '@')
{
$cell['onchange'] = $this->expand_name($cell['onchange'],$show_c,$show_row,$content['.c'],$content['.row'],$content);
}
// the while loop allows to build extensions from other extensions
// please note: only the first extension's post_process function is called !!!
list($type,$sub_type) = explode('-',$cell['type']);
@ -1069,10 +1073,10 @@ class etemplate extends boetemplate
}
if ($cell['onchange'] && !($cell['type'] == 'button' || $cell['type'] == 'buttononly'))
{
if (strchr($cell['onchange'],'$') || $cell['onchange']{0} == '@')
/* if (strchr($cell['onchange'],'$') || $cell['onchange']{0} == '@')
{
$cell['onchange'] = $this->expand_name($cell['onchange'],$show_c,$show_row,$content['.c'],$content['.row'],$content);
}
}*/
$options .= ' onChange="'.($cell['onchange'] == '1' ? 'this.form.submit();' : $this->js_pseudo_funcs($cell['onchange'],$cname)).'"';
}
}

View File

@ -60,12 +60,8 @@ class uidefinitions
$GLOBALS['egw_info']['flags']['currentapp'] = self::_appname;
$GLOBALS['egw_info']['flags']['include_xajax'] = true;
if(!@is_object($GLOBALS['egw']->js))
{
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
}
$this->etpl =& new etemplate();
$this->clock = $GLOBALS['egw']->html->image(self::_appname,'clock');
$this->clock = html::image(self::_appname,'clock');
$this->steps = array(
'wizzard_step10' => lang('Choose an application'),
'wizzard_step20' => lang('Choose a plugin'),
@ -232,7 +228,7 @@ class uidefinitions
$this->response->addAssign('exec[button][cancel]','style.display', 'none');
}
$this->response->addAssign('contentbox', 'innerHTML', $html);
if (is_object($GLOBALS['egw']->js) && $GLOBALS['egw']->js->body['onLoad'])
if (isset($GLOBALS['egw']->js) && $GLOBALS['egw']->js->body['onLoad'])
{
$this->response->addScript($GLOBALS['egw']->js->body['onLoad']);
}

View File

@ -5,22 +5,15 @@
* @link http://www.egroupware.org
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @package api
* @copyright (c) 2006 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2006-8 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
require_once(EGW_INCLUDE_ROOT.'/addressbook/inc/class.bocontacts.inc.php');
/**
* contacts service provided by the addressbook application
*
* @package api
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2006 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
*/
class contacts extends bocontacts
class contacts extends addressbook_bo
{
/**
* @deprecated since 1.3 use total
@ -36,9 +29,9 @@ class contacts extends bocontacts
/**
* constructor calling the constructor of the extended class
*/
function contacts($contact_app='addressbook')
function __construct($contact_app='addressbook')
{
$this->bocontacts($contact_app);
parent::__construct($contact_app);
$this->total_records =& $this->total;
$this->stock_contact_fields = array_keys($this->contact_fields);