From: Dominik Csapak Date: Fri, 15 May 2020 08:19:25 +0000 (+0200) Subject: add PMX.image.Logo X-Git-Url: https://git.proxmox.com/?p=proxmox-widget-toolkit.git;a=commitdiff_plain;h=82014ef6f1ee566d5b309137541d52c50f168e80 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 --- diff --git a/Logo.js b/Logo.js new file mode 100644 index 0000000..78d9aad --- /dev/null +++ b/Logo.js @@ -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(); + }, +}); diff --git a/Makefile b/Makefile index 2907419..85fad6b 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ SUBDIRS= css images JSSRC= \ Utils.js \ Toolkit.js \ + Logo.js \ mixin/CBind.js \ data/reader/JsonObject.js \ data/ProxmoxProxy.js \