From: Thomas Lamprecht Date: Fri, 1 Apr 2022 11:35:10 +0000 (+0200) Subject: ui: lxc resources: refactor add menu handler X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=163d9f17cb9b5c28a6169af076323e70f0a34bae;p=pve-manager.git ui: lxc resources: refactor add menu handler Signed-off-by: Thomas Lamprecht --- diff --git a/www/manager6/lxc/Resources.js b/www/manager6/lxc/Resources.js index df8cc969..683be526 100644 --- a/www/manager6/lxc/Resources.js +++ b/www/manager6/lxc/Resources.js @@ -324,13 +324,15 @@ Ext.define('PVE.lxc.RessourceView', { iconCls: 'fa fa-fw fa-hdd-o black', disabled: !caps.vms['VM.Config.Disk'], handler: function() { - var win = Ext.create('PVE.lxc.MountPointEdit', { - url: '/api2/extjs/' + baseurl, + Ext.create('PVE.lxc.MountPointEdit', { + autoShow: true, + url: `/api2/extjs/${baseurl}`, unprivileged: me.getObjectValue('unprivileged'), pveSelNode: me.pveSelNode, + listeners: { + destroy: () => me.reload(), + }, }); - win.on('destroy', me.reload, me); - win.show(); }, }, ],