mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
widget to display an application icon
This commit is contained in:
parent
8d2018e8f9
commit
2a06876b78
@ -238,3 +238,24 @@ var et2_image = et2_baseWidget.extend([et2_IDetachedDOM],
|
||||
|
||||
et2_register_widget(et2_image, ["image"]);
|
||||
|
||||
/**
|
||||
* Widget displaying an application icon
|
||||
*/
|
||||
var et2_appicon = et2_image.extend(
|
||||
{
|
||||
attributes: {
|
||||
default_src: {
|
||||
name: "Default image",
|
||||
type: "string",
|
||||
default: "nonav",
|
||||
description: "Image to use if there is no application icon"
|
||||
}
|
||||
},
|
||||
|
||||
set_src: function(_app)
|
||||
{
|
||||
this._super.call(this, _app == 'sitemgr-link' ? 'sitemgr/sitemgr-link' : // got removed from jdots
|
||||
(this.egw().app(_app, 'icon_app') || _app)+'/'+(this.egw().app(_app, 'icon') || 'navbar'));
|
||||
}
|
||||
});
|
||||
et2_register_widget(et2_appicon, ["appicon"]);
|
Loading…
Reference in New Issue
Block a user