2022-08-07 11:55:02 +02:00
|
|
|
/**
|
|
|
|
* EGroupware eTemplate2 - et2-appicon widget
|
|
|
|
*
|
|
|
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
|
|
|
* @package etemplate
|
|
|
|
* @subpackage api
|
|
|
|
* @link https://www.egroupware.org
|
|
|
|
* @author Ralf Becker
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
import {Et2Image} from "./Et2Image";
|
|
|
|
|
|
|
|
export class Et2AppIcon extends Et2Image
|
|
|
|
{
|
|
|
|
constructor()
|
|
|
|
{
|
|
|
|
super();
|
|
|
|
|
|
|
|
this.defaultSrc = 'nonav';
|
|
|
|
}
|
|
|
|
|
|
|
|
protected parse_href(_app : string) : string
|
|
|
|
{
|
|
|
|
if (!_app) _app = this.egw().app_name();
|
|
|
|
|
|
|
|
const src = (this.egw().app(_app, 'icon_app') || _app)+'/'+(this.egw().app(_app, 'icon') || 'navbar');
|
|
|
|
|
|
|
|
return super.parse_href(src);
|
|
|
|
}
|
|
|
|
}
|
2024-05-07 22:46:44 +02:00
|
|
|
|
2024-06-17 10:22:00 +02:00
|
|
|
customElements.define("et2-appicon", Et2AppIcon);
|