fix icon in et2-vfs-path and also get it to display "/" for the root

This commit is contained in:
ralf
2024-09-17 10:49:03 +02:00
parent e184d5bdcd
commit eb14eef3df
3 changed files with 39 additions and 4 deletions

View File

@ -571,6 +571,14 @@ declare interface IegwGlobal
*/
app(_app : string, _name : string) : string|undefined;
app(_app : string) : Iapplication|undefined;
/**
* Same as app(), but use the translated app-name / title
*
* @param {string} _title
* @param {string} _name attribute to return, default return whole app-data-object
*/
appByTitle(_title : string, _name : string) : string|undefined;
appByTitle(_title : string) : Iapplication|undefined;
/**
* Get a list of accounts the user has access to
* The list is filtered by type, one of 'accounts','groups','both', 'owngroups'

View File

@ -87,6 +87,24 @@ egw.extend('user', egw.MODULE_GLOBAL, function()
userData.apps[_app] : userData.apps[_app][_name];
},
/**
* Same as app(), but use the translated app-name / title
*
* @param {string} _title
* @param {string} _name attribute to return, default return whole app-data-object
*/
appByTitle: function(_title, _name)
{
for(const app in userData.apps)
{
if (userData.apps[app].title === _title)
{
return typeof _name == 'undefined' || typeof userData.apps[app] == 'undefined' ?
userData.apps[app] : userData.apps[app][_name];
}
}
},
/**
* Get a list of accounts the user has access to
* The list is filtered by type, one of 'accounts','groups','both', 'owngroups'