xclass: 'Ext.app.ViewController',
control: {
'combobox[name=osbase]': {
- change: 'onOSBaseChange'
+ change: 'onOSBaseChange',
},
'combobox[name=ostype]': {
afterrender: 'onOSTypeChange',
- change: 'onOSTypeChange'
- }
+ change: 'onOSTypeChange',
+ },
},
onOSBaseChange: function(field, value) {
this.lookup('ostype').getStore().setData(PVE.Utils.kvm_ostypes[value]);
} else {
throw 'non unique widget :' + widget + ' in Wizard';
}
- }
+ },
},
- initComponent : function() {
+ initComponent: function() {
var me = this;
- /*jslint confusion: true */
me.items = [
{
xtype: 'displayfield',
value: gettext('Guest OS') + ':',
- hidden: !me.insideWizard
+ hidden: !me.insideWizard,
},
{
xtype: 'combobox',
editable: false,
queryMode: 'local',
value: 'Linux',
- store: Object.keys(PVE.Utils.kvm_ostypes)
+ store: Object.keys(PVE.Utils.kvm_ostypes),
},
{
xtype: 'combobox',
reference: 'ostype',
fieldLabel: gettext('Version'),
value: 'l26',
- allowBlank : false,
+ allowBlank: false,
editable: false,
queryMode: 'local',
valueField: 'val',
fields: ['desc', 'val'],
data: PVE.Utils.kvm_ostypes.Linux,
listeners: {
- datachanged: function (store) {
+ datachanged: function(store) {
var ostype = me.lookup('ostype');
var old_val = ostype.getValue();
if (!me.insideWizard && old_val && store.find('val', old_val) != -1) {
} else {
ostype.setValue(store.getAt(0));
}
- }
- }
- }
- }
+ },
+ },
+ },
+ },
];
- /*jslint confusion: false */
me.callParent();
- }
+ },
});
Ext.define('PVE.qemu.OSTypeEdit', {
items: [{ xtype: 'pveQemuOSTypePanel' }],
- initComponent : function() {
+ initComponent: function() {
var me = this;
me.callParent();
var value = response.result.data.ostype || 'other';
var osinfo = PVE.Utils.get_kvm_osinfo(value);
me.setValues({ ostype: value, osbase: osinfo.base });
- }
+ },
});
- }
+ },
});