follow the logic we use in file selectors of the PVE gui, i.e., allow editable but force a match and do not allow blank, this lets quick filter this big list instead of scrolling, and searching if something appears or not, even if one is may not be sure if/how this was sorted... Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
		
			
				
	
	
		
			39 lines
		
	
	
		
			694 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			694 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
Ext.define('Proxmox.node.TimeEdit', {
 | 
						|
    extend: 'Proxmox.window.Edit',
 | 
						|
    alias: ['widget.proxmoxNodeTimeEdit'],
 | 
						|
 | 
						|
    subject: gettext('Time zone'),
 | 
						|
 | 
						|
    width: 400,
 | 
						|
 | 
						|
    autoLoad: true,
 | 
						|
 | 
						|
    fieldDefaults: {
 | 
						|
	labelWidth: 70
 | 
						|
    },
 | 
						|
 | 
						|
    items: {
 | 
						|
	xtype: 'combo',
 | 
						|
	fieldLabel: gettext('Time zone'),
 | 
						|
	name: 'timezone',
 | 
						|
	queryMode: 'local',
 | 
						|
	store: Ext.create('Proxmox.data.TimezoneStore'),
 | 
						|
	displayField: 'zone',
 | 
						|
	editable: true,
 | 
						|
	anyMatch: true,
 | 
						|
	forceSelection: true,
 | 
						|
	allowBlank: false
 | 
						|
    },
 | 
						|
 | 
						|
    initComponent : function() {
 | 
						|
	var me = this;
 | 
						|
 | 
						|
	if (!me.nodename) {
 | 
						|
	    throw "no node name specified";
 | 
						|
	}
 | 
						|
	me.url = "/api2/extjs/nodes/" + me.nodename + "/time";
 | 
						|
 | 
						|
	me.callParent();
 | 
						|
    }
 | 
						|
});
 |