[pve-devel] [PATCH manager 02/19] use ComboGrid from proxmox-widget-toolkit

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Jan 8 12:10:53 CET 2018


On 12/21/17 1:36 PM, Dominik Csapak wrote:
> [snip]
> -    initComponent: function() {
> -	var me = this;
> -
> -	Ext.apply(me, {
> -	    queryMode: 'local',
> -	    matchFieldWidth: false
> -	});
> -
> -	Ext.applyIf(me, { value: ''}); // hack: avoid ExtJS validate() bug
> -
> -	Ext.applyIf(me.listConfig, { width: 400 });
> -
> -        me.callParent();
> -
> -        // Create the picker at an early stage, so it is available to store the previous selection
> -        if (!me.picker) {
> -            me.createPicker();
> -        }
> -

> -	if (me.editable) {
> -	    // The trigger.picker causes first a focus event on the field then
> -	    // toggles the selection picker. Thus skip expanding in this case,
> -	    // else our focus listner expands and the picker.trigger then
> -	    // collapses it directly afterwards.
> -	    Ext.override(me.triggers.picker, {
> -		onMouseDown : function (e) {
> -		    // copied "should we focus" check from Ext.form.trigger.Trigger
> -		    if (e.pointerType !== 'touch' && !this.field.owns(Ext.Element.getActiveElement())) {
> -			me.skip_expand_on_focus = true;
> -		    }
> -		    this.callParent(arguments);
> -		}
> -	    });
> -
> -	    me.on("focus", function(me) {
> -		if (!me.isExpanded && !me.skip_expand_on_focus) {
> -		    me.expand();
> -		}
> -		me.skip_expand_on_focus = false;
> -	    });
> -	}
> -

Above part is missing in proxmox widget toolkit, and I did not found a patch on
the list witch ports it over.
This causes a regression where, e.g., the ISO selector on VM create cannot be
filtered anymore and all other combo grid/boxes witch are editable.

commit bff876ecb5f3388b7d65c491680b9a40574e4744 and commit
851c032d69ad5ae23725dd1add9e4084ebc12650 from pve-manager would need to get
ported over, AFAIS.

If that gets done the changes here look OK.




More information about the pve-devel mailing list