mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
using javascript:open_window url, instead of html markup
This commit is contained in:
parent
9df3bfae29
commit
bb76ce8cc1
@ -27,38 +27,24 @@ class resources_hooks
|
|||||||
if ($location == 'sidebox_menu')
|
if ($location == 'sidebox_menu')
|
||||||
{
|
{
|
||||||
$title = $GLOBALS['egw_info']['apps']['resources']['title'].' '.lang('Menu');
|
$title = $GLOBALS['egw_info']['apps']['resources']['title'].' '.lang('Menu');
|
||||||
$file[] = array(
|
$file = array(
|
||||||
'text' => lang('resources list'),
|
'Resources list' => egw::link('/index.php',array('menuaction' => 'resources.ui_resources.index' )),
|
||||||
'no_lang' => true,
|
|
||||||
'link' => $GLOBALS['egw']->link('/index.php',array('menuaction' => 'resources.ui_resources.index' )),
|
|
||||||
// 'icon' =>
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if($this->acl->get_cats(EGW_ACL_ADD))
|
if($this->acl->get_cats(EGW_ACL_ADD))
|
||||||
{
|
{
|
||||||
$file[] = array(
|
$file['Add resource'] = "javascript:egw_openWindowCentered2('".egw::link('/index.php',array(
|
||||||
'text' => '<a class="textSidebox" href="'.$GLOBALS['egw']->link('/index.php',array('menuaction' => 'resources.ui_resources.edit')).
|
'menuaction' => 'resources.ui_resources.edit',
|
||||||
'" onclick="window.open(this.href,\'_blank\',\'dependent=yes,width=800,height=600,scrollbars=yes,status=yes\');
|
),false)."','_blank',800,600,'yes')";
|
||||||
return false;">'.lang('add resource').'</a>',
|
|
||||||
'no_lang' => true,
|
|
||||||
'link' => false
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
// $file[] = array(
|
|
||||||
// 'text' => lang('planer'),
|
|
||||||
// 'no_lang' => true,
|
|
||||||
// 'link' => $GLOBALS['egw']->link('/index.php',array('menuaction' => 'resources.ui_calviews.planer' )),
|
|
||||||
// 'icon' =>
|
|
||||||
// );
|
|
||||||
display_sidebox($appname,$title,$file);
|
display_sidebox($appname,$title,$file);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if ($GLOBALS['egw_info']['user']['apps']['preferences'] && $location != 'admin')
|
/* if ($GLOBALS['egw_info']['user']['apps']['preferences'] && $location != 'admin')
|
||||||
{
|
{
|
||||||
$file = array(
|
$file = array(
|
||||||
'Preferences' => $GLOBALS['egw']->link('/preferences/preferences.php','appname='.$appname),
|
'Preferences' => egw::link('/preferences/preferences.php','appname='.$appname),
|
||||||
'Grant Access' => $GLOBALS['egw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$appname),
|
'Grant Access' => egw::link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$appname),
|
||||||
'Edit Categories' => $GLOBALS['egw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=' . $appname . '&cats_level=True&global_cats=True')
|
'Edit Categories' => egw::link('/index.php','menuaction=preferences.uicategories.index&cats_app=' . $appname . '&cats_level=True&global_cats=True')
|
||||||
);
|
);
|
||||||
if ($location == 'preferences')
|
if ($location == 'preferences')
|
||||||
{
|
{
|
||||||
@ -73,13 +59,13 @@ class resources_hooks
|
|||||||
if ($GLOBALS['egw_info']['user']['apps']['admin'] && $location != 'preferences')
|
if ($GLOBALS['egw_info']['user']['apps']['admin'] && $location != 'preferences')
|
||||||
{
|
{
|
||||||
$file = Array(
|
$file = Array(
|
||||||
'Global Categories' => $GLOBALS['egw']->link('/index.php',array(
|
'Global Categories' => egw::link('/index.php',array(
|
||||||
'menuaction' => 'admin.uicategories.index',
|
'menuaction' => 'admin.uicategories.index',
|
||||||
'appname' => $appname,
|
'appname' => $appname,
|
||||||
'global_cats'=> true)),
|
'global_cats'=> true)),
|
||||||
'Configure Access Permissions' => $GLOBALS['egw']->link('/index.php',
|
'Configure Access Permissions' => egw::link('/index.php',
|
||||||
'menuaction=resources.ui_acl.acllist'),
|
'menuaction=resources.ui_acl.acllist'),
|
||||||
'Custom Fields'=>$GLOBALS['egw']->link('/index.php',
|
'Custom Fields'=>egw::link('/index.php',
|
||||||
'menuaction=admin.customfields.edit&appname=resources'),
|
'menuaction=admin.customfields.edit&appname=resources'),
|
||||||
);
|
);
|
||||||
if ($location == 'admin')
|
if ($location == 'admin')
|
||||||
|
Loading…
Reference in New Issue
Block a user