ru.coon 2.6.0 → 2.6.3
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 +27 -0
- package/package.json +1 -1
- package/src/report/component/reportpanel/ReportGrid.scss +1 -1
- package/src/report/component/settings/plugin/ReportFormPluginGridController.js +1 -1
- package/src/report/component/settings/plugin/ReportFormPluginPanelController.js +19 -42
- package/src/report/component/settings/plugin/ReportFormPluginSettings.js +101 -2
- package/src/report/plugin/configPanel/BasePluginConfig.js +3 -0
- package/src/report/plugin/configPanel/UpdateGridPluginConfigPanel.js +0 -1
- package/src/report/plugin/grid/GridEditorsPlugin.js +16 -17
- package/src/report/plugin/grid/GridQuickSearchPlugin.js +3 -0
- package/src/report/plugin/util.js +31 -0
- package/src/uielement/plugin/OpenPanelPlugin.js +4 -0
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
# Version 2.6.3, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f79e922e4a2767df64ca69e459661b9e24e9098e)
|
|
2
|
+
* ## Fixes
|
|
3
|
+
* <span style='color:red'>fix uiElement/get request</span> ([edac67], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/edac674cb5d023de5ad274262db6d619de7d50fd))
|
|
4
|
+
* <span style='color:red'> Added 'nullable' then using command.GetUIElementCommand. Related to TR-67200.</span> ([dbc2bb], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/dbc2bbb53c333bab4d0e659cc4118de4e920a299))
|
|
5
|
+
|
|
6
|
+
* update: CHANGELOG.md ([1e55ff], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1e55ff88b8c2f2a8c0b71674c719a0daa1e2dbc3))
|
|
7
|
+
|
|
8
|
+
# Version 2.6.2, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b12213a59d39c7fd13513b74268eb902a0c86720)
|
|
9
|
+
* ## Features
|
|
10
|
+
* <span style='color:green'>feat: Добавлено редактирование значений по умолчанию для плагинов. Closes TR-67200.</span> ([cd9502], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cd950235c2b0180f2b73fb87dc3b05a4f5b397ae))
|
|
11
|
+
|
|
12
|
+
* ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update src/report/component/settings/plugin/ReportFormPluginPanelController.jsb52d37cb6c33e6a74d2f3d7cae1654f93b60a2e1))
|
|
13
|
+
* update: CHANGELOG.md ([bb6944], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bb6944320af0388b296ad97429195c6188908738))
|
|
14
|
+
|
|
15
|
+
# Version 2.6.1, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2b7d5d8cd09bf94320d149f9cf3aa78ef27594a8)
|
|
16
|
+
* ## Fixes
|
|
17
|
+
* <span style='color:red'> HT-7281 GridEditorPlugin editor dependField</span> ([e9c537], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e9c53704ee957042292ed639343bf217c8cdeca8))
|
|
18
|
+
|
|
19
|
+
* HT-8006 hotfix ([6569c3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6569c3b6e197471fabb6af4da5c3212fd7079be2))
|
|
20
|
+
* update: CHANGELOG.md ([e7b502], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e7b50227f8ddeaac7322ce3e436c2c0b5fd12163))
|
|
21
|
+
|
|
1
22
|
# Version 2.6.0, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/78a28499d4ba7dc466ba5ff5a4b815d191c349bf)
|
|
2
23
|
* ## Features
|
|
3
24
|
* <span style='color:green'>feat: HT-7986: chars editor interface upgrade</span> ([9af20a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9af20aa30d2b1fa494994e0cf7d84b26b19604e0))
|
|
@@ -13,6 +34,9 @@
|
|
|
13
34
|
* <span style='color:green'>feat: HT-7969: view group description, fix fields name in chain</span> ([e19b98], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e19b98356ac3738d40afdd92401d8433d3b86056))
|
|
14
35
|
|
|
15
36
|
* Resolve HT-7568 ([eb0297], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/eb0297d1927ae6e2d3a8d492d368d5ea7bef89ef))
|
|
37
|
+
* Revert "feat: Добавлено предупреждение при выборе дефолтной конфигурации плагина. Closes TR-67200."
|
|
38
|
+
|
|
39
|
+
This reverts commit 92855b1225a747f15d977c0f23c8d9794523352d. ([312854], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/312854f7d59d711c9921f394c6849d398e529e10))
|
|
16
40
|
* HT-7882 поддержать возможность передачи свойств редактора х-ки в поле mask в формате json ([ff9d88], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ff9d88c6e8f12d59ea7fd4f8be344696670d13af))
|
|
17
41
|
* update: CHANGELOG.md ([fed09b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/fed09bab2391b2ef0adde36107c4c8e9f8e9ad32))
|
|
18
42
|
|
|
@@ -95,6 +119,9 @@
|
|
|
95
119
|
* update: CHANGELOG.md ([44feda], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/44fedab2d737c9d50e1f3bb802ab16f7af5d581c))
|
|
96
120
|
|
|
97
121
|
# Version 2.5.57, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/98c71c4543fd95e80906b6fff0c955031a86eca1)
|
|
122
|
+
* ## Features
|
|
123
|
+
* <span style='color:green'>feat: Добавлено предупреждение при выборе дефолтной конфигурации плагина. Closes TR-67200.</span> ([92855b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/92855b1225a747f15d977c0f23c8d9794523352d))
|
|
124
|
+
|
|
98
125
|
* ## Fixes
|
|
99
126
|
* <span style='color:red'> CRM-8102 Возвращена настройка additionalFields в SimplestReportCombo и SimpleReportTag</span> ([8a1afb], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8a1afb48b9e6c23b91649a20fc08b7e2405209b0))
|
|
100
127
|
* <span style='color:red'> HT-7440 Исправлено некорректное отображение кнопок maximize/restore при...</span> ([fa605d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/fa605dcd97c3fadd4707b7f72cfdffea616d7a12))
|
package/package.json
CHANGED
|
@@ -72,7 +72,7 @@ Ext.define('Coon.report.component.settings.plugin.ReportFormPluginGridController
|
|
|
72
72
|
|
|
73
73
|
addHandler: function(xtype) {
|
|
74
74
|
const defaultUiElementCd = `${xtype}_DEFAULTS`;
|
|
75
|
-
Coon.util.promisifyCmd('command.GetUIElementCommand', defaultUiElementCd)
|
|
75
|
+
Coon.util.promisifyCmd('command.GetUIElementCommand', defaultUiElementCd, true)
|
|
76
76
|
.then(function(data) {
|
|
77
77
|
this.addNewPlugin(xtype, Ext.decode(data.propertyData, true), defaultUiElementCd);
|
|
78
78
|
}.bind(this))
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Ext.define('Coon.report.component.settings.plugin.ReportFormPluginPanelController', {
|
|
2
2
|
extend: 'Ext.app.ViewController',
|
|
3
3
|
alias: 'controller.reportformpluginpanelcontroller',
|
|
4
|
-
|
|
4
|
+
requires: ['Coon.report.plugin.util'],
|
|
5
5
|
init: function(view) {
|
|
6
6
|
this.getViewModel().bind({bindTo: '{pluginsGrid.selection}'}, this.selectionChange, this);
|
|
7
7
|
this.getViewModel().bind({bindTo: '{report.fields}', deep: true}, this.updateContext, this);
|
|
@@ -16,11 +16,6 @@ Ext.define('Coon.report.component.settings.plugin.ReportFormPluginPanelControlle
|
|
|
16
16
|
|
|
17
17
|
saveState: function() {
|
|
18
18
|
if (this.activeRecord && this.activePanel) {
|
|
19
|
-
this.activePanel.isModified().then((isModified) => {
|
|
20
|
-
if (isModified) {
|
|
21
|
-
// TODO show message
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
19
|
const data = this.activePanel.getData();
|
|
25
20
|
if (data instanceof Promise) {
|
|
26
21
|
const currentRecord = this.lookup('pluginsGrid').getStore().getById(this.activeRecord.get('id'));
|
|
@@ -107,11 +102,24 @@ Ext.define('Coon.report.component.settings.plugin.ReportFormPluginPanelControlle
|
|
|
107
102
|
const record = this.getViewModel().get('pluginsGrid.selection');
|
|
108
103
|
if (record) {
|
|
109
104
|
const xtype = record.get('xtype');
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
105
|
+
try {
|
|
106
|
+
this.activePanel = Ext.create(
|
|
107
|
+
Coon.report.plugin.util.getConfigPanelClassName(
|
|
108
|
+
xtype,
|
|
109
|
+
this.getViewModel().get('formEditor')
|
|
110
|
+
) || 'SpecificPluginConfig',
|
|
111
|
+
{
|
|
112
|
+
readOnly: record.get('readOnly'),
|
|
113
|
+
isNew: record.get('isNew'),
|
|
114
|
+
bind: {
|
|
115
|
+
data: '{pluginsGrid.selection.jsonProperties}',
|
|
116
|
+
},
|
|
117
|
+
}
|
|
118
|
+
);
|
|
119
|
+
} catch (e) {
|
|
120
|
+
Coon.log.log(
|
|
121
|
+
`У UiElement:${record.get('uiElement')} нет type, невозможно определить конфигурацию`
|
|
122
|
+
);
|
|
115
123
|
this.activePanel = Ext.create({
|
|
116
124
|
xtype: 'displayfield',
|
|
117
125
|
value: `данный ${xtype} не найден в списке плагинов, удалите его`,
|
|
@@ -123,37 +131,6 @@ Ext.define('Coon.report.component.settings.plugin.ReportFormPluginPanelControlle
|
|
|
123
131
|
paramPanel.add(this.activePanel);
|
|
124
132
|
return;
|
|
125
133
|
}
|
|
126
|
-
const typePrototype = ptype && Ext.ClassManager.classes[ptype].prototype;
|
|
127
|
-
const classNameField = this.getViewModel().get('formEditor') ? 'configurePanelWizardForFormEditor' : 'configurePanelWizard';
|
|
128
|
-
const className = typePrototype && (typePrototype[classNameField] ||
|
|
129
|
-
(typePrototype.config && typePrototype.config[classNameField]));
|
|
130
|
-
if (className) {
|
|
131
|
-
try {
|
|
132
|
-
const currentClass = Ext.ClassManager.aliasToName['widget.' + className] ||
|
|
133
|
-
Ext.ClassManager.aliasToName['plugin.' + className];
|
|
134
|
-
if (currentClass) {
|
|
135
|
-
this.activePanel = Ext.create(currentClass, {
|
|
136
|
-
readOnly: record.get('readOnly'),
|
|
137
|
-
isNew: record.get('isNew'),
|
|
138
|
-
bind: {
|
|
139
|
-
data: '{pluginsGrid.selection.jsonProperties}',
|
|
140
|
-
},
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
} catch (e) {
|
|
144
|
-
Ext.Msg.alert('Ошибка', 'Панель параметров не определена' + e);
|
|
145
|
-
Coon.log.log(e);
|
|
146
|
-
}
|
|
147
|
-
} else {
|
|
148
|
-
this.activePanel = Ext.create({
|
|
149
|
-
xtype: 'SpecificPluginConfig',
|
|
150
|
-
bind: {
|
|
151
|
-
data: '{pluginsGrid.selection.jsonProperties}',
|
|
152
|
-
},
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
|
|
157
134
|
if (this.activePanel && !this.activePanel.destroyed) {
|
|
158
135
|
paramPanel.add(this.activePanel);
|
|
159
136
|
|
|
@@ -2,12 +2,15 @@ Ext.define('Coon.report.component.settings.plugin.ReportFormPluginSettings', {
|
|
|
2
2
|
extend: 'Coon.common.panel.WindowWrap',
|
|
3
3
|
requires: [
|
|
4
4
|
'Coon.common.panel.UIElementPickerPanel',
|
|
5
|
-
'Coon.report.command.GetDynamicReportDataCommand'
|
|
5
|
+
'Coon.report.command.GetDynamicReportDataCommand',
|
|
6
|
+
'Coon.uielement.command.SaveUIElementCommand'
|
|
6
7
|
],
|
|
7
8
|
xtype: 'ReportFormPluginSettings',
|
|
8
9
|
autoShow: true,
|
|
9
10
|
maximizable: false,
|
|
10
11
|
selection: null,
|
|
12
|
+
resizable: false,
|
|
13
|
+
height: 180,
|
|
11
14
|
viewModel: {
|
|
12
15
|
data: {
|
|
13
16
|
selection: null,
|
|
@@ -17,6 +20,8 @@ Ext.define('Coon.report.component.settings.plugin.ReportFormPluginSettings', {
|
|
|
17
20
|
isConfirmed: false,
|
|
18
21
|
canApply: false,
|
|
19
22
|
isValidating: false,
|
|
23
|
+
defaultPropsIsLoading: true,
|
|
24
|
+
defaultProps: {},
|
|
20
25
|
},
|
|
21
26
|
formulas: {
|
|
22
27
|
isDirty: (get) => {
|
|
@@ -25,14 +30,34 @@ Ext.define('Coon.report.component.settings.plugin.ReportFormPluginSettings', {
|
|
|
25
30
|
},
|
|
26
31
|
},
|
|
27
32
|
constructor(config) {
|
|
33
|
+
let xtype;
|
|
28
34
|
if (config.selection) {
|
|
35
|
+
xtype = config.selection.get('xtype');
|
|
29
36
|
if (!config.title) {
|
|
30
|
-
config.title = 'Настройки плагина ' +
|
|
37
|
+
config.title = 'Настройки плагина ' + xtype;
|
|
31
38
|
}
|
|
32
39
|
}
|
|
33
40
|
this.callParent(arguments);
|
|
34
41
|
const c = this.getController();
|
|
35
42
|
c.vm = this.getViewModel();
|
|
43
|
+
if (xtype) {
|
|
44
|
+
const defaultUiElementCd = `${xtype}_DEFAULTS`;
|
|
45
|
+
c.vm.set('defaultPropsIsLoading', true);
|
|
46
|
+
Coon.util.promisifyCmd('command.GetUIElementCommand', defaultUiElementCd, true)
|
|
47
|
+
.then((data) => {
|
|
48
|
+
this.defaultProps = Ext.decode(data.propertyData, true);
|
|
49
|
+
})
|
|
50
|
+
.catch((e) => {
|
|
51
|
+
// отсутствуют сохраненные настройки по умолчанию
|
|
52
|
+
c.vm.set('isNewDefaultProps', true);
|
|
53
|
+
})
|
|
54
|
+
.finally(() => {
|
|
55
|
+
c.vm.set({
|
|
56
|
+
defaultPropsIsLoading: false,
|
|
57
|
+
defaultProps: this.defaultProps,
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
}
|
|
36
61
|
c.vm.set({
|
|
37
62
|
selection: config.selection,
|
|
38
63
|
newUiElementCd: config.selection && config.selection.get('uiElement'),
|
|
@@ -145,6 +170,71 @@ Ext.define('Coon.report.component.settings.plugin.ReportFormPluginSettings', {
|
|
|
145
170
|
],
|
|
146
171
|
});
|
|
147
172
|
},
|
|
173
|
+
editDefaultsHandler() {
|
|
174
|
+
try {
|
|
175
|
+
const configPanelClassName =
|
|
176
|
+
Coon.report.plugin.util.getConfigPanelClassName(
|
|
177
|
+
this.vm.get('selection.xtype'),
|
|
178
|
+
this.vm.get('formEditor')
|
|
179
|
+
);
|
|
180
|
+
const configPanel = Ext.create(
|
|
181
|
+
configPanelClassName || 'SpecificPluginConfig'
|
|
182
|
+
);
|
|
183
|
+
configPanelClassName && configPanel.setData(this.vm.get('defaultProps'));
|
|
184
|
+
const win = Ext.widget('WindowWrap', {
|
|
185
|
+
title: 'Значения по умолчанию плагина ' + this.vm.get('selection.xtype'),
|
|
186
|
+
autoShow: true,
|
|
187
|
+
bodyPadding: 20,
|
|
188
|
+
height: '90%',
|
|
189
|
+
width: '60%',
|
|
190
|
+
layout: 'fit',
|
|
191
|
+
items: [configPanel],
|
|
192
|
+
buttons: [
|
|
193
|
+
{
|
|
194
|
+
text: 'Закрыть',
|
|
195
|
+
handler() {
|
|
196
|
+
win.close();
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
text: 'Сохранить',
|
|
201
|
+
ui: 'orange-button',
|
|
202
|
+
handler: this.saveDefaultsHandler.bind(this, configPanel),
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
});
|
|
206
|
+
} catch (e) {
|
|
207
|
+
console.error(e);
|
|
208
|
+
Ext.Msg.alert('Ошибка', 'Панель параметров не определена\n' + e);
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
saveDefaultsHandler(configPanel) {
|
|
212
|
+
const xtype = this.vm.get('selection.xtype');
|
|
213
|
+
if (!xtype) {
|
|
214
|
+
Ext.toast('"xtype" is not defined');
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
// configPanel.getData() can return Promise
|
|
218
|
+
Ext.encode(Promise.resolve(configPanel.getData()).then((data) => {
|
|
219
|
+
Coon.util.promisifyCmd('command.SaveUIElementCommand', {
|
|
220
|
+
id: xtype + '_DEFAULTS',
|
|
221
|
+
description: 'default props',
|
|
222
|
+
properties: {},
|
|
223
|
+
propertyData: Ext.encode(data),
|
|
224
|
+
xtype,
|
|
225
|
+
isNew: this.vm.get('isNewDefaultProps'),
|
|
226
|
+
}).then((result) => {
|
|
227
|
+
const defaultProps = Ext.decode(result.propertyData, true);
|
|
228
|
+
const isNewDefaultProps = false;
|
|
229
|
+
this.vm.set({defaultProps, isNewDefaultProps});
|
|
230
|
+
configPanel.setData(defaultProps);
|
|
231
|
+
Ext.toast('Значения по умолчанию сохранены.');
|
|
232
|
+
}).catch((e) => {
|
|
233
|
+
console.error(e);
|
|
234
|
+
Ext.Msg.alert('Ошибка', 'Значения по умолчанию не сохранены.');
|
|
235
|
+
});
|
|
236
|
+
}));
|
|
237
|
+
},
|
|
148
238
|
},
|
|
149
239
|
items: [
|
|
150
240
|
{
|
|
@@ -192,6 +282,15 @@ Ext.define('Coon.report.component.settings.plugin.ReportFormPluginSettings', {
|
|
|
192
282
|
}
|
|
193
283
|
],
|
|
194
284
|
buttons: [
|
|
285
|
+
{
|
|
286
|
+
text: 'Редактировать значения по умолчанию',
|
|
287
|
+
ui: 'blue-button',
|
|
288
|
+
handler: 'editDefaultsHandler',
|
|
289
|
+
bind: {
|
|
290
|
+
disabled: '{defaultPropsIsLoading}',
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
'->',
|
|
195
294
|
{
|
|
196
295
|
text: 'Закрыть',
|
|
197
296
|
ui: 'blue-button',
|
|
@@ -101,6 +101,9 @@ Ext.define('Coon.report.plugin.configPanel.BasePluginConfig', {
|
|
|
101
101
|
}, this);
|
|
102
102
|
this.on('added', (panel) => {
|
|
103
103
|
this.parent = panel.up();
|
|
104
|
+
if (this.parent.isXType('window')) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
104
107
|
this.parent.addTool({
|
|
105
108
|
tooltip: 'Показать описание',
|
|
106
109
|
itemId: 'show-description-tool',
|
|
@@ -46,7 +46,6 @@ Ext.define('Coon.report.plugin.configPanel.UpdateGridPluginConfigPanel', {
|
|
|
46
46
|
createItems: function() {
|
|
47
47
|
this.markUpdatedCheckBox = Ext.create('Ext.form.field.Checkbox', {
|
|
48
48
|
boxLabel: 'Выделять обновленные строки',
|
|
49
|
-
boxLabelAlign: 'before',
|
|
50
49
|
name: 'markUpdated',
|
|
51
50
|
value: true,
|
|
52
51
|
});
|
|
@@ -53,9 +53,22 @@ Ext.define('Coon.report.plugin.grid.GridEditorsPlugin', {
|
|
|
53
53
|
if (Ext.isFunction(column.setEditor)) {
|
|
54
54
|
column.setEditor(editor);
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
let editable = true;
|
|
57
|
+
column.renderer = (value, metaData, record) => {
|
|
58
|
+
if (editorObj['dependsOnField'] && editorObj['dependsOnFieldName']) {
|
|
59
|
+
const dependsOnFieldName = editorObj['dependsOnFieldName'];
|
|
60
|
+
const invertValue = editorObj['invertValue'];
|
|
61
|
+
editable = invertValue === !record.get(dependsOnFieldName);
|
|
62
|
+
record.allowEditWithEditorPlugin = editable;
|
|
63
|
+
if (editorObj['highlightEditableCells']) {
|
|
64
|
+
metaData.tdCls = editable ? 'editable-cell' : 'hover-cell';
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (editor.isXType('BaseComboBox') && column.useComboRenderer !== false) {
|
|
68
|
+
Coon.format.comboRenderer(editor, column.renderer && column.renderer.customStyle);
|
|
69
|
+
}
|
|
70
|
+
return value;
|
|
71
|
+
};
|
|
59
72
|
}
|
|
60
73
|
}
|
|
61
74
|
hasEditor.on('beforeedit', function(editor, context) {
|
|
@@ -137,20 +150,6 @@ Ext.define('Coon.report.plugin.grid.GridEditorsPlugin', {
|
|
|
137
150
|
editor.on('beforeedit', function() {
|
|
138
151
|
Ext.emptyFn();
|
|
139
152
|
}, this);
|
|
140
|
-
let editable = true;
|
|
141
|
-
if (configuration['dependsOnField'] && configuration['dependsOnFieldName']) {
|
|
142
|
-
const editableColumn = this.grid.getColumns().find((col) => col.dataIndex === configuration[ns.$type]);
|
|
143
|
-
editableColumn.renderer = (value, metaData, record) => {
|
|
144
|
-
const dependsOnFieldName = configuration['dependsOnFieldName'];
|
|
145
|
-
const invertValue = configuration['invertValue'];
|
|
146
|
-
editable = invertValue === !record.get(dependsOnFieldName);
|
|
147
|
-
record.allowEditWithEditorPlugin = editable;
|
|
148
|
-
if (configuration['highlightEditableCells']) {
|
|
149
|
-
metaData.tdCls = editable ? 'create-line-left' : 'hover-style';
|
|
150
|
-
}
|
|
151
|
-
return value;
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
153
|
return editor;
|
|
155
154
|
},
|
|
156
155
|
});
|
|
@@ -120,6 +120,9 @@ Ext.define('Coon.report.plugin.grid.GridQuickSearchPlugin', {
|
|
|
120
120
|
|
|
121
121
|
updateColumnHeaderByFilter: function(filter) {
|
|
122
122
|
const columnData = this.columnsData[filter.dataIndex];
|
|
123
|
+
if (!columnData) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
123
126
|
const text = filter.value;
|
|
124
127
|
const currentColumn = this.grid.getColumns()[columnData.index];
|
|
125
128
|
if (!filter.active) {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Ext.define('Coon.report.plugin.util', {
|
|
2
|
+
singleton: true,
|
|
3
|
+
requires: ['Coon.report.ReportEntity'],
|
|
4
|
+
/**
|
|
5
|
+
* Возвращает имя класса конфигурационной панели по xtype плагина
|
|
6
|
+
* @param xtype {String}
|
|
7
|
+
* @param isFormEditor {Boolean}
|
|
8
|
+
* @throws {Error}
|
|
9
|
+
* @returns {String}
|
|
10
|
+
*/
|
|
11
|
+
getConfigPanelClassName(xtype, isFormEditor) {
|
|
12
|
+
const aliases = Ext.ClassManager.aliasToName;
|
|
13
|
+
const ptype =
|
|
14
|
+
aliases['plugin.' + xtype] ||
|
|
15
|
+
aliases['widget.' + xtype] ||
|
|
16
|
+
aliases['feature.' + xtype];
|
|
17
|
+
if (!ptype || !Coon.report.ReportEntity.isAliasExist(xtype)) {
|
|
18
|
+
throw new Error('Plugin type not found.');
|
|
19
|
+
}
|
|
20
|
+
const proto = ptype && Ext.ClassManager.classes[ptype].prototype;
|
|
21
|
+
const classNameField = isFormEditor ?
|
|
22
|
+
'configurePanelWizardForFormEditor' :
|
|
23
|
+
'configurePanelWizard';
|
|
24
|
+
const className =
|
|
25
|
+
proto &&
|
|
26
|
+
(proto[classNameField] || (proto.config && proto.config[classNameField]));
|
|
27
|
+
if (className) {
|
|
28
|
+
return aliases['widget.' + className] || aliases['plugin.' + className];
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
});
|
|
@@ -71,6 +71,10 @@ Ext.define('Coon.uielement.plugin.OpenPanelPlugin', {
|
|
|
71
71
|
items: panel,
|
|
72
72
|
}, defaultWindowConfig || {}));
|
|
73
73
|
|
|
74
|
+
openWindow.on('close', function() {
|
|
75
|
+
panel.fireEvent('closeWindow');
|
|
76
|
+
});
|
|
77
|
+
|
|
74
78
|
openWindow.on('afterrender', function() {
|
|
75
79
|
const initArguments = {};
|
|
76
80
|
for (const name in this.parameters) {
|
package/src/version.js
CHANGED