170 Commits

Author SHA1 Message Date
Emmanuel Kasper
3eb70ea3b5 rename component 'id' property to 'stateId'
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
2016-02-23 12:54:17 +01:00
Emmanuel Kasper
82a7467bc4 ext6migrate: set valueField as a class property
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)
2016-02-15 12:28:13 +01:00
Emmanuel Kasper
48cf541624 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
66832e3f2c ext6migrate: last fixes for firewall
listen to 'activate' event is needed because of framework changes,
similar to 66162fe4a96ddc8c42c61b6d4cf41edda68210af

ext6migrate: listen to 'activate' events for panels inside a tabpanel
2016-02-09 07:29:31 +01:00
Emmanuel Kasper
5de2d4e94a 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
4dd6d1a45a 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
b09817ffe8 ext6migrate: push array elements separately 2016-02-04 18:04:53 +01:00
Emmanuel Kasper
a3fd6f1a5b ext6migrate: remove 'comment' id from Comment column in our tables
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.
2016-01-28 11:16:55 +01:00
Emmanuel Kasper
dc7505c2aa ext6migrate: fix picker dropdown on ViewSelector initial load
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])
2016-01-27 16:53:12 +01:00
Emmanuel Kasper
fda3053325 ext6migrate: move static fields to class body
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.
2016-01-27 09:16:58 +01:00
Emmanuel Kasper
9bcb88aaa2 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
c6776f3c38 cleanup previous patch 2016-01-22 11:24:29 +01:00
Emmanuel Kasper
57277d9428 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
f3dc6957d6 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
Emmanuel Kasper
16251ba9f6 Ext6migrate: move static configuration from instantiation time to class declaration time.
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)
2016-01-22 11:24:24 +01:00
Emmanuel Kasper
f74e271ee5 Ext6migrate :remove unused column ID
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.
2016-01-22 11:24:23 +01:00
Emmanuel Kasper
27c3bc7fc6 Correct whitespaces and comment non obvious class properties 2016-01-22 11:24:14 +01:00
Emmanuel Kasper
01c33792f9 ext6migrate: move class static properties out of initComponent()
This fixes the Auth realm selection while login with ExtJS6
2016-01-22 11:24:13 +01:00
Emmanuel Kasper
dab1eabac7 ext6migrate: move static class properties out of initComponent()
Besides fitting more with the declarative style of ExtJS, this has the
interesting side effect of allowing comboboxes to work with ExtJS6
2016-01-22 11:24:13 +01:00
Dietmar Maurer
bd5d277292 rename manager5 to manager6 2016-01-22 11:24:10 +01:00