hi, > + > > + if (deletes.length) { > > + values.delete = deletes.join(','); > > + } > > + > > + return values; > > + }, > > + > > + > > + initComponent: function() { > > + var me = this; > > + > > + var items = []; > > how's that not just a static > items: [ > { ... }, > ], > > definition? > > And even if it would need to be in initComponent then to me.items = [ ... ] > not that weird push every item step by step.
honestly it didn't even occur to me that there's any difference. > > But please wait for a v4, I did not looked at the rest or tested this at > all.. okay, i'll wait for the testing. > > > + items.push({ > > + xtype: 'radiofield', > > + name: 'tzmode', > > + inputValue: '__default__', > > + boxLabel: gettext('Container managed'), > > + checked: true, > > + }); > > + items.push({ > > + xtype: 'radiofield', > > + name: 'tzmode', > > + inputValue: 'host', > > + boxLabel: gettext('Use host settings'), > > + }); > > + items.push({ > > + xtype: 'radiofield', > > + name: 'tzmode', > > + inputValue: 'select', > > + boxLabel: gettext('Select a timezone'), > > + listeners: { > > + change: function(f, value) { > > + if (!this.rendered) { > > + return; > > + } > > + let timezoneSelect = me.down('field[name=timezone]'); > > + timezoneSelect.setDisabled(!value); > > + }, > > + }, > > + }); > > + items.push({ > > + xtype: 'combobox', > > + itemId: 'tzlist', > > + fieldLabel: gettext('Time zone'), > > + disabled: true, > > + name: 'timezone', > > + queryMode: 'local', > > + store: Ext.create('Proxmox.data.TimezoneStore'), > > + displayField: 'zone', > > + editable: true, > > + anyMatch: true, > > + forceSelection: true, > > + allowBlank: false, > > + }); > > + > > + me.items = items; > > + > > + me.callParent(); > > + }, > > +}); > > > _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel