]> git.proxmox.com Git - pve-manager.git/blob - www/manager6/qemu/OSTypeEdit.js
Rename Wizard Component aliases using camelCase
[pve-manager.git] / www / manager6 / qemu / OSTypeEdit.js
1 Ext.define('PVE.qemu.OSTypeInputPanel', {
2 extend: 'PVE.panel.InputPanel',
3 alias: 'widget.pveQemuOSTypePanel',
4 onlineHelp: 'chapter-qm.html#_os_settings',
5
6 initComponent : function() {
7 var me = this;
8
9 me.column1 = [
10 {
11 xtype: 'component',
12 html: 'Microsoft Windows',
13 cls:'x-form-check-group-label'
14 },
15 {
16 xtype: 'radiofield',
17 name: 'ostype',
18 inputValue: 'win8'
19 },
20 {
21 xtype: 'radiofield',
22 name: 'ostype',
23 inputValue: 'win7'
24 },
25 {
26 xtype: 'radiofield',
27 name: 'ostype',
28 inputValue: 'w2k8'
29 },
30 {
31 xtype: 'radiofield',
32 name: 'ostype',
33 inputValue: 'wxp'
34 },
35 {
36 xtype: 'radiofield',
37 name: 'ostype',
38 inputValue: 'w2k'
39 }
40 ];
41
42 me.column2 = [
43 {
44 xtype: 'component',
45 html: 'Linux/' + gettext('Other OS types'),
46 cls:'x-form-check-group-label'
47 },
48 {
49 xtype: 'radiofield',
50 name: 'ostype',
51 inputValue: 'l26'
52 },
53 {
54 xtype: 'radiofield',
55 name: 'ostype',
56 inputValue: 'l24'
57 },
58 {
59 xtype: 'radiofield',
60 name: 'ostype',
61 inputValue: 'solaris'
62 },
63 {
64 xtype: 'radiofield',
65 name: 'ostype',
66 inputValue: 'other'
67 }
68 ];
69
70 Ext.Array.each(me.column1, function(def) {
71 if (def.inputValue) {
72 def.boxLabel = PVE.Utils.render_kvm_ostype(def.inputValue);
73 }
74 });
75 Ext.Array.each(me.column2, function(def) {
76 if (def.inputValue) {
77 def.boxLabel = PVE.Utils.render_kvm_ostype(def.inputValue);
78 }
79 });
80
81 Ext.apply(me, {
82 useFieldContainer: {
83 xtype: 'radiogroup',
84 allowBlank: false
85 }
86 });
87
88 me.callParent();
89 }
90 });
91
92 Ext.define('PVE.qemu.OSTypeEdit', {
93 extend: 'PVE.window.Edit',
94
95 initComponent : function() {
96 var me = this;
97
98 Ext.apply(me, {
99 subject: 'OS Type',
100 items: Ext.create('PVE.qemu.OSTypeInputPanel')
101 });
102
103 me.callParent();
104
105 me.load({
106 success: function(response, options) {
107 var value = response.result.data.ostype || 'other';
108 me.setValues({ ostype: value});
109 }
110 });
111 }
112 });