the translation of extjs has not been applied
at the time of class declaration, so that
the weekdays were always "Sunday", "Monday", etc.
when we declare them in initComponent, the translations are there
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
move valueField and displayField to class config, else the value
of the selection wont show up when selecting it.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
we wrongly assumed, that no compression argument for
vzdump meant 'no compression', instead it means 'lzo'
this patch mirrors that behaviour on the gui
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
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>
the intial value of the node selector is null,
but when the store is loaded, it becomes an empty array
this triggers the 'dirtychanged' event and causes
the edit windows to enable the OK/Submit Button,
even when no change is made
this fix sets the default value to an empty array,
which fixes the mentioned behaviour
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
we have to move the static fields to the class
configuration, otherwise the combobox does not work
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
we used a custom 'data' property to pass around the items to
add to the store, but this property is now used by ExtJS to
store content for the component template
also move to declarative style, saves lines
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>
we used an empty value for the Key-Value ComboBox for defaults.
With extjs6, if the idProperty of a model is empty, they generate
a name for it, which breaks our logic for submitting
(currently we checked if this is empty, and send a delete command
to our api)
instead, we use the value 'default' and check for it when we submit
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
this fixes two problems:
* we were loading the store before the parent ComboGrid class could put
a listener on the load event
* displayField must now be set in class body, take opportunity to move out
what we can of the mega initComponent()
this two fixes allow the HA GroupEdit Window to properly display the
existing members of a HA Group when editing group membership
this also fixes the problem that the method
Ext.ComponentQuery.query() was outputting a warning
since it did not know if it should perform a lookup
for a class name or a xtype
ExtJS6 requires a stateId if we want to save the component state
(seems it is not autogenerated anymore from 'id')
this fix the selection of timeframes in the Summary View
also move properties out of initComponent()
also remove code which duplicates framework code:
setting stateEvents to 'select' will save the component state
after a selection by calling applyState()/getState() automatically
so we don't need to specify a callback ourselves and we don't need
the testChange() method since applyState() will be called anyway
Also moves to full declarative style for
IPProtocolSelector, saves 11 lines of of boilerplate code
(works when the store is local and not pulled over the API)
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.
listen to 'activate' event is needed because of framework changes,
similar to c0b3df6e34
ext6migrate: listen to 'activate' events for panels inside a tabpanel
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.
The use of this field raise an error with ExtJS6 because it is not
unique inside the application.
Removing this is safe, because we never query the Comment column
with an id.
This fixes a nasty bug where an initial click on the ViewSelector
trigger would display the picker but hide it immediatly afterwards.
What was happening behind the scene, is that without queryMode 'local',
the store bound to the picker was loaded on each picker display.
Loading the store would then trigger our onLoad() override in ToolKit.js
which called setValue(), which fired a bunch of unwanted events
including 'collapse'.
It is safe here not to call onLoad() to set an initial value, because
the initial value is set in initComponent() (value: groupdef[0][0])
Some fields need to be processed by initConfig(),
which will be run before initComponent() in the
component lifecycle.
This fix the problem of the Selector default value
whihc was not loading.
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.
This fixes the problem that this ComboGrid was displayed with an empty value
( similar the to the Keyboard Selection and Realm Selection in the login window)
An component id 'comment' is already defined for the column Comment of UserView.js causing here a conflict.
It seems ExtJS6 is more stringent about that than ExtJS4.