Commit Graph

11 Commits

Author SHA1 Message Date
Dominik Csapak
540fdc8b1e formatting and trailing whitespaces fix
fix format of commit
f2a6ce6cf1
(space before 'load')

also fix trailing whitespaces in those files

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-15 16:31:02 +01:00
Dominik Csapak
f2a6ce6cf1 ext6migrate: fix store load race condition
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>
2016-03-14 17:16:37 +01:00
Dominik Csapak
ab6a78a23f ext6migrate: fix selection of ComboGrid
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>
2016-03-04 06:13:22 +01:00
Emmanuel Kasper
a263665b16 Ext6migrate: Update our ComboGrid component to work with ExtJS6
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.
2016-02-15 12:25:17 +01:00
Emmanuel Kasper
cee050e2a1 ext6migrate: fix minor selection bug in the ComboGrid
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
2016-02-04 18:07:00 +01:00
Emmanuel Kasper
61bd788866 ext6migrate: fix IPRefSelector ComboGrid
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.
2016-02-04 18:05:54 +01:00
Emmanuel Kasper
ed9ea0f563 Apply listConfig parameters when the picker is created, not when the component is created.
This fix the problem that multiple ComboGrids were displaying the same listConfig.
2016-01-22 11:24:29 +01:00
Dietmar Maurer
cbaae277f0 cleanup previous patch 2016-01-22 11:24:29 +01:00
Emmanuel Kasper
effd0b0a8b ext6migrate: Update our ComboGrid component to work with ExtJS6
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.
2016-01-22 11:24:28 +01:00
Emmanuel Kasper
2ad16f261f Do not try to enforce a Picker size manually, let the framework do it
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.
2016-01-22 11:24:25 +01:00
Dietmar Maurer
bac5bd135c rename manager5 to manager6 2016-01-22 11:24:10 +01:00