ui: qemu/HDEdit: use me instead of this

more in line with our remaining code style

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2021-09-22 11:27:42 +02:00 committed by Thomas Lamprecht
parent 7d749da091
commit ef82a0b1a7

View File

@ -17,21 +17,22 @@ Ext.define('PVE.qemu.HDInputPanel', {
xclass: 'Ext.app.ViewController', xclass: 'Ext.app.ViewController',
onControllerChange: function(field) { onControllerChange: function(field) {
let me = this;
var value = field.getValue(); var value = field.getValue();
var allowIOthread = value.match(/^(virtio|scsi)/); var allowIOthread = value.match(/^(virtio|scsi)/);
this.lookup('iothread').setDisabled(!allowIOthread); me.lookup('iothread').setDisabled(!allowIOthread);
if (!allowIOthread) { if (!allowIOthread) {
this.lookup('iothread').setValue(false); me.lookup('iothread').setValue(false);
} }
var virtio = value.match(/^virtio/); var virtio = value.match(/^virtio/);
this.lookup('ssd').setDisabled(virtio); me.lookup('ssd').setDisabled(virtio);
if (virtio) { if (virtio) {
this.lookup('ssd').setValue(false); me.lookup('ssd').setValue(false);
} }
this.lookup('scsiController').setVisible(value.match(/^scsi/)); me.lookup('scsiController').setVisible(value.match(/^scsi/));
}, },
control: { control: {