add PMX.image.Logo

copied from pmg-gui, adapted to be able to set a custom url prefix
when we want to use something other than '/pve2'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2020-05-15 10:19:25 +02:00 committed by Thomas Lamprecht
parent 8ae2f8c8b1
commit 82014ef6f1
2 changed files with 22 additions and 0 deletions

21
Logo.js Normal file
View File

@ -0,0 +1,21 @@
Ext.define('PMX.image.Logo', {
extend: 'Ext.Img',
xtype: 'proxmoxlogo',
height: 30,
width: 172,
src: '/images/proxmox_logo.png',
alt: 'Proxmox',
autoEl: {
tag: 'a',
href: 'https://www.proxmox.com',
target: '_blank',
},
initComponent: function() {
let me = this;
let prefix = me.prefix !== undefined ? me.prefix : '/pve2';
me.src = prefix + me.src;
me.callParent();
},
});

View File

@ -7,6 +7,7 @@ SUBDIRS= css images
JSSRC= \
Utils.js \
Toolkit.js \
Logo.js \
mixin/CBind.js \
data/reader/JsonObject.js \
data/ProxmoxProxy.js \