ru.coon 2.5.21 → 2.5.23
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 +36 -0
- package/package.json +1 -1
- package/src/common/component/editor/CharacteristicGridCopyPlugin.js +30 -45
- package/src/report/command/BaseReportDataCommand.js +7 -5
- package/src/report/component/LocalPagingComboPicker.js +16 -37
- package/src/report/component/ReportLookupCombo.js +9 -2
- package/src/report/component/ReportPanel.js +6 -3
- package/src/report/component/ReportPickerLookupCombo.js +16 -1
- package/src/report/component/ReportTagLookup.js +17 -0
- package/src/report/component/reportpanel/NorthPanel.js +51 -1
- package/src/report/component/settings/property/ReportPropertiesPanelController.js +2 -1
- package/src/report/plugin/configPanel/ExportReportDataToFilePluginConfigPanel.js +31 -1
- package/src/report/plugin/configPanel/ReportCharacteristicBindPluginConfig.js +89 -9
- package/src/report/plugin/grid/ExportReportDataToFilePlugin.js +45 -7
- package/src/security/GenerateTokenPanel.js +13 -7
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
# Version 2.5.23, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2bd9602f16f9aec3aedc7bff149d7c7357afb558)
|
|
2
|
+
* ## Features
|
|
3
|
+
* <span style='color:green'>feat: Добавить возможность выполнять репорт без кеша. Closes BFL-8384.</span> ([0ef6d5], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0ef6d559e8fca3f626747a8d60a21a0c1c6cc076))
|
|
4
|
+
|
|
5
|
+
* ## Fixes
|
|
6
|
+
* <span style='color:red'>fix ReportLookupCombo
|
|
7
|
+
|
|
8
|
+
init cachedValue during component creation process</span> ([311477], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/31147772ab1e6011d06fab1d63e585fc042de38e))
|
|
9
|
+
* <span style='color:red'>Fix:TR-67289 Исправления для компилятора</span> ([8126f0], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8126f0f78008b2bd13f2a48b89225b4a98540b83))
|
|
10
|
+
* <span style='color:red'> HT-6580 исправление пагинации. Переменные из миксина перемещены в компоненты.</span> ([232379], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/23237953da5405829b420cc7326a09ee43f19123))
|
|
11
|
+
* <span style='color:red'>fix parameter names clash</span> ([513c20], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/513c206cca2acb55ab912e22a66a21f470068b87))
|
|
12
|
+
|
|
13
|
+
* upd ([630b4c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/630b4c388bae0b7b07fa4721833fac339c8b4adf))
|
|
14
|
+
* ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update if conditiona5ed6047f450cdfa8f105b0f7c02ae68f3b7d483))
|
|
15
|
+
* ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update btn text90de08f9dd7293b7c3287ff8f43a5ff47a9f92f8))
|
|
16
|
+
* update: CHANGELOG.md ([9cd192], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9cd1920b986e816b98adfde212256e032d55134e))
|
|
17
|
+
|
|
18
|
+
# Version 2.5.22, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a5adcd5f65e1a51dab152558c6fb72efe4b97893)
|
|
19
|
+
* ## Fixes
|
|
20
|
+
* <span style='color:red'>fix ReportLookupCompo.loadReportData
|
|
21
|
+
|
|
22
|
+
isolate lastValue from native ComboBox logic</span> ([57078e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/57078efccd71e7c21830ec9b7abf055e3d09f71e))
|
|
23
|
+
* <span style='color:red'> HT-6314 fix focus</span> ([e9009a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e9009a55da073196bf1bd8c4b3fabff263831bf7))
|
|
24
|
+
|
|
25
|
+
* update: CHANGELOG.md ([473997], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/4739978f7ebb8564b5b233c496ce9c98d977c1c6))
|
|
26
|
+
|
|
1
27
|
# Version 2.5.21, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/dc202083a949169e0203fa47bf2defa312201a33)
|
|
2
28
|
* update: CHANGELOG.md ([e1a4d6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e1a4d65ec93284adeab64eb21ab51e737c229df7))
|
|
3
29
|
|
|
@@ -17,6 +43,9 @@
|
|
|
17
43
|
|
|
18
44
|
fix ReportLookupCombo autoLoadData after destroy component
|
|
19
45
|
fix ReportPropertiesPanelController</span> ([e2b928], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e2b928b1eddc58f46657ce79297ea2dbb2cae1ce))
|
|
46
|
+
* <span style='color:red'> HT-6314 change icon and master widget style</span> ([fff9b6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/fff9b6c8d6652addfac024b21bd03d01f86623f7))
|
|
47
|
+
* <span style='color:red'> HT-6314 change icon and master widget style</span> ([ac9da8], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ac9da82d4f00015e52da554cb985b4f2bdf2a1fe))
|
|
48
|
+
* <span style='color:red'> HT-6314 change icon and master widget style</span> ([6b03cc], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6b03ccc5600c2d757b811bad43b790a85633d844))
|
|
20
49
|
|
|
21
50
|
* update: CHANGELOG.md ([ff88bb], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ff88bb739914adacf1bbfa5284b31f603e480795))
|
|
22
51
|
|
|
@@ -31,6 +60,7 @@ fix ReportPropertiesPanelController</span> ([e2b928], [link](http://gitlab-dbr.s
|
|
|
31
60
|
|
|
32
61
|
# Version 2.5.16, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9519fa8b00a799beb8b65a98dfd63414f2870633)
|
|
33
62
|
* ## Features
|
|
63
|
+
* <span style='color:green'>feat: Добавлена возможность использовать параметры с filterPanel. Closes BFL-8098.</span> ([5b1fd5], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5b1fd503a24a3ff6c18f0fadffc1f6e3fd360ddc))
|
|
34
64
|
* <span style='color:green'>feat: Добавлена возможнось автоматически изменять размеры окна в зависимости от размеров открываемой панели. Related to BFL-7771.</span> ([5d7560], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5d756008132baf464fc924a8c0bb58ef0c3ed27d))
|
|
35
65
|
* <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))
|
|
36
66
|
* <span style='color:green'>Feat:TR-67289 Включил возможность авторизации по гит токену</span> ([b9505b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b9505baa99ee5f5785e6da287063774918f0d698))
|
|
@@ -41,11 +71,13 @@ fix ReportPropertiesPanelController</span> ([e2b928], [link](http://gitlab-dbr.s
|
|
|
41
71
|
|
|
42
72
|
ReportPropertiesPanelController.buildPropertiesTreeData was losing property "key"</span> ([d1e579], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d1e579bc3d8d073c240661b2a1c152a5b78404b2))
|
|
43
73
|
* <span style='color:red'>Fix:BFL-8107 Исправление бага с датами версий панелей</span> ([1e933f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1e933f8a6e9a6d3122cbab3359d6f68ef0dd3d3b))
|
|
74
|
+
* <span style='color:red'> Добавлены элементы управления на панель конфигурации ExportReportDataToFilePlugin. Closes BFL-8098.</span> ([2dc9da], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2dc9da640b3c25285e7c51ae7c92c86ad92067f4))
|
|
44
75
|
* <span style='color:red'>Fix:TR-67289 Исправление логики закрытия окна авторизации</span> ([52fa43], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/52fa4306789d5ed5d9af1eee2a95a33edd484e0e))
|
|
45
76
|
* <span style='color:red'>Fix:TR-67289 Обработка случая с закрытием окна GenerateTokenPanel</span> ([6867be], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6867be66efc9926054e4b03dd1b8f6865671ff0f))
|
|
46
77
|
* <span style='color:red'>Fix:TR-67289 Изменение параметров функции в событии makeLoad</span> ([6fb3f6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6fb3f6bdf89381285019e7768d1cc491b9d8dd5f))
|
|
47
78
|
* <span style='color:red'>Fix: Добавил лог в catch</span> ([151437], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1514370322aeb70ed0044db0af20ea283a0bf6f7))
|
|
48
79
|
|
|
80
|
+
* update ([5a6bc0], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5a6bc007bd46447ba43dae46a9252028b78cacc2))
|
|
49
81
|
* Revert "Merge branch 'revert-7b9c4220' into 'develop'"
|
|
50
82
|
([This r], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/This reverts merge request !3799c9a77d580255dbadb3a4354fb43a6c4a7cc140a))
|
|
51
83
|
* Revert "Merge branch 'CRM-7635' into develop"
|
|
@@ -214,8 +246,12 @@ ReportSqlPreviewPanel - add UiAceEditor as sql preview field(readOnly) with sql
|
|
|
214
246
|
* update: CHANGELOG.md ([cab0be], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cab0beabbbe9e1ada4ccea28763253c0e5feb839))
|
|
215
247
|
|
|
216
248
|
# Version 2.4.41, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/95627ef5983aa5f2fd5eaf8bd4b808ba169a48fb)
|
|
249
|
+
* ## Features
|
|
250
|
+
* <span style='color:green'>feat: HT-6314 Изменение отображения CharacteristicGridCopyPlugin</span> ([5fa321], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5fa3214c6e395bc66804a7acc7fe062780da1dfd))
|
|
251
|
+
|
|
217
252
|
* add no-console rule to eslint rules ([aa512d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/aa512db0fb0165af39481718d010c9748c5cebb5))
|
|
218
253
|
* ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update src/report/component/ReportPanel.js, src/nav/AppNavigationMenuController.js504a591e823ee40141ebbcd443fef8dc6e952cef))
|
|
254
|
+
* HT-6314 Изменение отображения CharacteristicGridCopyPlugin ([a1e5bc], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a1e5bc00b8072b3171d5fbddbca78af02f3f17bd))
|
|
219
255
|
* update: CHANGELOG.md ([e66ddf], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e66ddf82f691185bdb8023ccee37fcf4871c8b32))
|
|
220
256
|
|
|
221
257
|
# Version 2.4.40, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f49f8f4d8bfe24a5b6d47119585931d85dc03e33)
|
package/package.json
CHANGED
|
@@ -3,9 +3,8 @@ Ext.define('Coon.common.component.editor.CharacteristicGridCopyPlugin', {
|
|
|
3
3
|
alias: 'plugin.CharacteristicGridCopyPlugin',
|
|
4
4
|
copyConfig: {},
|
|
5
5
|
icons: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
cancel: 'x-fa fa-cancel',
|
|
6
|
+
slave: 'x-fa fa-copy',
|
|
7
|
+
master: 'x-fa fa-paste',
|
|
9
8
|
},
|
|
10
9
|
|
|
11
10
|
constructor(config) {
|
|
@@ -17,7 +16,7 @@ Ext.define('Coon.common.component.editor.CharacteristicGridCopyPlugin', {
|
|
|
17
16
|
this.component = editor;
|
|
18
17
|
if (typeof this.copyConfig === 'object') {
|
|
19
18
|
this.slaveConfig = Object.entries(this.copyConfig).reduce((acc, configEl) => {
|
|
20
|
-
configEl.length && configEl.pop().map((el) => acc[el] = ''+configEl);
|
|
19
|
+
configEl.length && configEl.pop().map((el) => acc[el] = '' + configEl);
|
|
21
20
|
return acc;
|
|
22
21
|
}, {});
|
|
23
22
|
}
|
|
@@ -32,31 +31,31 @@ Ext.define('Coon.common.component.editor.CharacteristicGridCopyPlugin', {
|
|
|
32
31
|
|
|
33
32
|
createWidgetColumn() {
|
|
34
33
|
const me = this;
|
|
34
|
+
me.masterWidgets = [];
|
|
35
|
+
|
|
36
|
+
this.component.getView().grid.getEl().down('[class="x-grid-item-container"]').addCls('CharacteristicGridCopyPlugin');
|
|
35
37
|
const widgetColumn = Ext.create('Ext.grid.column.Widget', {
|
|
38
|
+
widget: {xtype: 'button', hidden: true, padding: '6px 16px 6px 16px'},
|
|
36
39
|
width: 50,
|
|
37
40
|
onWidgetAttach: function(col, widget, record) {
|
|
38
41
|
me.clearWidgetState(widget);
|
|
39
42
|
const type = record.get('type').trim();
|
|
43
|
+
|
|
40
44
|
if (me.copyConfig[type]) {
|
|
41
|
-
|
|
42
|
-
widget.
|
|
43
|
-
widget.setIconCls(me.icons.copy);
|
|
44
|
-
widget.on('click', me.onCopyWidget, me);
|
|
45
|
-
me.component.on(type, me.setStateWidget, me, widget);
|
|
45
|
+
me.masterWidgets.push(widget);
|
|
46
|
+
widget.setIconCls(me.icons.master);
|
|
46
47
|
return;
|
|
47
48
|
}
|
|
49
|
+
|
|
48
50
|
if (me.slaveConfig[type]) {
|
|
49
51
|
widget.setHidden(me.component.readMode);
|
|
50
|
-
widget.
|
|
51
|
-
widget.
|
|
52
|
-
widget.on('click', me.onPasteWidget, me);
|
|
53
|
-
|
|
52
|
+
widget.setDisabled(me.component.readMode);
|
|
53
|
+
widget.setIconCls(me.icons.slave);
|
|
54
|
+
widget.on('click', me.onPasteWidget, me, {args: [widget, type]});
|
|
55
|
+
widget.on('mouseover', me.showSlaveIcon, me, {args: [type, false, me.masterWidgets]});
|
|
56
|
+
widget.on('mouseout', me.showSlaveIcon, me, {args: [type, true, me.masterWidgets]});
|
|
54
57
|
}
|
|
55
58
|
},
|
|
56
|
-
widget: {
|
|
57
|
-
xtype: 'button',
|
|
58
|
-
hidden: true,
|
|
59
|
-
},
|
|
60
59
|
});
|
|
61
60
|
const columns = this.component.getColumns().map((el) => el.initialConfig);
|
|
62
61
|
columns.push(widgetColumn);
|
|
@@ -65,41 +64,27 @@ Ext.define('Coon.common.component.editor.CharacteristicGridCopyPlugin', {
|
|
|
65
64
|
|
|
66
65
|
clearWidgetState(widget) {
|
|
67
66
|
widget.setIconCls('');
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
this.component.removeListener(type, this.setStateWidget, this, widget);
|
|
71
|
-
widget.removeListener('click', this.onCopyWidget, this);
|
|
67
|
+
widget.setDisabled(true);
|
|
68
|
+
widget.setHidden(true);
|
|
72
69
|
widget.removeListener('click', this.onPasteWidget, this);
|
|
70
|
+
widget.removeListener('mouseover', this.showSlaveIcon, this);
|
|
71
|
+
widget.removeListener('mouseout', this.showSlaveIcon, this);
|
|
73
72
|
},
|
|
74
73
|
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
showSlaveIcon(type, hideMasterIcon, masterWidgets) {
|
|
75
|
+
masterWidgets.find((widget) => widget.getWidgetRecord().get('type').trim() === this.slaveConfig[type]).setHidden(hideMasterIcon);
|
|
77
76
|
},
|
|
78
77
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
} else {
|
|
84
|
-
this.state = 'cancel';
|
|
85
|
-
this.masterRecord = widget.getWidgetRecord();
|
|
86
|
-
}
|
|
87
|
-
widget.setIconCls(this.icons[this.state]);
|
|
88
|
-
},
|
|
78
|
+
onPasteWidget(widget, type) {
|
|
79
|
+
const masterWidget = this.masterWidgets.find((widget) => widget.getWidgetRecord().get('type').trim() === this.slaveConfig[type]);
|
|
80
|
+
const masterRecord = masterWidget && masterWidget.getWidgetRecord();
|
|
81
|
+
const slaveRecord = widget.getWidgetRecord();
|
|
89
82
|
|
|
90
|
-
|
|
91
|
-
const type = widget.getWidgetRecord().get('type').trim();
|
|
92
|
-
this.component.fireEvent(type);
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
onPasteWidget(widget) {
|
|
96
|
-
const record = widget.getWidgetRecord();
|
|
97
|
-
const type = record.get('type').trim();
|
|
98
|
-
if (!this.masterRecord) {
|
|
83
|
+
if (!masterRecord) {
|
|
99
84
|
return;
|
|
100
85
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
86
|
+
|
|
87
|
+
slaveRecord.set('value', masterRecord.get('value'));
|
|
88
|
+
slaveRecord.set('valueDescription', masterRecord.get('valueDescription') || '');
|
|
104
89
|
},
|
|
105
90
|
});
|
|
@@ -2,10 +2,12 @@ Ext.define('Coon.report.command.BaseReportDataCommand', {
|
|
|
2
2
|
extend: 'Coon.command.ASyncBaseCommand',
|
|
3
3
|
alias: 'command.BaseReportDataCommand',
|
|
4
4
|
|
|
5
|
+
useRawFilterParams: false,
|
|
6
|
+
|
|
5
7
|
prepareParams: function() {
|
|
6
8
|
const report = this.grid || this.config.activeComponent.ownerCt.ownerCt;
|
|
7
9
|
const reportId = report.reportId;
|
|
8
|
-
const currentParamList = report.currentParamList;
|
|
10
|
+
const currentParamList = this.useRawFilterParams ? report.northPanel.collectParams() : report.currentParamList;
|
|
9
11
|
const parameterList = [];
|
|
10
12
|
for (const key in currentParamList) {
|
|
11
13
|
if (currentParamList.hasOwnProperty(key)) {
|
|
@@ -14,11 +16,10 @@ Ext.define('Coon.report.command.BaseReportDataCommand', {
|
|
|
14
16
|
}
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
|
-
|
|
19
|
+
return {
|
|
18
20
|
reportId: reportId,
|
|
19
21
|
parameterList: Ext.encode(parameterList),
|
|
20
22
|
};
|
|
21
|
-
return params;
|
|
22
23
|
},
|
|
23
24
|
|
|
24
25
|
execute: function(grid, config) {
|
|
@@ -58,10 +59,11 @@ Ext.define('Coon.report.command.BaseReportDataCommand', {
|
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
form.action = this.url;
|
|
61
|
-
|
|
62
|
+
const params = this.prepareParams();
|
|
63
|
+
form.querySelector('input#toReportFormDataReportId').value = params.reportId;
|
|
62
64
|
form.querySelector('input#toReportFormDataFileName').value = filename;
|
|
63
65
|
form.querySelector('input#toReportFormDataAppendTimestamp').value = appendDateToFileName;
|
|
64
|
-
form.querySelector('input#toReportFormDataParameterList').value =
|
|
66
|
+
form.querySelector('input#toReportFormDataParameterList').value = params.parameterList;
|
|
65
67
|
form.submit();
|
|
66
68
|
},
|
|
67
69
|
|
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
Ext.define('Coon.report.component.LocalPagingComboPicker', {
|
|
2
2
|
extend: 'Ext.Mixin',
|
|
3
|
-
|
|
4
|
-
// Текущая страница
|
|
5
|
-
currentPage: 1,
|
|
6
|
-
// Количество записей на страницу
|
|
7
|
-
pageSize: 500,
|
|
8
|
-
// Количество страниц
|
|
9
|
-
count: 0,
|
|
10
|
-
},
|
|
11
|
-
// Отфильтрованные из initialData данные. Если unpagedData больше размера одной страницы, то включается пагинация.
|
|
12
|
-
// С включенной пагинацией в boundList показывается тулбар для перемещения по страницам, а в
|
|
13
|
-
// store загружается только одна страница.
|
|
14
|
-
// Пагинация не зависит от autoLoadData.
|
|
15
|
-
unpagedData: undefined,
|
|
16
|
-
isLoaded: false,
|
|
3
|
+
|
|
17
4
|
mixinConfig: {
|
|
18
5
|
before: {
|
|
19
6
|
initComponent: 'init',
|
|
@@ -21,12 +8,16 @@ Ext.define('Coon.report.component.LocalPagingComboPicker', {
|
|
|
21
8
|
},
|
|
22
9
|
|
|
23
10
|
init() {
|
|
24
|
-
if (this.toolbarPageSize && this.toolbarPageSize>0) {
|
|
25
|
-
this.pageControl.pageSize = this.toolbarPageSize;
|
|
26
|
-
}
|
|
27
11
|
this.createPicker = this.createLocalPicker;
|
|
28
12
|
this.beforeQuery = this.beforeLocalQuery;
|
|
29
13
|
this.loadPage = this.loadLocalPage;
|
|
14
|
+
this.initPageControl();
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
initPageControl() {
|
|
18
|
+
if (this.toolbarPageSize && this.toolbarPageSize>0) {
|
|
19
|
+
this.pageControl.pageSize = this.toolbarPageSize;
|
|
20
|
+
}
|
|
30
21
|
},
|
|
31
22
|
/**
|
|
32
23
|
* Переопределение метода, чтобы подключить свой bound list.
|
|
@@ -178,26 +169,24 @@ Ext.define('Coon.report.component.LocalPagingComboPicker', {
|
|
|
178
169
|
* требуется искать в репорте по valueField), от значения, которые набрал пользователь на клавиатуре (когда требуется искать по searchField)
|
|
179
170
|
* @type {boolean}
|
|
180
171
|
*/
|
|
181
|
-
this.searchString = plan.query
|
|
172
|
+
this.searchString = !!plan.query;
|
|
182
173
|
Coon.log.debug('beforeQuery', plan);
|
|
183
174
|
if (this.autoLoadData) {
|
|
184
175
|
if (this.initialData && Array.isArray(this.initialData)) {
|
|
176
|
+
const queryString = this.ignoreCase ? plan.query.toLocaleLowerCase(): plan.query;
|
|
185
177
|
const filtered = this.initialData.filter((r) => {
|
|
186
178
|
// Не фильтруем, если не определено поле для поиска
|
|
187
179
|
if (!r[this.searchField]) {
|
|
188
180
|
return true;
|
|
189
181
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
} else {
|
|
193
|
-
return r[this.searchField].startsWith(plan.query);
|
|
194
|
-
}
|
|
182
|
+
const compareReady = this.ignoreCase ? r[this.searchField].toLocaleLowerCase(): r[this.searchField];
|
|
183
|
+
return this.searchBySubstring ? compareReady.includes(queryString): compareReady.startsWith(queryString);
|
|
195
184
|
});
|
|
196
185
|
|
|
197
186
|
this.unpagedData = filtered;
|
|
198
187
|
this.configurePagination();
|
|
199
188
|
const value = this.getValue();
|
|
200
|
-
if (this.xtype==='ReportTagLookup') {
|
|
189
|
+
if (this.xtype === 'ReportTagLookup') {
|
|
201
190
|
this.loadLocalPage(1);
|
|
202
191
|
} else {
|
|
203
192
|
if (value) {
|
|
@@ -207,21 +196,10 @@ Ext.define('Coon.report.component.LocalPagingComboPicker', {
|
|
|
207
196
|
}
|
|
208
197
|
}
|
|
209
198
|
}
|
|
210
|
-
|
|
211
|
-
if (this.searchBySubstring) {
|
|
212
|
-
plan.forceAll = false;
|
|
213
|
-
const len = plan.query.length;
|
|
214
|
-
plan.query = new RegExp('.*' + Ext.String.escapeRegex(plan.query) + '.*', 'i');
|
|
215
|
-
plan.query.length = len;
|
|
216
|
-
}
|
|
217
|
-
} else {
|
|
218
|
-
// Отключаем локальную фильтрацию
|
|
219
|
-
plan.forceAll = false;
|
|
220
|
-
const len = plan.query.length;
|
|
221
|
-
plan.query = new RegExp('.*', 'i');
|
|
222
|
-
plan.query.length = len;
|
|
223
199
|
}
|
|
224
200
|
|
|
201
|
+
// Отключаем локальную фильтрацию
|
|
202
|
+
plan.query = new RegExp('.*', 'i');
|
|
225
203
|
return plan;
|
|
226
204
|
},
|
|
227
205
|
/**
|
|
@@ -267,6 +245,7 @@ Ext.define('Coon.report.component.LocalPagingComboPicker', {
|
|
|
267
245
|
configurePagination() {
|
|
268
246
|
Coon.log.debug('configurePagination');
|
|
269
247
|
const pageControl = this.pageControl;
|
|
248
|
+
Coon.log.debug('pageSize', this.pageControl.pageSize);
|
|
270
249
|
this.isPagingEnabled = (this.unpagedData && this.unpagedData.length > pageControl.pageSize);
|
|
271
250
|
pageControl.currentPage = 1;
|
|
272
251
|
const tmp = this.unpagedData.length / pageControl.pageSize;
|
|
@@ -68,6 +68,7 @@ Ext.define('Coon.report.component.ReportLookupCombo', {
|
|
|
68
68
|
},
|
|
69
69
|
|
|
70
70
|
initComponent() {
|
|
71
|
+
this._cachedValue = Boolean(false);
|
|
71
72
|
if (!this.getDisplayField()) {
|
|
72
73
|
Coon.log.error('displayField is empty!');
|
|
73
74
|
}
|
|
@@ -169,7 +170,7 @@ Ext.define('Coon.report.component.ReportLookupCombo', {
|
|
|
169
170
|
* @param {string} value
|
|
170
171
|
*/
|
|
171
172
|
loadReportData(value) {
|
|
172
|
-
if (this.
|
|
173
|
+
if (value && this._cachedValue === value) {
|
|
173
174
|
this.selectRecordByValue(value);
|
|
174
175
|
return;
|
|
175
176
|
}
|
|
@@ -191,7 +192,13 @@ Ext.define('Coon.report.component.ReportLookupCombo', {
|
|
|
191
192
|
}
|
|
192
193
|
if (result && Array.isArray(result.list)) {
|
|
193
194
|
this.getStore().loadData(result.list);
|
|
194
|
-
|
|
195
|
+
if (result.list[0]) {
|
|
196
|
+
me._cachedValue = value;
|
|
197
|
+
me.selectRecordByValue(value);
|
|
198
|
+
} else {
|
|
199
|
+
me._cachedValue = false;
|
|
200
|
+
me.clearComboValue();
|
|
201
|
+
}
|
|
195
202
|
me.enable();
|
|
196
203
|
}
|
|
197
204
|
}).catch((error) => {
|
|
@@ -355,6 +355,7 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
355
355
|
}
|
|
356
356
|
}, 500);
|
|
357
357
|
}, this);
|
|
358
|
+
this.on('invalidateCache', this.filterHandler.bind(this, true));
|
|
358
359
|
},
|
|
359
360
|
|
|
360
361
|
onDestroy: function() {
|
|
@@ -859,12 +860,12 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
859
860
|
this.filterHandler();
|
|
860
861
|
},
|
|
861
862
|
|
|
862
|
-
filterHandler: function() {
|
|
863
|
+
filterHandler: function(invalidateCache = false) {
|
|
863
864
|
if (this.northPanel.isValid()) {
|
|
864
865
|
this.grid.clear();
|
|
865
866
|
this.currentParamList = this.northPanel.collectParams();
|
|
866
867
|
this.beforeCommandExecuter(this.beforeApplyFilterCommand(this), [this.currentParamList], function() {
|
|
867
|
-
this.loadData(this.currentParamList);
|
|
868
|
+
this.loadData(this.currentParamList, typeof invalidateCache === 'boolean' && invalidateCache);
|
|
868
869
|
});
|
|
869
870
|
}
|
|
870
871
|
},
|
|
@@ -875,7 +876,7 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
875
876
|
}
|
|
876
877
|
},
|
|
877
878
|
|
|
878
|
-
loadData: function(parameters) {
|
|
879
|
+
loadData: function(parameters, invalidateCache = false) {
|
|
879
880
|
const parameterList = [];
|
|
880
881
|
for (const key in parameters) {
|
|
881
882
|
if (parameters.hasOwnProperty(key)) {
|
|
@@ -905,6 +906,7 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
905
906
|
this.executeStoreDataCommand(command, {
|
|
906
907
|
reportID: this.reportID,
|
|
907
908
|
parameters: parameterList,
|
|
909
|
+
invalidateCache,
|
|
908
910
|
});
|
|
909
911
|
} else {
|
|
910
912
|
if (this.grid.getStore() != null) {
|
|
@@ -912,6 +914,7 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
912
914
|
params: {
|
|
913
915
|
parameterList: Ext.encode(parameterList),
|
|
914
916
|
reportId: this.reportId,
|
|
917
|
+
invalidateCache,
|
|
915
918
|
},
|
|
916
919
|
});
|
|
917
920
|
}
|
|
@@ -57,10 +57,15 @@ Ext.define('Coon.report.component.ReportPickerLookupCombo', {
|
|
|
57
57
|
|
|
58
58
|
xtype: 'ReportPickerLookupCombo',
|
|
59
59
|
|
|
60
|
+
// Отфильтрованные из initialData данные. Если unpagedData больше размера одной страницы, то включается пагинация.
|
|
61
|
+
// С включенной пагинацией в boundList показывается тулбар для перемещения по страницам, а в
|
|
62
|
+
// store загружается только одна страница.
|
|
63
|
+
unpagedData: undefined,
|
|
64
|
+
isLoaded: false,
|
|
60
65
|
config: {
|
|
61
66
|
selectIfSingle: false, // для корректного поведения resettable
|
|
62
67
|
resettable: false,
|
|
63
|
-
autoLoadData: true,
|
|
68
|
+
autoLoadData: true, // todo: Убрать с autoLoadData логику управления фильтрацией в пользу другой переменной
|
|
64
69
|
searchField: undefined,
|
|
65
70
|
bufferTime: 2000,
|
|
66
71
|
minSearchLength: 2,
|
|
@@ -68,8 +73,18 @@ Ext.define('Coon.report.component.ReportPickerLookupCombo', {
|
|
|
68
73
|
// Поиск по подстроке (true равносильно "встречается внутри searchField", false - "значение начинается С")
|
|
69
74
|
// Работает только в режиме autoLoadData=true (локальная фильтрация результатов запроса)
|
|
70
75
|
searchBySubstring: true,
|
|
76
|
+
// Включен ли регистронезависимый поиск
|
|
77
|
+
ignoreCase: true,
|
|
71
78
|
reportConfig: undefined,
|
|
72
79
|
toolbarPageSize: undefined,
|
|
80
|
+
pageControl: {
|
|
81
|
+
// Текущая страница
|
|
82
|
+
currentPage: 1,
|
|
83
|
+
// Количество записей на страницу
|
|
84
|
+
pageSize: 500,
|
|
85
|
+
// Количество страниц
|
|
86
|
+
count: 0,
|
|
87
|
+
},
|
|
73
88
|
},
|
|
74
89
|
triggers: {
|
|
75
90
|
open: {
|
|
@@ -11,7 +11,14 @@ Ext.define('Coon.report.component.ReportTagLookup', {
|
|
|
11
11
|
extend: 'Coon.report.component.SimpleReportTag',
|
|
12
12
|
alias: 'widget.ReportTagLookup',
|
|
13
13
|
mixins: ['Coon.report.component.LocalPagingComboPicker'],
|
|
14
|
+
|
|
14
15
|
isPagingEnabled: false,
|
|
16
|
+
|
|
17
|
+
// Отфильтрованные из initialData данные. Если unpagedData больше размера одной страницы, то включается пагинация.
|
|
18
|
+
// С включенной пагинацией в boundList показывается тулбар для перемещения по страницам, а в
|
|
19
|
+
// store загружается только одна страница.
|
|
20
|
+
unpagedData: undefined,
|
|
21
|
+
isLoaded: false,
|
|
15
22
|
config: {
|
|
16
23
|
triggers: {
|
|
17
24
|
open: {
|
|
@@ -26,6 +33,16 @@ Ext.define('Coon.report.component.ReportTagLookup', {
|
|
|
26
33
|
cutDangerousAmount: true,
|
|
27
34
|
resettable: false,
|
|
28
35
|
toolbarPageSize: undefined,
|
|
36
|
+
// Включен ли регистронезависимый поиск
|
|
37
|
+
ignoreCase: true,
|
|
38
|
+
pageControl: {
|
|
39
|
+
// Текущая страница
|
|
40
|
+
currentPage: 1,
|
|
41
|
+
// Количество записей на страницу
|
|
42
|
+
pageSize: 500,
|
|
43
|
+
// Количество страниц
|
|
44
|
+
count: 0,
|
|
45
|
+
},
|
|
29
46
|
},
|
|
30
47
|
|
|
31
48
|
initComponent: function() {
|
|
@@ -32,7 +32,6 @@ Ext.define('Coon.report.component.report.NorthPanel', {
|
|
|
32
32
|
}, this.clearButtonConfig || {}));
|
|
33
33
|
|
|
34
34
|
this.buttonsContainer = Ext.widget('container', Ext.apply({
|
|
35
|
-
width: 200,
|
|
36
35
|
margin: '10 0',
|
|
37
36
|
autoHeight: true,
|
|
38
37
|
layout: {
|
|
@@ -117,6 +116,15 @@ Ext.define('Coon.report.component.report.NorthPanel', {
|
|
|
117
116
|
if (this.hideFilterButtons) {
|
|
118
117
|
this.buttonsContainer.hide();
|
|
119
118
|
}
|
|
119
|
+
if (reportFormBean.cached === true) {
|
|
120
|
+
this.addToSearchButtonMenu({
|
|
121
|
+
text: 'Поиск по БД',
|
|
122
|
+
handler: (function() {
|
|
123
|
+
this.reportPanel.fireEvent('invalidateCache');
|
|
124
|
+
// eslint-disable-next-line no-extra-bind
|
|
125
|
+
}).bind(this),
|
|
126
|
+
});
|
|
127
|
+
}
|
|
120
128
|
},
|
|
121
129
|
|
|
122
130
|
/**
|
|
@@ -174,4 +182,46 @@ Ext.define('Coon.report.component.report.NorthPanel', {
|
|
|
174
182
|
tool.setTooltip(tool.tooltipTexts.hide);
|
|
175
183
|
}
|
|
176
184
|
},
|
|
185
|
+
|
|
186
|
+
addToSearchButtonMenu(menuItems = []) {
|
|
187
|
+
if (!menuItems) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
if (typeof menuItems === 'object' && !Array.isArray(menuItems)) {
|
|
191
|
+
menuItems = [menuItems];
|
|
192
|
+
}
|
|
193
|
+
if (!menuItems.length) {
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
if (this.splitSearchButton) {
|
|
197
|
+
menuItems.forEach((c) => {
|
|
198
|
+
this.splitSearchButton.menu.insert(0,
|
|
199
|
+
c.$className && c.isMenuItem ?
|
|
200
|
+
c :
|
|
201
|
+
Ext.create(Object.assign(c, {xtype: 'menuitem'}))
|
|
202
|
+
);
|
|
203
|
+
});
|
|
204
|
+
} else {
|
|
205
|
+
const btn = this.searchButton;
|
|
206
|
+
if (btn) {
|
|
207
|
+
this.splitSearchButton = Ext.create(
|
|
208
|
+
Object.assign(
|
|
209
|
+
{
|
|
210
|
+
xtype: 'splitbutton',
|
|
211
|
+
handler: btn.handler.bind(btn),
|
|
212
|
+
menu: menuItems,
|
|
213
|
+
},
|
|
214
|
+
btn.initialConfig || {},
|
|
215
|
+
{margin: btn.margin}
|
|
216
|
+
)
|
|
217
|
+
);
|
|
218
|
+
btn.hide();
|
|
219
|
+
btn.ownerCt.items.items.splice(
|
|
220
|
+
btn.ownerCt.items.items.indexOf(btn),
|
|
221
|
+
0,
|
|
222
|
+
this.splitSearchButton
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
},
|
|
177
227
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Ext.define('Coon.report.component.settings.property.ReportPropertiesPanelController', {
|
|
2
2
|
extend: 'Ext.app.ViewController',
|
|
3
|
+
requires: ['Coon.report.component.settings.property.ReportPropertyDictionary'],
|
|
3
4
|
alias: 'controller.ReportPropertiesPanelController',
|
|
4
5
|
reportContextProperty: 'filterItemsOnRow',
|
|
5
6
|
|
|
@@ -163,7 +164,7 @@ Ext.define('Coon.report.component.settings.property.ReportPropertiesPanelControl
|
|
|
163
164
|
record.set('value', value);
|
|
164
165
|
},
|
|
165
166
|
|
|
166
|
-
onShowContextMenu: function(_, record,
|
|
167
|
+
onShowContextMenu: function(_, record, __, ___, e) {
|
|
167
168
|
const contextMenu = new Ext.menu.Menu({
|
|
168
169
|
plain: true,
|
|
169
170
|
});
|
|
@@ -24,7 +24,15 @@ Ext.define('Coon.report.plugin.configPanel.ExportReportDataToFilePluginConfigPan
|
|
|
24
24
|
title: false,
|
|
25
25
|
columns: {
|
|
26
26
|
items: [
|
|
27
|
-
{
|
|
27
|
+
{
|
|
28
|
+
header: 'v',
|
|
29
|
+
dataIndex: 'checkbox',
|
|
30
|
+
xtype: 'checkcolumn',
|
|
31
|
+
hidden: false,
|
|
32
|
+
allowSelect: true,
|
|
33
|
+
headerCheckbox: true,
|
|
34
|
+
width: 75,
|
|
35
|
+
},
|
|
28
36
|
{header: 'Поле', dataIndex: 'reportField', xtype: 'hintColumn', flex: 1},
|
|
29
37
|
{header: 'Описание', dataIndex: 'description', xtype: 'hintColumn', flex: 3, headerCheckbox: true}
|
|
30
38
|
],
|
|
@@ -44,6 +52,28 @@ Ext.define('Coon.report.plugin.configPanel.ExportReportDataToFilePluginConfigPan
|
|
|
44
52
|
items: [
|
|
45
53
|
this.createSelectExtensionToSave(),
|
|
46
54
|
this.createReportFileNameField(),
|
|
55
|
+
{
|
|
56
|
+
xtype: 'checkbox',
|
|
57
|
+
boxLabel: 'Добавить в меню кнопки "Поиск" (параметры фильтра будут применятся сразу)',
|
|
58
|
+
name: 'addToSearchButton',
|
|
59
|
+
listeners: {
|
|
60
|
+
change(cb, checked) {
|
|
61
|
+
const addButtonCheckbox = cb.ownerCt.query('[name=addButtonOnToolbar]').shift();
|
|
62
|
+
const addButtonFieldset = cb.ownerCt.query('[name=buttonConfig]').shift();
|
|
63
|
+
if (addButtonCheckbox) {
|
|
64
|
+
addButtonCheckbox.setValue(addButtonCheckbox.getValue() && !checked);
|
|
65
|
+
addButtonCheckbox.setDisabled(checked);
|
|
66
|
+
}
|
|
67
|
+
if (addButtonFieldset) {
|
|
68
|
+
if (checked) {
|
|
69
|
+
addButtonFieldset.enable();
|
|
70
|
+
} else {
|
|
71
|
+
addButtonFieldset.setDisabled(!addButtonCheckbox.getValue());
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
47
77
|
this.createAddButtonPanel(),
|
|
48
78
|
this.createCustomColumnsFieldset()
|
|
49
79
|
],
|
|
@@ -180,6 +180,9 @@ Ext.define('Coon.report.plugin.configPanel.ReportCharacteristicBindPluginConfig'
|
|
|
180
180
|
this.callParent(arguments);
|
|
181
181
|
this.displayFieldSet(config, this.getFieldSet(), 'addDate');
|
|
182
182
|
this.setVisibleFields(config['type']);
|
|
183
|
+
if (config && config.copyGridRecords) {
|
|
184
|
+
this.copyGrid.getStore().loadData(config.copyGridRecords);
|
|
185
|
+
}
|
|
183
186
|
},
|
|
184
187
|
|
|
185
188
|
setVisibleFields: function(value) {
|
|
@@ -201,13 +204,33 @@ Ext.define('Coon.report.plugin.configPanel.ReportCharacteristicBindPluginConfig'
|
|
|
201
204
|
getConfiguration: function() {
|
|
202
205
|
const config = this.callParent(arguments);
|
|
203
206
|
const fieldSet = this.getFieldSet();
|
|
207
|
+
const showCopyColumn = this.down('[name="showCopyColumn"]');
|
|
208
|
+
|
|
204
209
|
if (!Ext.isEmpty(fieldSet)) {
|
|
205
210
|
config['addDate'] = !fieldSet.collapsed;
|
|
206
211
|
}
|
|
212
|
+
|
|
207
213
|
config['defaultDate'] = this.defaultDateField.isVisible() ? config['defaultDate'] : undefined;
|
|
208
214
|
config['dateFromField'] = this.dateFromField.isVisible() ? config['dateFromField'] : undefined;
|
|
209
215
|
config['dateFromParam'] = this.dateFromParam.isVisible() ? config['dateFromParam'] : undefined;
|
|
210
216
|
config['today'] = this.today || undefined;
|
|
217
|
+
|
|
218
|
+
if (showCopyColumn.getValue() === true) {
|
|
219
|
+
const copyConfig = {};
|
|
220
|
+
const copyGridRecords = Coon.Function.serializeRecords(this.copyGrid.getStore().getRange());
|
|
221
|
+
copyGridRecords.map((rec) => {
|
|
222
|
+
if (rec.master && rec.slave) {
|
|
223
|
+
try {
|
|
224
|
+
copyConfig[rec.master.trim()] = rec.slave.replaceAll(' ', '').split(',');
|
|
225
|
+
} catch (e) {
|
|
226
|
+
Coon.log.error(`${e}: Неверно указана конфигурация копирования!`);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
config['copyConfig'] = copyConfig;
|
|
231
|
+
config['copyGridRecords'] = copyGridRecords;
|
|
232
|
+
}
|
|
233
|
+
|
|
211
234
|
return config;
|
|
212
235
|
},
|
|
213
236
|
|
|
@@ -377,30 +400,87 @@ Ext.define('Coon.report.plugin.configPanel.ReportCharacteristicBindPluginConfig'
|
|
|
377
400
|
},
|
|
378
401
|
|
|
379
402
|
createCopyFieldSet: function() {
|
|
403
|
+
const me = this;
|
|
404
|
+
|
|
405
|
+
this.copyGrid = Ext.create('Ext.grid.Panel', {
|
|
406
|
+
name: 'grid',
|
|
407
|
+
columns: {
|
|
408
|
+
items: [
|
|
409
|
+
{
|
|
410
|
+
xtype: 'hintColumn',
|
|
411
|
+
text: 'Родительские характеристика',
|
|
412
|
+
dataIndex: 'master',
|
|
413
|
+
width: 300,
|
|
414
|
+
editor: 'textfield',
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
xtype: 'hintColumn',
|
|
418
|
+
text: 'Зависимые характеристики',
|
|
419
|
+
dataIndex: 'slave',
|
|
420
|
+
width: 300,
|
|
421
|
+
editor: 'textfield',
|
|
422
|
+
}
|
|
423
|
+
],
|
|
424
|
+
},
|
|
425
|
+
plugins: [{ptype: 'cellediting', clicksToEdit: 2}],
|
|
426
|
+
store: {},
|
|
427
|
+
dockedItems: [{
|
|
428
|
+
xtype: 'toolbar',
|
|
429
|
+
dock: 'top',
|
|
430
|
+
itemId: 'toptoolbar',
|
|
431
|
+
items: [
|
|
432
|
+
{
|
|
433
|
+
xtype: 'button',
|
|
434
|
+
text: 'Добавить',
|
|
435
|
+
reference: 'addButton',
|
|
436
|
+
ui: 'blue-text-button-border',
|
|
437
|
+
handler: function() {
|
|
438
|
+
const store = me.copyGrid.getStore();
|
|
439
|
+
store.add(store.model.create());
|
|
440
|
+
},
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
xtype: 'button',
|
|
444
|
+
text: 'Удалить',
|
|
445
|
+
reference: 'deleteBtn',
|
|
446
|
+
ui: 'blue-text-button-border',
|
|
447
|
+
handler: function(btn) {
|
|
448
|
+
const record = me.copyGrid.getSelectionModel().getSelection()[0];
|
|
449
|
+
if (record) {
|
|
450
|
+
me.copyGrid.getStore().remove(record);
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
}
|
|
454
|
+
],
|
|
455
|
+
}],
|
|
456
|
+
});
|
|
457
|
+
|
|
380
458
|
return {
|
|
381
459
|
xtype: 'fieldset',
|
|
382
460
|
defaults: {
|
|
383
461
|
labelWidth: 130,
|
|
384
|
-
width: 430,
|
|
385
462
|
},
|
|
386
463
|
name: 'showCopyColumnConfig',
|
|
387
464
|
title: 'Копирование характеристик',
|
|
388
465
|
checkboxName: 'showCopyColumn',
|
|
389
466
|
checkboxToggle: true,
|
|
390
|
-
collapsed:
|
|
467
|
+
collapsed: false,
|
|
391
468
|
layout: {
|
|
392
469
|
type: 'vbox',
|
|
393
470
|
align: 'stretch',
|
|
394
471
|
},
|
|
395
472
|
items: [
|
|
396
473
|
{
|
|
397
|
-
xtype: '
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
474
|
+
xtype: 'container',
|
|
475
|
+
width: '100%',
|
|
476
|
+
html: `
|
|
477
|
+
<div style="font-size:12px;color:gray">
|
|
478
|
+
В левой колонке укажите родительскую характеристику<br>
|
|
479
|
+
В правой колонке укажите через запятую характеристики, в которые будет копироваться родительская характеристика.
|
|
480
|
+
</div>
|
|
481
|
+
`,
|
|
482
|
+
},
|
|
483
|
+
this.copyGrid
|
|
404
484
|
],
|
|
405
485
|
};
|
|
406
486
|
},
|
|
@@ -10,18 +10,36 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
|
|
|
10
10
|
appendDateToFileName: true,
|
|
11
11
|
exportFileFormat: undefined,
|
|
12
12
|
allowUserSelectColumnsToUpload: undefined,
|
|
13
|
+
addToSearchButton: false,
|
|
13
14
|
},
|
|
14
15
|
|
|
16
|
+
constructor(config) {
|
|
17
|
+
config.invisibleByDefault = config.addToSearchButton === true;
|
|
18
|
+
this.callParent(arguments);
|
|
19
|
+
},
|
|
15
20
|
init(grid) {
|
|
16
21
|
this.callParent([grid]);
|
|
17
|
-
|
|
22
|
+
const format = this.config.exportFileFormat;
|
|
23
|
+
this.buttonText = this.buttonText || (format && 'Экспорт в ' + format);
|
|
18
24
|
grid.on('render', function() {
|
|
19
25
|
this.report = grid.findParentByType('ReportPanel');
|
|
26
|
+
if (this.getConfig('addToSearchButton') === true) {
|
|
27
|
+
this.report.northPanel.addToSearchButtonMenu({
|
|
28
|
+
text: this.buttonText,
|
|
29
|
+
iconCls: this.buttonIconCls,
|
|
30
|
+
handler: Ext.bind(this.handler, this),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
20
33
|
this.grid = grid;
|
|
21
34
|
}, this);
|
|
22
|
-
this.getDataCommand =
|
|
23
|
-
|
|
24
|
-
|
|
35
|
+
this.getDataCommand = Ext.create(
|
|
36
|
+
`command.${
|
|
37
|
+
format === 'pdf' ?
|
|
38
|
+
'GetPdfReportDataCommand' :
|
|
39
|
+
'GetExcelFromRowsOrReportData'
|
|
40
|
+
}`,
|
|
41
|
+
{useRawFilterParams: this.getConfig('addToSearchButton')}
|
|
42
|
+
);
|
|
25
43
|
},
|
|
26
44
|
|
|
27
45
|
handler: function() {
|
|
@@ -41,9 +59,29 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
|
|
|
41
59
|
title: false,
|
|
42
60
|
columns: {
|
|
43
61
|
items: [
|
|
44
|
-
{
|
|
45
|
-
|
|
46
|
-
|
|
62
|
+
{
|
|
63
|
+
header: 'v',
|
|
64
|
+
dataIndex: 'checkbox',
|
|
65
|
+
xtype: 'checkcolumn',
|
|
66
|
+
hidden: false,
|
|
67
|
+
allowSelect: true,
|
|
68
|
+
headerCheckbox: true,
|
|
69
|
+
width: 75,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
header: 'Поле',
|
|
73
|
+
dataIndex: 'reportField',
|
|
74
|
+
xtype: 'hintColumn',
|
|
75
|
+
flex: 1,
|
|
76
|
+
hidden: true,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
header: 'Описание',
|
|
80
|
+
dataIndex: 'description',
|
|
81
|
+
xtype: 'hintColumn',
|
|
82
|
+
flex: 3,
|
|
83
|
+
headerCheckbox: true,
|
|
84
|
+
}
|
|
47
85
|
],
|
|
48
86
|
},
|
|
49
87
|
});
|
|
@@ -93,6 +93,7 @@ Ext.define('Coon.security.GenerateTokenPanel', {
|
|
|
93
93
|
|
|
94
94
|
controller: {
|
|
95
95
|
handler() {
|
|
96
|
+
const me = this;
|
|
96
97
|
this.vm.set('pending', true);
|
|
97
98
|
const form = this.getView().getComponent('form');
|
|
98
99
|
if (form) {
|
|
@@ -101,13 +102,18 @@ Ext.define('Coon.security.GenerateTokenPanel', {
|
|
|
101
102
|
values.emailPrefix.replace(this.vm.get('defaultDomain'), '') +
|
|
102
103
|
this.vm.get('defaultDomain');
|
|
103
104
|
this.auth.generateToken(email, values.gitToken)
|
|
104
|
-
.then((
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
.then(function(properties) {
|
|
106
|
+
if (!Ext.isObject(properties)) {
|
|
107
|
+
throw new Error('Не удалось сохранить токен');
|
|
108
|
+
}
|
|
109
|
+
const isVerified = properties.isVerified || false;
|
|
110
|
+
me.vm.set('pending', false);
|
|
111
|
+
const message = isVerified ? 'Токен успешно сохранен' : 'Не удалось сохранить токен';
|
|
112
|
+
const title = isVerified ? 'Информация' : 'Ошибка';
|
|
113
|
+
Ext.Msg.alert(title, message);
|
|
114
|
+
if (isVerified) {
|
|
115
|
+
me.fireViewEvent('complete');
|
|
116
|
+
}
|
|
111
117
|
})
|
|
112
118
|
.catch((e) => {
|
|
113
119
|
Coon.log.error(e.message);
|
package/src/version.js
CHANGED