alias: 'widget.pveQemuCreateWizard',
qemuScsiController: undefined,
+ controller: {
+
+ xclass: 'Ext.app.ViewController',
+
+ control: {
+ 'field[name=nodename]': {
+ change: function(f, value) {
+ var me = this;
+ ['networkpanel', 'hdpanel', 'cdpanel'].forEach(function(reference) {
+ me.lookup(reference).setNodename(value);
+ });
+ }
+ }
+ }
+ },
+
initComponent: function() {
var me = this;
]
});
- var cdpanel = Ext.create('PVE.qemu.CDInputPanel', {
- title: gettext('CD/DVD'),
- confid: 'ide2',
- fieldDefaults: {
- labelWidth: 160
- },
- insideWizard: true
- });
-
- var hdpanel = Ext.create('PVE.qemu.HDInputPanel', {
- title: gettext('Hard Disk'),
- isCreate: true,
- insideWizard: true
- });
-
- var networkpanel = Ext.create('PVE.qemu.NetworkInputPanel', {
- title: gettext('Network'),
- insideWizard: true
- });
-
Ext.applyIf(me, {
subject: gettext('Virtual Machine'),
items: [
preferredValue: me.nodename,
fieldLabel: gettext('Node'),
allowBlank: false,
- onlineValidator: true,
- listeners: {
- change: function(f, value) {
- networkpanel.setNodename(value);
- hdpanel.setNodename(value);
- cdpanel.setNodename(value);
- }
- }
+ onlineValidator: true
},
{
xtype: 'pveGuestIDSelector',
xtype: 'pveQemuOSTypePanel',
insideWizard: true
},
- cdpanel,
- hdpanel,
+ {
+ xtype: 'pveQemuCDInputPanel',
+ reference: 'cdpanel',
+ title: gettext('CD/DVD'),
+ confid: 'ide2',
+ fieldDefaults: {
+ labelWidth: 160
+ },
+ insideWizard: true
+ },
+ {
+ xtype: 'pveQemuHDInputPanel',
+ reference: 'hdpanel',
+ title: gettext('Hard Disk'),
+ isCreate: true,
+ insideWizard: true
+ },
{
xtype: 'pveQemuProcessorPanel',
title: gettext('CPU')
insideWizard: true,
title: gettext('Memory')
},
- networkpanel,
+ {
+ xtype: 'pveQemuNetworkInputPanel',
+ reference: 'networkpanel',
+ title: gettext('Network'),
+ insideWizard: true
+ },
{
title: gettext('Confirm'),
layout: 'fit',