mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
fix problems with autoloading of etemplate_widget_tree
This commit is contained in:
parent
f1ae822dd1
commit
fd2bc6d7b7
@ -5,11 +5,13 @@
|
||||
* @link http://www.egroupware.org
|
||||
* @author Ralf Becker <rb@stylite.de>
|
||||
* @package admin
|
||||
* @copyright (c) 2013-14 by Ralf Becker <rb@stylite.de>
|
||||
* @copyright (c) 2013-16 by Ralf Becker <rb@stylite.de>
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
use EGroupware\Api;
|
||||
|
||||
/**
|
||||
* UI for admin
|
||||
*/
|
||||
@ -41,7 +43,7 @@ class admin_ui
|
||||
{
|
||||
$_GET['load'] = 'admin.admin_statistics.submit';
|
||||
}
|
||||
$tpl = new etemplate_new('admin.index');
|
||||
$tpl = new Api\Etemplate('admin.index');
|
||||
|
||||
if (!is_array($content)) $content = array();
|
||||
$content['nm'] = array(
|
||||
@ -206,7 +208,7 @@ class admin_ui
|
||||
),
|
||||
);
|
||||
// generate urls for add/edit accounts via addressbook
|
||||
$edit = egw_link::get_registry('addressbook', 'edit');
|
||||
$edit = Api\Link::get_registry('addressbook', 'edit');
|
||||
$edit['account_id'] = '$id';
|
||||
foreach($edit as $name => $val)
|
||||
{
|
||||
@ -302,9 +304,9 @@ class admin_ui
|
||||
foreach($rows as &$row)
|
||||
{
|
||||
$row['status'] = self::$accounts->is_expired($row) ?
|
||||
lang('Expired').' '.egw_time::to($row['account_expires'], true) :
|
||||
lang('Expired').' '.Api\DateTime::to($row['account_expires'], true) :
|
||||
(!self::$accounts->is_active($row) ? lang('Disabled') :
|
||||
($row['account_expires'] != -1 ? lang('Expires').' '.egw_time::to($row['account_expires'], true) :
|
||||
($row['account_expires'] != -1 ? lang('Expires').' '.Api\DateTime::to($row['account_expires'], true) :
|
||||
lang('Enabled')));
|
||||
|
||||
if (!self::$accounts->is_active($row)) $row['status_class'] = 'adminAccountInactive';
|
||||
@ -318,7 +320,7 @@ class admin_ui
|
||||
*/
|
||||
public static function ajax_tree()
|
||||
{
|
||||
etemplate_widget_tree::send_quote_json(self::tree_data(!empty($_GET['id']) ? $_GET['id'] : '/'));
|
||||
Api\Etemplate\Widget\Tree::send_quote_json(self::tree_data(!empty($_GET['id']) ? $_GET['id'] : '/'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -373,7 +375,7 @@ class admin_ui
|
||||
}
|
||||
if (!empty($data['icon']))
|
||||
{
|
||||
$icon = etemplate_widget_tree::imagePath($data['icon']);
|
||||
$icon = Api\Etemplate\Widget\Tree::imagePath($data['icon']);
|
||||
if ($data['child'] || $data['item'])
|
||||
{
|
||||
$data['im1'] = $data['im2'] = $icon;
|
||||
@ -394,8 +396,8 @@ class admin_ui
|
||||
$path .= ($path == '/' ? '' : '/').$part;
|
||||
if (!isset($parent[$path]))
|
||||
{
|
||||
$icon = etemplate_widget_tree::imagePath($part == 'apps' ? common::image('phpgwapi', 'home') :
|
||||
(($i=common::image($part, 'navbar')) ? $i : common::image('phpgwapi', 'nonav')));
|
||||
$icon = Api\Etemplate\Widget\Tree::imagePath($part == 'apps' ? Api\Image::find('phpgwapi', 'home') :
|
||||
(($i=Api\Image::find($part, 'navbar')) ? $i : Api\Image::find('phpgwapi', 'nonav')));
|
||||
$parent[$path] = array(
|
||||
'id' => $path,
|
||||
'text' => $part == 'apps' ? lang('Applications') : lang($part),
|
||||
|
@ -31,13 +31,6 @@ class etemplate_widget extends Etemplate\Widget {}
|
||||
*/
|
||||
abstract class etemplate_widget_entry extends Widget\Entry {}
|
||||
|
||||
/**
|
||||
* eTemplate Tree widget
|
||||
*
|
||||
* @deprecated use Api\Etemplate\Widget\Tree
|
||||
*/
|
||||
class etemplate_widget_tree extends Widget\Tree {}
|
||||
|
||||
/**
|
||||
* eTemplate Select widget
|
||||
*
|
||||
|
21
etemplate/inc/class.etemplate_widget_tree.inc.php
Normal file
21
etemplate/inc/class.etemplate_widget_tree.inc.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* EGroupware - eTemplate widget moved to EGroupware\Api\Etemplate\Widget
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package etemplate
|
||||
* @subpackage api
|
||||
* @link http://www.egroupware.org
|
||||
* @author Ralf Becker <RalfBecker@outdoor-training.de>
|
||||
* @copyright 2002-16 by RalfBecker@outdoor-training.de
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
use EGroupware\Api\Etemplate\Widget\Tree;
|
||||
|
||||
/**
|
||||
* eTemplate Tree widget
|
||||
*
|
||||
* @deprecated use Api\Etemplate\Widget\Tree
|
||||
*/
|
||||
class etemplate_widget_tree extends Tree {}
|
@ -251,8 +251,8 @@ class mail_ui
|
||||
static function ajax_tree_autoloading ($_id = null)
|
||||
{
|
||||
$mail_ui = new mail_ui();
|
||||
$_id = $_id? $_id:$_GET['id'];
|
||||
etemplate_widget_tree::send_quote_json($mail_ui->mail_tree->getTree($_id,'',1,false));
|
||||
$id = $_id ? $_id : $_GET['id'];
|
||||
Api\Etemplate\Widget\Tree::send_quote_json($mail_ui->mail_tree->getTree($id,'',1,false));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -808,7 +808,7 @@ class mail_ui
|
||||
$data = $this->mail_tree->getTree($nodeID,$_profileID,0, false,$subscribedOnly,!$this->mail_bo->mailPreferences['showAllFoldersInFolderPane']);
|
||||
}
|
||||
if (!is_null($_nodeID)) return $data;
|
||||
etemplate_widget_tree::send_quote_json($data);
|
||||
Api\Etemplate\Widget\Tree::send_quote_json($data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -4842,7 +4842,7 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
|
||||
{
|
||||
$mail_ui = new mail_ui();
|
||||
$_id = $_id? $_id:$_GET['id'];
|
||||
etemplate_widget_tree::send_quote_json($mail_ui->mail_tree->getTree($_id,'',1,true,false,false,false));
|
||||
Api\Etemplate\Widget\Tree::send_quote_json($mail_ui->mail_tree->getTree($_id,'',1,true,false,false,false));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user