fix format of commit
f2a6ce6cf1
(space before 'load')
also fix trailing whitespaces in those files
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
when we click on a node/container/vm and quickly
click on something else, there might be a race condition,
where the store finished loading and we try to change
dom elements, which are not there anymore
so we change the store.on to me.mon, which
deletes the handler when the component is gone
in the logview panel we use API2Request, where
we cannot do this, so we check if the component
is destroyed manually
also we change this whenever we change a dom element
in a callback
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
if one selected an item in a ComboGrid which was already selected,
the ComboGrid would not close (as expected), this patch fixes this
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
The ComboGrid combonent requires row-like selection something that
the default ExtJS Ext.selection.DataViewModel used for ComboBox cannot do.
This requires overriding the protected method onBindStore() where the selection
model is set.
up to now we were only updating the picker selection when the picker
was created, which means that subsequent changes in the text field were
not propagated to the drop-down list
This patch creates a private syncSelection() method which is called each time
the picker is shown
This is roughly based on the ExtJS 4 ComboBox behaviour
The IPrefSelector ComboGrid can have selected values which are not backed
by the component store, ie the store only contains IP aliases, but
the ComboGrid can contain an IP adress not registered as an IP alias.
In that case we should not try to update the selection in the dropdown,
as the dropdown only knows about the component store.
Implementation is similar to the syncSelection() private method of the
ExtJS4 ComboBox.
Instead of extending the framework ComboBox, we extend the abstract
parent class Picker, so we don't rely on private methods ( and hopefull survive the
next ExtJS upgrade )
Usability improvement:
The selection model is now a checkboxmodel, which makes more clear to the user that
we can select more than one element in the list.
The Picker of the ComboBox, has by default a maxHeight of 300 px. If the list of elements is bigger that 300 pixels, then a scrollbar will be added.
This behaviour was broken with ExtJS4, but now works correctly with ExtJS6.