ru.coon 2.5.27 → 2.5.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # Version 2.5.29, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6b52df8476b55361b79c0484edffa53e9fc9d170)
2
+ * ## Fixes
3
+ * <span style='color:red'> BFL-8598 убраны серые звездочки, при валидности поля</span> ([c36dc2], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c36dc2b38c4cea6c33829a694ad803b10d606c56))
4
+ * <span style='color:red'> BFL-8598 убраны серые звездочки, при валидности поля</span> ([a3cbbe], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a3cbbe27e530f023d39d3478373a45252b601816))
5
+
6
+ * update: CHANGELOG.md ([104edb], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/104edb305212754136d1ae57beaec1e9052dac80))
7
+
8
+ # Version 2.5.28, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1234c97e665cf63c2ab2a4a0048f26b99c815f04)
9
+ * ## Fixes
10
+ * <span style='color:red'> TR-67140 method renamed</span> ([129cb9], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/129cb965f9c1be60ca5ba877f35eedbead2dc815))
11
+
12
+ * upd ([bb428e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bb428e586bc5a72cdc5f9e84f9195f34c508276f))
13
+ * update: CHANGELOG.md ([9de895], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9de895f725e09a81ca3ff01d6820e64efa73a919))
14
+
1
15
  # Version 2.5.27, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/fcd4e0950fe72a254f300c150d37283487a172c1)
2
16
  * ## Fixes
3
17
  * <span style='color:red'>Fix:HT-7001 override setValue in ReportLookupCombo</span> ([794a19], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/794a199b1fc5488a5519db1fb9b03328f85a84b7))
@@ -85,8 +99,10 @@ fix ReportPropertiesPanelController</span> ([e2b928], [link](http://gitlab-dbr.s
85
99
  * ## Features
86
100
  * <span style='color:green'>feat: Добавлена возможность использовать параметры с filterPanel. Closes BFL-8098.</span> ([5b1fd5], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5b1fd503a24a3ff6c18f0fadffc1f6e3fd360ddc))
87
101
  * <span style='color:green'>feat: Добавлена возможнось автоматически изменять размеры окна в зависимости от размеров открываемой панели. Related to BFL-7771.</span> ([5d7560], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5d756008132baf464fc924a8c0bb58ef0c3ed27d))
102
+ * <span style='color:green'>feat: TR-67140 доработка RequiredFlagPlugin</span> ([ae6581], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ae65810543f27e094d5d8a026c47a47edc7768a3))
88
103
  * <span style='color:green'>feat: CRM-7705 add tooltip to checkboxes on DynamicCheckboxGroup</span> ([dddc4d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/dddc4d3f8d8e4f6ca7d5e9c892431b1c6fba6ae5))
89
104
  * <span style='color:green'>Feat:TR-67289 Включил возможность авторизации по гит токену</span> ([b9505b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b9505baa99ee5f5785e6da287063774918f0d698))
105
+ * <span style='color:green'>feat: TR-67140 разработка универсальной компонент-формы для обработки статуса требуемых полей</span> ([20e76d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/20e76d097db4ddf9120ddc56f86b6470ab7335ca))
90
106
  * <span style='color:green'>feat BFL-7734: передача headers в ASyncBaseCommand</span> ([ed1202], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ed1202d1f90cb9c73bd858598a28f63b519642c7))
91
107
 
92
108
  * ## Fixes
@@ -117,17 +133,24 @@ ReportPropertiesPanelController.buildPropertiesTreeData was losing property "key
117
133
  - prevent native BoundList popup after select record
118
134
  - decomposing initComponent
119
135
  - add some specifications</span> ([be963d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/be963d7435441dcbf5adb8db81d764bdf22516b9))
136
+ * <span style='color:red'> TR-67140 поддержка реконфигурации полей</span> ([d347aa], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d347aa2a9b2f02a130fb5745af99552b65e9adcd))
120
137
 
121
138
  * remove sass/example path from eslint and gitignored ([31c40c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/31c40c762968c7ec3d824b270bba70d28a4958b1))
139
+ * upd ([523148], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5231484d8d8a999ce8e5f4430bf5f83ae71be130))
122
140
  * update: CHANGELOG.md ([65d101], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/65d10184c4d288dd083ff31880e560dab4a764e7))
123
141
 
124
142
  # Version 2.5.14, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1c5a4296f1a7a2649f02deb68e05542aa6185f10)
125
143
  * ## Fixes
126
144
  * <span style='color:red'> HT-7017 linter</span> ([264cac], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/264cac926d75d4c68805a4904828ebb26b9b7979))
127
145
  * <span style='color:red'> HT-7017 GridEditButtons исправлено создание кнопки при отсутствии initialConfig</span> ([510cac], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/510cac7188bebbf9a92944a95f9cfceb668436a1))
146
+ * <span style='color:red'> исправление ReportGroupsFieldValidationPlugin при отсутсвии параметров, исправление поведение * когда параметры "ИЛИ"</span> ([87ef01], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/87ef010ef0197e837dc353055b76a9c8f427db9d))
147
+ * <span style='color:red'> TR-67140 обработка чек-боксов и радио групп</span> ([aca447], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/aca4477e3d24ace1eea5fdf18a774b674dd4f900))
128
148
 
129
149
  * ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update src/report/plugin/grid/GridEditButtons.jsffc544232e87d74e648fe17d11f0038f3e73e2cb))
150
+ * upd ([5c52f7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5c52f7fc7e44e33988d2cd7eee787bf6470af3e5))
130
151
  * upd ([d30f44], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d30f449e6b5c3525a66a1faa2ef67ecda3832d20))
152
+ * upd ([86dfa1], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/86dfa17be5a109869f890cc3f4c223f2ee02d802))
153
+ * upd ([f4b797], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f4b797b2b4a4a9f5e5be507ac2f2eadfd8bd4e02))
131
154
  * refactoring ([62c1c2], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/62c1c27d5a75ebb37409d98a8ac486cbe2c1e978))
132
155
  * update: CHANGELOG.md ([71a489], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/71a489f22f186bd675cafde8f01fc089566de2f9))
133
156
 
@@ -137,7 +160,13 @@ ReportPropertiesPanelController.buildPropertiesTreeData was losing property "key
137
160
  * <span style='color:green'>feat: HT-6957 Сохранение сворачивания структуры конфигурации панели при редактировании</span> ([59990a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/59990a0b6ae662624d551ce206ab02f15bcd843a))
138
161
 
139
162
  * ## Fixes
163
+ * <span style='color:red'> TR-67140 переименование функций</span> ([531fa1], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/531fa1ee8ec89f876e7ee68ae912a206a2761a39))
164
+ * <span style='color:red'> TR-67140 доработка формы</span> ([b5c3db], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b5c3db369182c7d9b827427580cf8c0842aae14d))
140
165
  * <span style='color:red'> this.plugins не пересоздается при создании экземпляра TypedCharacteristicEditor</span> ([37167d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/37167d823286d01e7b90039d57e5fcfc843f228d))
166
+ * <span style='color:red'> TR-67140 доработка универсальной компонент-формы для обработки статуса требуемых полей</span> ([294681], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/294681e202244355280a03f7b9230699f5b7a3b3))
167
+ * <span style='color:red'> TR-67140 доработка универсальной компонент-формы для обработки статуса требуемых полей</span> ([133feb], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/133febffbff133519c1a5c6ba86e5d6870060e3a))
168
+ * <span style='color:red'> TR-67140 рефакторинг</span> ([cb4e9e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cb4e9ea50f4a724a70b211c35bfa01f6ac9aa447))
169
+ * <span style='color:red'> TR-67140 рефакторинг</span> ([4c8a53], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/4c8a532875fd7226a73eb1d91f19d9ef8c468769))
141
170
  * <span style='color:red'> При использовании AddidionalParametersPanel параметры всегда преобразовывались в json, независимо от наличия jsonData. Related to BFL-7771.</span> ([4d8091], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/4d809127ad310b19fbe96bcee3d37855d410619e))
142
171
 
143
172
  * upd ([9c5433], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9c543365e09b2f9736f41ff602c15ef57e5d9f36))
@@ -145,18 +174,26 @@ ReportPropertiesPanelController.buildPropertiesTreeData was losing property "key
145
174
  * revert changes ([fc528a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/fc528a2298acf08d8ab4cce8d84accad7dc1e33e))
146
175
  * revert changes ([4e4a73], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/4e4a73bb5432c6fcac589b34b001d8aa401c5477))
147
176
  * TR-66400 Добавлен триггер очистки. Убрана неиспользуемая переменная. Исправлена ошибка логики выполнения проверки существованию UI элемента. ([b53382], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b53382c2eb9228c55a948ce365aeff177e3ad857))
177
+ * ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update RequiredWatcherForm.js44b47853aaea5a9ac09be75fc262e4e008bc040d))
148
178
  * update: CHANGELOG.md ([3f5713], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/3f5713a9a003bd789e7595388f94ec54c17c19d4))
149
179
 
150
180
  # Version 2.5.12, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/604d178d5d06bbc2ccd6a9c288b56a7faf189caa)
151
181
  * ## Fixes
152
182
  * <span style='color:red'> TR-67183 Исправлен доступ к асинхронному свойству компонента ReportPickerLookupCombo.</span> ([efe34e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/efe34e7717872f6ab35b04216f5a9112887917f6))
153
183
  * <span style='color:red'> Fix adding duplicate plugins. Related to BFL-7771.</span> ([a133c7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a133c7677c770b78b3b3145585a8e9679b32b828))
184
+ * <span style='color:red'> TR-67140 рефакторинг</span> ([7dd84d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7dd84d8df4015a678acc0ec4d073a068decf5816))
185
+ * <span style='color:red'> TR-67140 доработка компонента-формы для обработки статуса требуемых полей</span> ([c2c0ed], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c2c0ed4978017bb419f42bc3340a91c2b1753ab0))
186
+ * <span style='color:red'> TR-67140 доработка компонента-формы для обработки статуса требуемых полей</span> ([1893a5], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1893a5ef3a1cfd1f8c90a2789f2120ca970c2e04))
187
+ * <span style='color:red'> TR-67140 доработка компонента-формы для обработки статуса требуемых полей</span> ([bde6b6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bde6b6d18ef03f6be510e2739e8e4b3c2bd38781))
154
188
 
155
189
  * upd ([9b2670], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9b2670ce6c4dd69a6517bf36995d5ac812178a03))
156
190
  * upd ([6521a4], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6521a4d05e8d41ce10619f05ed64d789a329743f))
157
191
  * update: CHANGELOG.md ([0535f6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0535f65ceee74c1535c2c7fa37602e70d5acf95c))
158
192
 
159
193
  # Version 2.5.11, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d3146166caf00237f23ad13b05c93f958a39d3a5)
194
+ * ## Features
195
+ * <span style='color:green'>feat: TR-67140 add SmartContainer</span> ([08480c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/08480c71aba6fe3c470750cfafd74fbfb9222eab))
196
+
160
197
  * ## Fixes
161
198
  * <span style='color:red'> UI fixes. Related to BFL-7771.</span> ([aeedf7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/aeedf7bd6565451c3a1e5b680995c59c5b2fb1e8))
162
199
 
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.5.27",
7
+ "version": "2.5.29",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -0,0 +1,135 @@
1
+ Ext.define('Coon.common.panel.SmartForm', {
2
+ extend: 'Ext.form.Panel',
3
+ xtype: 'SmartForm',
4
+
5
+ config: {
6
+ buttonId: 'submitButton',
7
+ bindToModel: undefined,
8
+ },
9
+
10
+ initComponent: function() {
11
+ this.callParent(arguments);
12
+
13
+ this.componentsInvalid = new Set();
14
+
15
+ this.fields = this.query('field');
16
+ for (const field of this.fields) {
17
+ if (field.xtype === 'radiofield') {
18
+ const radioGroup = field.up('radiogroup');
19
+ if (radioGroup.findPlugin('RequiredFlagPlugin')) {
20
+ continue;
21
+ }
22
+ radioGroup.addPlugin('RequiredFlagPlugin');
23
+ this.handleComponentInit(radioGroup);
24
+ } else {
25
+ field.addPlugin('RequiredFlagPlugin');
26
+ this.handleComponentInit(field);
27
+ }
28
+ }
29
+
30
+ this.on('reconfigureComponents', this.reconfigureComponents, this);
31
+ },
32
+
33
+ reconfigureComponents: function() {
34
+ for (const field of this.fields) {
35
+ if (field.xtype === 'radiofield') {
36
+ const radioGroup = field.up('radiogroup');
37
+ radioGroup.isRequiredPropChanged() && this.changeComponentsInvalid(radioGroup);
38
+ } else {
39
+ field.isRequiredPropChanged() && this.changeComponentsInvalid(field);
40
+ }
41
+ }
42
+ this.isFormValid();
43
+ },
44
+
45
+ isComponentInvalid: function(component) {
46
+ const isEmpty = Ext.isObject(component.getValue()) ? Ext.Object.isEmpty(component.getValue()) : !component.getValue();
47
+ return (!component.isValid() || isEmpty) &&
48
+ !component.isHidden() &&
49
+ component.isRequired;
50
+ },
51
+
52
+ changeComponentsInvalid: function(component) {
53
+ if (this.isComponentInvalid(component)) {
54
+ this.componentsInvalid.add(component.id);
55
+ component.setFlagColor(component.requiredFlagColor);
56
+ !component.getValue() && component.clearInvalid();
57
+ } else {
58
+ this.componentsInvalid.delete(component.id);
59
+ if (Ext.isFunction(component.setFlagColor)) {
60
+ component.setFlagColor('gray');
61
+ }
62
+ }
63
+ },
64
+
65
+ handleComponentInit: function(component) {
66
+ component.on('show', this.handleComponentValidation, this);
67
+ component.on('hide', this.deleteHiddenComponent, this);
68
+ component.on('change', this.handleComponentValidation, this);
69
+ this.changeComponentsInvalid(component);
70
+ },
71
+
72
+ deleteHiddenComponent: function(component) {
73
+ if (!component.isRequired) {
74
+ return;
75
+ }
76
+ this.componentsInvalid.delete(component.id);
77
+ this.isFormValid();
78
+ },
79
+
80
+ handleComponentValidation: function(component) {
81
+ const isComponentValid = component.isValid() && component.getValue();
82
+
83
+ if (!component.isRequired || component.valid === isComponentValid) {
84
+ return;
85
+ }
86
+
87
+ component.valid = isComponentValid;
88
+
89
+ component.setFlagColor(isComponentValid ? 'gray' : component.requiredFlagColor);
90
+
91
+ if (isComponentValid) {
92
+ this.componentsInvalid.delete(component.id);
93
+ } else {
94
+ this.componentsInvalid.add(component.id);
95
+ }
96
+
97
+ this.isFormValid();
98
+ },
99
+
100
+ isFormValid: function() {
101
+ const isValid = this.componentsInvalid.size === 0;
102
+
103
+ this.fireEvent('smartvaliditychange', !isValid);
104
+
105
+ this.changeFormStatus(isValid);
106
+
107
+ return isValid;
108
+ },
109
+
110
+ changeFormStatus: function(isFormValid) {
111
+ if (this.bindToModel) {
112
+ this.lookupViewModel().set(this.bindToModel, !isFormValid);
113
+ }
114
+
115
+ const button = this.getButton();
116
+ button && button.setDisabled(!isFormValid);
117
+ },
118
+
119
+ getButton: function() {
120
+ const referenceButton = this.query(`[reference = ${this.buttonId}]`)[0];
121
+ if (referenceButton) {
122
+ return referenceButton;
123
+ }
124
+
125
+ const buttonId = this.query(`[itemId = ${this.buttonId}]`)[0];
126
+ if (buttonId) {
127
+ return buttonId;
128
+ }
129
+
130
+ const buttonSubmit = this.query(`[itemId = submitButton]`)[0];
131
+ if (buttonSubmit) {
132
+ return buttonSubmit;
133
+ }
134
+ },
135
+ });
@@ -14,13 +14,32 @@ Ext.define('Coon.common.plugin.form.RequiredFlagPlugin', {
14
14
  init: function(field) {
15
15
  this.field = field;
16
16
  this.field.validate = Ext.Function.createSequence(this.field.validate, this.animateInvalidField, this);
17
- this.initHighlightRequiredField();
17
+ const isRequired = this.isRequired();
18
+ this.setFieldFlag(isRequired);
19
+ this.extendFieldBehavior();
18
20
  },
19
21
 
20
- initHighlightRequiredField: function() {
21
- // Если поле обязательно к заполнению, то его поведение меняется
22
- if (this.field.allowBlank === false || this.field.validateBlankByPlugin) {
23
- this.extendFieldBehavior();
22
+ isRequired: function() {
23
+ return this.field.allowBlank === false || this.field.validateBlankByPlugin || this.field.required === true;
24
+ },
25
+
26
+ setFieldFlag: function(isRequired) {
27
+ const field = this.field;
28
+ field.isRequired = isRequired;
29
+ if (isRequired) {
30
+ field.afterLabelTextTpl = `<span class='required-flag'>*</span>`;
31
+ } else {
32
+ field.afterLabelTextTpl = `<span class='required-flag'></span>`;
33
+ }
34
+ },
35
+
36
+ changeFieldFlag: function(isRequired) {
37
+ const field = this.field;
38
+ field.isRequired = isRequired;
39
+ if (isRequired) {
40
+ field.getEl().dom.querySelector('.required-flag').textContent = '*';
41
+ } else {
42
+ field.getEl().dom.querySelector('.required-flag').textContent = '';
24
43
  }
25
44
  },
26
45
 
@@ -38,14 +57,33 @@ Ext.define('Coon.common.plugin.form.RequiredFlagPlugin', {
38
57
  this.getEl().dom.querySelector('.required-flag').style.color = color;
39
58
  }.bind(field);
40
59
 
60
+ field.isRequiredPropChanged = function() {
61
+ const isRequired = this.isRequired();
62
+ if (isRequired === field.isRequired) {
63
+ return false;
64
+ }
65
+
66
+ this.changeFieldFlag(isRequired);
67
+
68
+ return true;
69
+ }.bind(this);
70
+
71
+ field.changeFieldFlag = function(isRequired) {
72
+ const field = this.field;
73
+ field.isRequired = isRequired;
74
+ if (isRequired) {
75
+ field.getEl().dom.querySelector('.required-flag').textContent = '*';
76
+ } else {
77
+ field.getEl().dom.querySelector('.required-flag').textContent = '';
78
+ }
79
+ }.bind(this);
80
+
41
81
  field.on('afterrender', function(fld) {
42
82
  if (fld.lastFlagColor) {
43
83
  fld.setFlagColor(fld.lastFlagColor);
44
84
  }
45
85
  },
46
86
  this, {single: true});
47
-
48
- field.afterLabelTextTpl = `<span class='required-flag' style='color: ${this.requiredFlagColor};'>*</span>`;
49
87
  },
50
88
 
51
89
  /**
@@ -274,8 +274,10 @@ Ext.define('Coon.report.component.reportpanel.FilterPanel', {
274
274
  if (this.enableHighlightingRequiredFields) {
275
275
  if (Ext.isFunction(this.validateGroups)) {
276
276
  const validateResult = this.validateGroups();
277
- isValid = validateResult.valid;
278
- invalidMessage = validateResult.invalidMessage;
277
+ if (validateResult) {
278
+ isValid = validateResult.valid;
279
+ invalidMessage = validateResult.invalidMessage;
280
+ }
279
281
  } else {
280
282
  const fields = this.query('[allowBlank=false][hidden=false]');
281
283
  const wrapFieldNames = function(field) {
@@ -295,7 +297,6 @@ Ext.define('Coon.report.component.reportpanel.FilterPanel', {
295
297
  }
296
298
  this.searchButtonToggle(isValid, ` ${invalidMessage}`); // <span style="font-weight: bold">Заполните поля:</span>
297
299
  }
298
-
299
300
  return isValid;
300
301
  },
301
302
 
@@ -106,6 +106,7 @@ Ext.define('Coon.report.plugin.form.ReportGroupsFieldValidationPlugin', {
106
106
  this.fields.forEach((field) => { // Поставить все звездочки
107
107
  if (field.setFlagColor && typeof field.setFlagColor === 'function') {
108
108
  field.setFlagColor(this.requiredFieldColorState2);
109
+ field.changeFieldFlag(!valid);
109
110
  }
110
111
  });
111
112
  }
@@ -135,6 +136,7 @@ Ext.define('Coon.report.plugin.form.ReportGroupsFieldValidationPlugin', {
135
136
  if (currentField && Ext.isEmpty(currentField.getValue())) {
136
137
  valid = false;
137
138
  }
139
+ currentField.changeFieldFlag(Ext.isEmpty(currentField.getValue()));
138
140
  currentField.setFlagColor(Ext.isEmpty(currentField.getValue()) ? this.requiredFieldColorState1: this.requiredFieldColorState2);
139
141
  }
140
142
  group.checkResult = this.getCheckResultAnd(valid, group);
@@ -148,11 +150,10 @@ Ext.define('Coon.report.plugin.form.ReportGroupsFieldValidationPlugin', {
148
150
  break;
149
151
  }
150
152
  }
151
- if (valid) {
152
- for (const field of group.children) {
153
- const currentField = this.fields.find((element) => element.name === field.reportParameterCd);
154
- currentField.setFlagColor(this.requiredFieldColorState2);
155
- }
153
+ for (const field of group.children) {
154
+ const currentField = this.fields.find((element) => element.name === field.reportParameterCd);
155
+ currentField.changeFieldFlag(!valid);
156
+ currentField.setFlagColor(valid ? this.requiredFieldColorState2 : this.requiredFieldColorState1);
156
157
  }
157
158
  group.checkResult = this.getCheckResultOr(valid, group);
158
159
  return group.invertValue ? !valid : valid;
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '2.5.27',
3
+ number: '2.5.29',
4
4
  });