nicer UI to select apps for mobile device and not storing default, to allow chaning it, when more apps become available

This commit is contained in:
Ralf Becker 2016-03-09 09:29:13 +00:00
parent 3c9353514d
commit 0493ca041c
5 changed files with 24 additions and 5 deletions

View File

@ -124,7 +124,7 @@ class uiconfig
$c->config_data[$key] = $config;
if (in_array($key, (array)$GLOBALS['egw_info']['server']['found_validation_hook'], true) && function_exists($key))
{
call_user_func($key,$config);
call_user_func($key, $config, $c);
if($GLOBALS['config_error'])
{
$errors .= lang($GLOBALS['config_error']) . "\n";

View File

@ -14,7 +14,7 @@ use EGroupware\Api;
/*
Set global flag to indicate for which config settings we have equally named validation methods
*/
$GLOBALS['egw_info']['server']['found_validation_hook'] = array('vfs_image_dir');
$GLOBALS['egw_info']['server']['found_validation_hook'] = array('vfs_image_dir','fw_mobile_app_list');
/**
* Check VFS dir exists and delete image map to recreate it, if vfs-image-dir changes
@ -39,4 +39,23 @@ function vfs_image_dir($vfs_image_dir)
// Set the global now, or the old value will get re-loaded
$GLOBALS['egw_info']['server']['vfs_image_dir'] = $vfs_image_dir;
}
}
/**
* Do NOT store the default to allow changing it if more apps become available
*
* @param type $app_list
* @param \EGroupware\Api\Config $c
*/
function fw_mobile_app_list($app_list, Api\Config $c)
{
// normalize lists
sort($app_list);
$default_list = explode(',', jdots_framework::DEFAULT_MOBILE_APPS);
sort($default_list);
if ($app_list == $default_list)
{
$c->config_data['fw_mobile_app_list'] = null;
}
}

View File

@ -96,6 +96,7 @@ application '%1' not found (maybe not installed or misspelled)! admin de Anwendu
application name admin de Name der Anwendung
application title admin de Titel der Anwendung
applications admin de Anwendungen
applications available on mobile devices admin de Anwendungen die auf Mobilgeräten zur Verfügung stehen
applications list admin de Liste der Anwendungen
applications run rights updated. admin de Anwendungsrechte aktualisiert.
applies the changes admin de übernimmt Änderungen
@ -416,7 +417,6 @@ limit to members of admin de beschränken auf Mitglieder von
list config settings admin de Konfigurationseinstellungen auflisten
list current sessions admin de aktive Sitzungen anzeigen
list of current users admin de Liste der gegenwärtigen Benutzer
list of enabled applications on mobile template (apps must be comma separated) admin de Liste freigeschalteter Anwendung für Mobilgeräte (komma separiert)
log user-agent and action of changes in history-log of entries admin de Protokolliere Browser-Typ und Aktion von Änderungen in der History der Einträge
logged out admin de abgemeldet
login history admin de Login-Kontrolle

View File

@ -96,6 +96,7 @@ application '%1' not found (maybe not installed or misspelled)! admin en Applica
application name admin en Application name
application title admin en Application title
applications admin en Applications
applications available on mobile devices admin en Applications available on mobile devices
applications list admin en Applications list
applications run rights updated. admin en Applications run rights updated.
applies the changes admin en Applies the changes
@ -416,7 +417,6 @@ limit to members of admin en Limit to members of
list config settings admin en List config settings
list current sessions admin en List current sessions
list of current users admin en List of current users
list of enabled applications on mobile template (apps must be comma separated) admin en List of enabled applications on mobile template (apps must be comma separated)
log user-agent and action of changes in history-log of entries admin en Log user-agent and action of changes in history-log of entries
logged out admin en Logged out
login history admin en Login history

View File

@ -114,7 +114,7 @@
</tr>
<tr class="row_off">
<td>{lang_List_of_enabled_applications_on_mobile_template_(apps_must_be_comma_separated)}:</td>
<td>{lang_Applications_available_on_mobile_devices}:</td>
<td>
{call_jdots_framework::mobile_app_list}
</td>