ru.coon 2.5.48 → 2.5.50
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 +21 -0
- package/package.json +1 -1
- package/src/report/component/ReportPanel.js +4 -3
- package/src/report/component/SimpleReportTag.scss +5 -1
- package/src/uielement/plugin/UnifiedButtonToolbarPlugin.js +99 -0
- package/src/uielement/plugin/configPanel/UnifiedButtonToolbarPluginConfigPanelFormEditor.js +100 -0
- package/src/util.js +2 -2
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
|
+
# Version 2.5.50, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b79597948d4412d8613b028e5e07e49cfb173eb4)
|
|
2
|
+
* ## Features
|
|
3
|
+
* <span style='color:green'>feat: HT-7346: rename plugin</span> ([e06f2c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e06f2cd09c83890ca955c6a11d3071a8d31a1528))
|
|
4
|
+
|
|
5
|
+
* update: CHANGELOG.md ([9ca215], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9ca2159b8222b4953516c7720fc9f5dbe03e4337))
|
|
6
|
+
|
|
7
|
+
# Version 2.5.49, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/322a8954fd81ce96ca3e60a23d7b46b4659f839b)
|
|
8
|
+
* ## Features
|
|
9
|
+
* <span style='color:green'>feat: HT-7346: select dock position (top or bottom)</span> ([45db87], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/45db8784c5594ea4add6dc701cd5deb0a2e592e3))
|
|
10
|
+
* <span style='color:green'>feat: HT-7346: add plugin</span> ([614610], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6146105ce74a3c4ab946da32dac3ab16aac848af))
|
|
11
|
+
* <span style='color:green'>feat: HT-7346: add plugin</span> ([e27670], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e27670eb8953cde6b5825b123d0f03d553c097a4))
|
|
12
|
+
|
|
13
|
+
* ## Fixes
|
|
14
|
+
* <span style='color:red'>fix Coon.util.promisifyCmd
|
|
15
|
+
fix ReportPanel.loadData - abort previous request</span> ([03cfbd], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/03cfbdf8eabc0a6fde879fa2ce52bd5126a823ee))
|
|
16
|
+
|
|
17
|
+
* update: CHANGELOG.md ([d298b4], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d298b44d4f63889dc665577ca11e622bfb176422))
|
|
18
|
+
|
|
1
19
|
# Version 2.5.48, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ab1fb66dd225271b18992c928a288a9d5115ff7b)
|
|
20
|
+
* ## Fixes
|
|
21
|
+
* <span style='color:red'>fix SimpleReportTag styles</span> ([1b1713], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1b1713313b25b5724e465c418daf5b1db3b803da))
|
|
22
|
+
|
|
2
23
|
* add decimal-light - arbitrary-precision Decimal type for JavaScript
|
|
3
24
|
fix Coon.format.MoneyFormat, zero always format as positive value ([09a4ad], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/09a4ad9879f025371db56475252ec93eeb52b265))
|
|
4
25
|
* HT-7447 feat: возможность создавать свойства команды с описанием ([cc129c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cc129c3265992db5f859f9e32fdc95cd8a3ad88f))
|
package/package.json
CHANGED
|
@@ -896,10 +896,11 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
896
896
|
}
|
|
897
897
|
}
|
|
898
898
|
}
|
|
899
|
+
const store = this.grid.getStore();
|
|
900
|
+
store.getProxy().abort();
|
|
899
901
|
const command = typeof this.getStoreDataCommand === 'function' && this.getStoreDataCommand({});
|
|
900
902
|
if (command) {
|
|
901
903
|
command.on('complete', function(response) {
|
|
902
|
-
const store = this.grid.getStore();
|
|
903
904
|
if (!store.lastOptions) {
|
|
904
905
|
store.lastOptions = {};
|
|
905
906
|
}
|
|
@@ -917,8 +918,8 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
917
918
|
invalidateCache,
|
|
918
919
|
});
|
|
919
920
|
} else {
|
|
920
|
-
if (
|
|
921
|
-
|
|
921
|
+
if (store != null) {
|
|
922
|
+
store.load({
|
|
922
923
|
params: {
|
|
923
924
|
parameterList: Ext.encode(parameterList),
|
|
924
925
|
reportId: this.reportId,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
overflow-x: hidden;
|
|
6
6
|
}
|
|
7
7
|
.x-tagfield-item{
|
|
8
|
-
margin:
|
|
8
|
+
margin: 4px 6px 2px 0;
|
|
9
9
|
&.mark-to-remove{
|
|
10
10
|
background-color: #ef5350;
|
|
11
11
|
}
|
|
@@ -15,4 +15,8 @@
|
|
|
15
15
|
padding-bottom: 3px;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
.x-placeholder-label {
|
|
20
|
+
display: none;
|
|
21
|
+
}
|
|
18
22
|
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
Ext.define('Coon.uielement.plugin.UnifiedButtonToolbarPluginn', {
|
|
2
|
+
extend: 'Ext.AbstractPlugin',
|
|
3
|
+
alias: 'plugin.UnifiedButtonToolbarPluginn',
|
|
4
|
+
uses: [],
|
|
5
|
+
controller: null,
|
|
6
|
+
windowClose: false,
|
|
7
|
+
compareCash: false,
|
|
8
|
+
configurePanelWizardForFormEditor: 'UnifiedButtonToolbarPluginnConfigPanelFormEditor',
|
|
9
|
+
|
|
10
|
+
init: function(view) {
|
|
11
|
+
this.controller = view && view.getController();
|
|
12
|
+
this.controller.on('generateHash', this.generateHash, this);
|
|
13
|
+
this.controller.callDialog = this.callDialog.bind(this);
|
|
14
|
+
const window = view.up('WindowWrap');
|
|
15
|
+
if (window) {
|
|
16
|
+
window.on('beforeclose', this.onBeforeCloseWindow, this);
|
|
17
|
+
}
|
|
18
|
+
this.controller.standardToolbar = Ext.create('Ext.toolbar.Toolbar', {
|
|
19
|
+
dock: this.dock,
|
|
20
|
+
items: [
|
|
21
|
+
'->',
|
|
22
|
+
{
|
|
23
|
+
xtype: 'button',
|
|
24
|
+
reference: 'standardSaveButton',
|
|
25
|
+
text: 'Сохранить',
|
|
26
|
+
handler: this.save.bind(this, false),
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
});
|
|
30
|
+
if (this.dock === 'bottom') {
|
|
31
|
+
view.dockedItems.add(this.controller.standardToolbar);
|
|
32
|
+
} else {
|
|
33
|
+
view.dockedItems.insert(0, this.controller.standardToolbar);
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
onBeforeCloseWindow() {
|
|
37
|
+
this.save(true);
|
|
38
|
+
},
|
|
39
|
+
callDialog() {
|
|
40
|
+
Ext.Msg.show({
|
|
41
|
+
title: 'Сохранить изменения?',
|
|
42
|
+
message: 'Были обнаружены изменения, сохранить их?',
|
|
43
|
+
buttons: Ext.Msg.YESNOCANCEL,
|
|
44
|
+
icon: Ext.Msg.QUESTION,
|
|
45
|
+
fn: function(btn) {
|
|
46
|
+
if (btn === 'yes') {
|
|
47
|
+
this.callSaveHandler(true);
|
|
48
|
+
} else if (btn === 'no') {
|
|
49
|
+
this.closeWindow();
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
},
|
|
54
|
+
closeWindow() {
|
|
55
|
+
this.controller.getView().up('WindowWrap').close();
|
|
56
|
+
},
|
|
57
|
+
save(windowClose) {
|
|
58
|
+
this.windowClose = windowClose;
|
|
59
|
+
if (this.prepareBeanHandlerName &&
|
|
60
|
+
this.controller[this.prepareBeanHandlerName] &&
|
|
61
|
+
typeof this.controller[this.prepareBeanHandlerName] === 'function') {
|
|
62
|
+
this.compareCash = true;
|
|
63
|
+
this.controller[this.prepareBeanHandlerName].call();
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
generateHash(params) {
|
|
67
|
+
if (params && Ext.isObject(params)) {
|
|
68
|
+
if (this.compareCash === true) {
|
|
69
|
+
this.compareCash = false;
|
|
70
|
+
const currentHash = Coon.util.generateHashFromObj(params);
|
|
71
|
+
if (this.controller.savedDataHash !== currentHash) {
|
|
72
|
+
if (this.windowClose) {
|
|
73
|
+
this.callDialog();
|
|
74
|
+
} else {
|
|
75
|
+
this.callSaveHandler();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
} else {
|
|
79
|
+
this.controller.savedDataHash = Coon.util.generateHashFromObj(params);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
async callSaveHandler(closeAfterSave) {
|
|
84
|
+
if (
|
|
85
|
+
this.saveHandlerName &&
|
|
86
|
+
this.controller[this.saveHandlerName] &&
|
|
87
|
+
typeof this.controller[this.saveHandlerName] === 'function'
|
|
88
|
+
) {
|
|
89
|
+
if (this.controller[this.saveHandlerName] instanceof Promise) {
|
|
90
|
+
await this.controller[this.saveHandlerName].call(this.controller);
|
|
91
|
+
} else {
|
|
92
|
+
this.controller[this.saveHandlerName].call(this.controller);
|
|
93
|
+
}
|
|
94
|
+
if (closeAfterSave) {
|
|
95
|
+
this.closeWindow();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
});
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
Ext.define('Coon.uielement.plugin.configPanel.UnifiedButtonToolbarPluginConfigPanelFormEditor', {
|
|
2
|
+
extend: 'Ext.panel.Panel',
|
|
3
|
+
alias: 'widget.UnifiedButtonToolbarPluginConfigPanelFormEditor',
|
|
4
|
+
description: 'Добавляет стандартный тулбар',
|
|
5
|
+
viewModel: {
|
|
6
|
+
data: {
|
|
7
|
+
saveHandlerName: '',
|
|
8
|
+
prepareBeanHandlerName: '',
|
|
9
|
+
dock: 'bottom',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
layout: {
|
|
13
|
+
type: 'vbox',
|
|
14
|
+
align: 'stretch',
|
|
15
|
+
},
|
|
16
|
+
items: [
|
|
17
|
+
{
|
|
18
|
+
xtype: 'pluginDescriptionLabel',
|
|
19
|
+
bind: {
|
|
20
|
+
value: '{description}',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
xtype: 'comboBtnWrapper',
|
|
25
|
+
combobox: {
|
|
26
|
+
xtype: 'BaseComboBox',
|
|
27
|
+
fieldLabel: 'Функция сохранения данных',
|
|
28
|
+
labelWidth: 60,
|
|
29
|
+
flex: 1,
|
|
30
|
+
loadOnRender: false,
|
|
31
|
+
hideMode: 'offsets',
|
|
32
|
+
allowBlank: false,
|
|
33
|
+
store: 'codeHandlers',
|
|
34
|
+
bind: {
|
|
35
|
+
value: '{saveHandlerName}',
|
|
36
|
+
},
|
|
37
|
+
valueField: 'id',
|
|
38
|
+
displayField: 'id',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
xtype: 'comboBtnWrapper',
|
|
43
|
+
combobox: {
|
|
44
|
+
xtype: 'BaseComboBox',
|
|
45
|
+
fieldLabel: 'Функция подготовки данных для сохранения',
|
|
46
|
+
labelWidth: 60,
|
|
47
|
+
flex: 1,
|
|
48
|
+
loadOnRender: false,
|
|
49
|
+
hideMode: 'offsets',
|
|
50
|
+
allowBlank: false,
|
|
51
|
+
store: 'codeHandlers',
|
|
52
|
+
bind: {
|
|
53
|
+
value: '{prepareBeanHandlerName}',
|
|
54
|
+
},
|
|
55
|
+
valueField: 'id',
|
|
56
|
+
displayField: 'id',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
xtype: 'segmentedbutton',
|
|
61
|
+
allowMultiple: false,
|
|
62
|
+
reference: 'segmentDock',
|
|
63
|
+
bind: {
|
|
64
|
+
value: '{dock}',
|
|
65
|
+
},
|
|
66
|
+
items: [{
|
|
67
|
+
text: 'Отобразить внизу',
|
|
68
|
+
value: 'bottom',
|
|
69
|
+
}, {
|
|
70
|
+
text: 'Отобразить вверху',
|
|
71
|
+
value: 'top',
|
|
72
|
+
}],
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
getData: function() {
|
|
76
|
+
return this.getConfiguration();
|
|
77
|
+
},
|
|
78
|
+
setData: function(data) {
|
|
79
|
+
data && this.doInit(data);
|
|
80
|
+
},
|
|
81
|
+
doInit: function(config) {
|
|
82
|
+
this.getViewModel().set('description', this.description);
|
|
83
|
+
for (const parameterName in config) {
|
|
84
|
+
if (!config.hasOwnProperty(parameterName) || parameterName === 'ptype') {
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
this.getViewModel().set(parameterName, config[parameterName]);
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
getConfiguration: function() {
|
|
91
|
+
const result = {};
|
|
92
|
+
const vm = this.getViewModel();
|
|
93
|
+
['saveHandlerName', 'prepareBeanHandlerName', 'dock'].forEach((el) => {
|
|
94
|
+
if (vm.get(el)) {
|
|
95
|
+
result[el] = vm.get(el);
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
return result;
|
|
99
|
+
},
|
|
100
|
+
});
|
package/src/util.js
CHANGED
|
@@ -37,10 +37,10 @@ Ext.define('Coon.util', {
|
|
|
37
37
|
if (Ext.isObject(cmd) && (this.isCommandAlias(cmd.command) || this.isCommandClass(cmd.command))) {
|
|
38
38
|
args = cmd.params;
|
|
39
39
|
cmd.getParamsFromObject = true;
|
|
40
|
-
return Ext.create(cmd.command, {
|
|
40
|
+
return Ext.create(cmd.command, {processError: typeof cmd.processError === 'boolean' ? cmd.processError : true});
|
|
41
41
|
}
|
|
42
42
|
if (this.isCommandAlias(cmd) || this.isCommandClass(cmd)) {
|
|
43
|
-
return Ext.create(cmd, {
|
|
43
|
+
return Ext.create(cmd, {processError: true});
|
|
44
44
|
}
|
|
45
45
|
throw new Error(`promisifyCmd error: this command is neither an alias nor a class`);
|
|
46
46
|
};
|
package/src/version.js
CHANGED