mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
move et2 widget browser to api, thought link to it is currently only in old eTemplate sidebox menu
This commit is contained in:
parent
3453021a6d
commit
6af1e23b66
@ -12,6 +12,9 @@
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*egw:uses
|
||||||
|
etemplate2;
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* widget_browser shows a list of widgets, and allows you to view them one at a time.
|
* widget_browser shows a list of widgets, and allows you to view them one at a time.
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* EGroupware eTemplate2 widget browser
|
* EGroupware eTemplate2 widget browser
|
||||||
* View & play with et2 widgets - PHP
|
|
||||||
*
|
*
|
||||||
* @link http://www.egroupware.org
|
* @link http://www.egroupware.org
|
||||||
* @author Nathan Gray
|
* @author Nathan Gray
|
||||||
@ -12,48 +11,51 @@
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace EGroupware\Api\Etemplate;
|
||||||
|
|
||||||
|
use EGroupware\Api;
|
||||||
|
|
||||||
|
// explicitly list not yet ported api classes
|
||||||
|
use egw_framework;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* eTemplate2 widget browser
|
* eTemplate2 widget browser
|
||||||
|
*
|
||||||
* View & play with et2 widgets. Most of the good stuff happens
|
* View & play with et2 widgets. Most of the good stuff happens
|
||||||
* on the client side via js, this is the server side.
|
* on the client side via js, this is the server side.
|
||||||
*/
|
*/
|
||||||
|
class WidgetBrowser
|
||||||
class etemplate_et2_widgets
|
|
||||||
{
|
{
|
||||||
|
|
||||||
public $public_functions = array(
|
public $public_functions = array(
|
||||||
'index' => true
|
'index' => true
|
||||||
);
|
);
|
||||||
|
|
||||||
public static function index($content = array())
|
public static function index()
|
||||||
{
|
{
|
||||||
$GLOBALS['egw_info']['flags']['currentapp'] = 'etemplate';
|
$GLOBALS['egw_info']['flags']['currentapp'] = 'etemplate';
|
||||||
$GLOBALS['egw_info']['flags']['app_header'] = 'et2 Widgets';
|
$GLOBALS['egw_info']['flags']['app_header'] = 'et2 Widgets';
|
||||||
//'js_link_registry' => True,
|
//'js_link_registry' => True,
|
||||||
|
|
||||||
// Widget browser code
|
// Widget browser code
|
||||||
egw_framework::validate_file('/etemplate/js/widget_browser.js');
|
egw_framework::validate_file('/api/js/etemplate/widget_browser.js');
|
||||||
|
|
||||||
// Include the etemplate2 javascript code
|
// Include the etemplate2 javascript code
|
||||||
egw_framework::validate_file('.', 'etemplate2', 'etemplate');
|
egw_framework::validate_file('.', 'etemplate2', 'etemplate');
|
||||||
|
|
||||||
// Include the jQuery-UI CSS - many more complex widgets use it
|
// Include the jQuery-UI CSS - many more complex widgets use it
|
||||||
$theme = 'redmond';
|
$theme = 'redmond';
|
||||||
egw_framework::includeCSS("/phpgwapi/js/jquery/jquery-ui/$theme/jquery-ui-1.10.3.custom.css");
|
egw_framework::includeCSS("/phpgwapi/js/jquery/jquery-ui/$theme/jquery-ui-1.10.3.custom.css");
|
||||||
|
|
||||||
egw_framework::includeCSS('/etemplate/templates/default/etemplate2.css');
|
egw_framework::includeCSS('/api/templates/default/etemplate2.css');
|
||||||
|
|
||||||
egw_framework::includeCSS('etemplate','widget_browser',false);
|
egw_framework::includeCSS('api','widget_browser',false);
|
||||||
|
|
||||||
// load translations
|
// load translations
|
||||||
translation::add_app('etemplate');
|
Api\Translation::add_app('etemplate');
|
||||||
|
|
||||||
common::egw_header();
|
|
||||||
parse_navbar();
|
|
||||||
|
|
||||||
echo '
|
$GLOBALS['egw']->framework->render('
|
||||||
<div id="widget_list"></div>
|
<div id="widget_list"></div>
|
||||||
<div id="widget_container"></div>';
|
<div id="widget_container"></div>');
|
||||||
common::egw_footer();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* CSS for the widget browser
|
* CSS for the widget browser
|
||||||
* etemplate.etemplate_et2_widgets.index
|
* Api\Etemplate\WidgetBrowser.php
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Basic layout */
|
/* Basic layout */
|
||||||
@ -14,7 +14,7 @@
|
|||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
height: 55%;
|
height: 55%;
|
||||||
width: inherit;
|
width: inherit;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
@ -1,63 +1,62 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* eGroupWare - Setup
|
* EGroupware - eTemplate sidebox
|
||||||
* Originaly from the phpGW XSLT API
|
*
|
||||||
*
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
* @package etemplate
|
||||||
* @package etemplate
|
* @link http://www.egroupware.org
|
||||||
* @link http://www.egroupware.org
|
* @author Ralf Becker <RalfBecker@outdoor-training.de>
|
||||||
* @author Ralf Becker <RalfBecker@outdoor-training.de>
|
* @version $Id$
|
||||||
* @version $Id$
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
$menu_title = $GLOBALS['egw_info']['apps'][$appname]['title'] . ' '. lang('Menu');
|
$menu_title = $GLOBALS['egw_info']['apps'][$appname]['title'] . ' '. lang('Menu');
|
||||||
$file = Array(
|
$file = Array(
|
||||||
'eTemplate Editor' => $GLOBALS['egw']->link('/index.php','menuaction=etemplate.editor.edit'),
|
'eTemplate Editor' => $GLOBALS['egw']->link('/index.php','menuaction=etemplate.editor.edit'),
|
||||||
'DB-Tools' => $GLOBALS['egw']->link('/index.php','menuaction=etemplate.db_tools.edit'),
|
'DB-Tools' => $GLOBALS['egw']->link('/index.php','menuaction=etemplate.db_tools.edit'),
|
||||||
|
);
|
||||||
|
if (@$GLOBALS['egw_info']['user']['apps']['developer_tools'])
|
||||||
|
{
|
||||||
|
$file += array(
|
||||||
|
'_NewLine_', // give a newline
|
||||||
|
'developer_tools' => $GLOBALS['egw']->link('/index.php','menuaction=developer_tools.uilangfile.index'),
|
||||||
);
|
);
|
||||||
if (@$GLOBALS['egw_info']['user']['apps']['developer_tools'])
|
}
|
||||||
{
|
if($GLOBALS['egw_info']['flags']['currentapp'] == 'etemplate')
|
||||||
$file += array(
|
{
|
||||||
'_NewLine_', // give a newline
|
display_sidebox($appname,$menu_title,$file);
|
||||||
'developer_tools' => $GLOBALS['egw']->link('/index.php','menuaction=developer_tools.uilangfile.index'),
|
}
|
||||||
);
|
$menu_title = lang('Documentation');
|
||||||
}
|
$docs = $GLOBALS['egw_info']['server']['webserver_url'].'/etemplate/doc/';
|
||||||
if($GLOBALS['egw_info']['flags']['currentapp'] == 'etemplate')
|
$doc_file = Array(
|
||||||
{
|
array(
|
||||||
display_sidebox($appname,$menu_title,$file);
|
'text' => 'eTemplate2 Reference',
|
||||||
}
|
'link' => egw::link('/index.php','menuaction=api.EGroupware\\Api\\Etemplate\\WidgetBrowser.index', 'etemplate'),
|
||||||
$menu_title = lang('Documentation');
|
),
|
||||||
$docs = $GLOBALS['egw_info']['server']['webserver_url'].'/etemplate/doc/';
|
array(
|
||||||
$file = Array(
|
'text' => 'eTemplate Tutorial',
|
||||||
array(
|
'link' => $docs.'etemplate.html',
|
||||||
'text' => 'eTemplate2 Reference',
|
'target' => 'docs'
|
||||||
'link' => egw::link('/index.php','menuaction=etemplate.etemplate_et2_widgets.index', 'etemplate'),
|
),
|
||||||
),
|
array(
|
||||||
array(
|
'text' => 'eTemplate Reference',
|
||||||
'text' => 'eTemplate Tutorial',
|
'link' => $docs.'reference.html',
|
||||||
'link' => $docs.'etemplate.html',
|
'target' => 'docs'
|
||||||
'target' => 'docs'
|
),
|
||||||
),
|
array(
|
||||||
array(
|
'text' => 'eGroupWare '.lang('Documentation'),
|
||||||
'text' => 'eTemplate Reference',
|
'no_lang' => True,
|
||||||
'link' => $docs.'reference.html',
|
'link' => 'http://egroupware.org/wiki/DeveloperDocs',
|
||||||
'target' => 'docs'
|
'target' => 'docs'
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'text' => 'eGroupWare '.lang('Documentation'),
|
'text' => 'CSS properties',
|
||||||
'no_lang' => True,
|
'link' => 'http://www.w3.org/TR/REC-CSS2/propidx.html',
|
||||||
'link' => 'http://egroupware.org/wiki/DeveloperDocs',
|
'target' => 'docs'
|
||||||
'target' => 'docs'
|
),
|
||||||
),
|
|
||||||
array(
|
|
||||||
'text' => 'CSS properties',
|
|
||||||
'link' => 'http://www.w3.org/TR/REC-CSS2/propidx.html',
|
|
||||||
'target' => 'docs'
|
|
||||||
),
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if($GLOBALS['egw_info']['flags']['currentapp'] == 'etemplate')
|
if($GLOBALS['egw_info']['flags']['currentapp'] == 'etemplate')
|
||||||
{
|
{
|
||||||
display_sidebox($appname,$menu_title,$file);
|
display_sidebox($appname, $menu_title, $doc_file);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user