mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
* preference for open application tabs of Stylite template set, allowing to set a default or even force them
This commit is contained in:
parent
9e90a46a52
commit
d5e39013c6
@ -10,6 +10,24 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
$apps = $no_navbar_apps = array();
|
||||
if (!$hook_data['setup']) // does not work on setup time
|
||||
{
|
||||
foreach(ExecMethod('jdots.jdots_framework.navbar_apps') as $app => $data)
|
||||
{
|
||||
if (!$data['noNavbar'])
|
||||
{
|
||||
$apps[$app] = $data['title'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$no_navbar_apps[$app] = $data['title'];
|
||||
}
|
||||
}
|
||||
$apps += $no_navbar_apps;
|
||||
unset($app); unset($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stylite jdots template
|
||||
*/
|
||||
@ -39,5 +57,16 @@ $GLOBALS['settings'] = array(
|
||||
'admin' => false,
|
||||
'default'=> '0',
|
||||
),
|
||||
'open_tabs' => array(
|
||||
'type' => 'multiselect',
|
||||
'label' => 'Open application tabs',
|
||||
'name' => 'open_tabs',
|
||||
'values' => $apps,
|
||||
'help' => 'Allows to set a default or force the open application tabs.',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
'default' => 'addressbook,calendar',
|
||||
),
|
||||
'navbar_format' => false, // not used in JDots (defined in common prefs)
|
||||
);
|
||||
unset($apps);
|
||||
|
@ -768,10 +768,6 @@ class jdots_framework extends egw_framework
|
||||
/**
|
||||
* Prepare an array with apps used to render the navbar
|
||||
*
|
||||
* @param string $url contains the current url on the client side. It is used to
|
||||
* determine whether the default app/home should be opened on the client
|
||||
* or whether a specific application-url has been given.
|
||||
*
|
||||
* @return array of array(
|
||||
* 'name' => app / directory name
|
||||
* 'title' => translated application title
|
||||
@ -780,12 +776,9 @@ class jdots_framework extends egw_framework
|
||||
* 'icon_app' => application of icon
|
||||
* 'icon_hover' => hover-icon, if used by template
|
||||
* 'target'=> ' target="..."' attribute fragment to open url in target, popup or ''
|
||||
* 'opened' => unset or false if the tab should not be opened, otherwise the numeric position in the tab list
|
||||
* 'active' => true if this tab should be the active one when it is restored, otherwise unset or false
|
||||
* 'openOnce' => unset or the url which will be opened when the tab is restored
|
||||
* )
|
||||
*/
|
||||
public function ajax_navbar_apps($url)
|
||||
public function navbar_apps()
|
||||
{
|
||||
$apps = parent::_get_navbar_apps();
|
||||
|
||||
@ -806,6 +799,32 @@ class jdots_framework extends egw_framework
|
||||
{
|
||||
unset($apps['sitemgr-link']);
|
||||
}
|
||||
return $apps;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare an array with apps used to render the navbar
|
||||
*
|
||||
* @param string $url contains the current url on the client side. It is used to
|
||||
* determine whether the default app/home should be opened on the client
|
||||
* or whether a specific application-url has been given.
|
||||
*
|
||||
* @return array of array(
|
||||
* 'name' => app / directory name
|
||||
* 'title' => translated application title
|
||||
* 'url' => url to call for index
|
||||
* 'icon' => icon name
|
||||
* 'icon_app' => application of icon
|
||||
* 'icon_hover' => hover-icon, if used by template
|
||||
* 'target'=> ' target="..."' attribute fragment to open url in target, popup or ''
|
||||
* 'opened' => unset or false if the tab should not be opened, otherwise the numeric position in the tab list
|
||||
* 'active' => true if this tab should be the active one when it is restored, otherwise unset or false
|
||||
* 'openOnce' => unset or the url which will be opened when the tab is restored
|
||||
* )
|
||||
*/
|
||||
public function ajax_navbar_apps($url)
|
||||
{
|
||||
$apps = $this->navbar_apps();
|
||||
|
||||
// open tab for default app, if no other tab is set
|
||||
if (!($default_app = $GLOBALS['egw_info']['user']['preferences']['common']['default_app']))
|
||||
|
Loading…
Reference in New Issue
Block a user