fix a couple of problems with new images: infinite recursion and order they are found (navbar)

This commit is contained in:
ralf 2024-08-25 12:15:35 +02:00
parent 3e0cce403e
commit 62fbeda480
2 changed files with 4 additions and 8 deletions

View File

@ -103,13 +103,11 @@ egw.extend('images', egw.MODULE_GLOBAL, function()
} }
} }
tries['global'] = _name; tries['global'] = _name;
if (typeof images['global'] !== 'undefined' && typeof images['global'][_name] === 'string') if (_name !== 'navbar' && // do NOT overwrite navbar images of all apps with placeholder
typeof images['global'] !== 'undefined' && typeof images['global'][_name] === 'string'&&
typeof images['bootstrap'] !== 'undefined' && typeof images['bootstrap'][images['global'][_name]] == 'string')
{ {
if (typeof images['bootstrap'] !== 'undefined' && typeof images['bootstrap'][_name] == 'string') return this.webserverUrl+images['bootstrap'][images['global'][_name]];
{
return this.webserverUrl+images['bootstrap'][_name];
}
return this.image(images['global'][_name], _app);
} }
tries[_app + (_app == 'phpgwapi' ? " (current app)" : "")] = _name; tries[_app + (_app == 'phpgwapi' ? " (current app)" : "")] = _name;
if (typeof images[_app] != 'undefined' && typeof images[_app][_name] == 'string') if (typeof images[_app] != 'undefined' && typeof images[_app][_name] == 'string')

View File

@ -133,8 +133,6 @@ class Image
'priority' => 'dash-circle', 'priority' => 'dash-circle',
'private' => 'key', 'private' => 'key',
'reload' => 'arrow-clockwise', 'reload' => 'arrow-clockwise',
'save' => 'api/save', // @todo: as bootstrap's save would shadow api/save and is not fitting
'save_new' => 'api/save_new', // @todo
'save_zip' => 'file-zip', 'save_zip' => 'file-zip',
//'search' => 'search', //'search' => 'search',
'security-update' => 'shield-exclamation', 'security-update' => 'shield-exclamation',