ru.coon 2.6.4 → 2.6.6
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 +20 -0
- package/package.json +2 -2
- package/src/common/component/Auth.js +21 -42
- package/src/common/component/characteristic/characteristicGroup/EditorOptionsWindow.js +150 -0
- package/src/common/component/characteristic/characteristicGroup/EditorOptionsWindowController.js +174 -0
- package/src/common/component/characteristic/characteristicGroup/EntityGroupCharacteristicEditor.js +23 -0
- package/src/common/component/characteristic/characteristicGroup/EntityGroupCharacteristicEditorController.js +38 -0
- package/src/common/component/editor/CharacteristicGridEditor.js +3 -0
- package/src/common/component/editor/TypedCharacteristicEditor.js +0 -5
- package/src/common/component/editor/creators/BaseEditorCreator.js +0 -3
- package/src/common/component/editor/creators/ByReportEditorCreator.js +0 -3
- package/src/common/component/editor/creators/CustomPanelEditorCreator.js +0 -3
- package/src/common/component/editor/creators/ForeignKeyEditorCreator.js +0 -3
- package/src/common/component/editor/creators/NoteEditorCreator.js +0 -3
- package/src/common/component/editor/creators/NumberEditorCreator.js +17 -4
- package/src/common/component/editor/creators/SimpleReportEditorCreator.js +0 -3
- package/src/common/component/editor/creators/TriggerFieldEditorCreator.js +0 -3
- package/src/security/GenerateTokenPanel.js +3 -2
- package/src/uielement/component/SearchByPropCombo.js +53 -0
- package/src/uielement/plugin/UnifiedButtonToolbarPlugin.js +19 -2
- package/src/uielement/plugin/configPanel/MethodChainPluginConfigPanelFormEditor.js +10 -6
- package/src/uielement/plugin/configPanel/UnifiedButtonToolbarPluginConfigPanelFormEditor.js +34 -46
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
|
+
# Version 2.6.6, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5a18af0bcc182d756427e1fd5e522dab51f5f6ca)
|
|
2
|
+
* ## Features
|
|
3
|
+
* <span style='color:green'>feat: HT-8006: Create cancel button, add search plugin by name form combo, change field labels</span> ([7dc802], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7dc8027771536eb1fcffd9d3f59a362699abf5c6))
|
|
4
|
+
|
|
5
|
+
* ## Fixes
|
|
6
|
+
* <span style='color:red'> HT-8036: remove override view config</span> ([f13055], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f1305573f3761f2657e995310a79a7d75887c091))
|
|
7
|
+
|
|
8
|
+
* update extjs_iconpack to 1.3.19 ([adff9d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/adff9d7411fad6a04e153065c9c472b080d7e719))
|
|
9
|
+
* update: CHANGELOG.md ([f82d7f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f82d7f36520836cc6733ac936ef98bf0589b15d2))
|
|
10
|
+
|
|
11
|
+
# Version 2.6.5, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5695d2c215ad6469aacd802ca46a536c81845c35)
|
|
12
|
+
* ## Fixes
|
|
13
|
+
* <span style='color:red'>Fix:TR-67289 refactoring authorization</span> ([8bdc4b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8bdc4b11e7443b819b52c4eef8e0cc2d9c8f3f5b))
|
|
14
|
+
|
|
15
|
+
* update: CHANGELOG.md ([490d0e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/490d0eb96a199419068bdf69e20aa0db63a6180d))
|
|
16
|
+
|
|
1
17
|
# Version 2.6.4, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f9a1013bbcc9c01ba7baa130b16648d222144ea0)
|
|
18
|
+
* ## Features
|
|
19
|
+
* <span style='color:green'>feat: HT-7986: Create mask editing form panel</span> ([5d812e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5d812e4dd2087bbf6be625630133bfc120b5a60f))
|
|
20
|
+
|
|
2
21
|
* ## Fixes
|
|
3
22
|
* <span style='color:red'>fix "сохнарить"</span> ([a5fa42], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a5fa421c079792cf51f04ac696664731427620bf))
|
|
4
23
|
|
|
@@ -9,6 +28,7 @@
|
|
|
9
28
|
* <span style='color:red'>fix uiElement/get request</span> ([edac67], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/edac674cb5d023de5ad274262db6d619de7d50fd))
|
|
10
29
|
* <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))
|
|
11
30
|
|
|
31
|
+
* CRM-8252 2-й этап_Реализация перехода в карточку дела/документа ПИР ([d7b3f8], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d7b3f8e9f622679fbffb338530ee014736b61446))
|
|
12
32
|
* update: CHANGELOG.md ([1e55ff], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1e55ff88b8c2f2a8c0b71674c719a0daa1e2dbc3))
|
|
13
33
|
|
|
14
34
|
# Version 2.6.2, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b12213a59d39c7fd13513b74268eb902a0c86720)
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "ru.coon"
|
|
5
5
|
},
|
|
6
6
|
"description": "",
|
|
7
|
-
"version": "2.6.
|
|
7
|
+
"version": "2.6.6",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"ace-diff": "^3.0.3",
|
|
28
28
|
"decimal.js-light": "^2.5.1",
|
|
29
29
|
"echarts": "^5.3.3",
|
|
30
|
-
"extjs_iconpack": "1.3.
|
|
30
|
+
"extjs_iconpack": "1.3.19",
|
|
31
31
|
"json5": "2.2.3",
|
|
32
32
|
"object-hash": "^3.0.0",
|
|
33
33
|
"sigma-printjs": "^1.0.1",
|
|
@@ -4,14 +4,6 @@ Ext.define('Coon.common.component.Auth', {
|
|
|
4
4
|
systemPropertyName: 'VERSIONING_EMAIL_PERSONIFICATION_SW',
|
|
5
5
|
defaultDomain: '@sigma-it.ru',
|
|
6
6
|
privates: {
|
|
7
|
-
showError(e) {
|
|
8
|
-
Ext.create('Coon.report.component.ErrorWindow', {
|
|
9
|
-
autoShow: true,
|
|
10
|
-
title: 'Ошибка авторизации',
|
|
11
|
-
trace: e.message,
|
|
12
|
-
message: 'Во время авторизации произошла ошибка',
|
|
13
|
-
});
|
|
14
|
-
},
|
|
15
7
|
|
|
16
8
|
verify(data) {
|
|
17
9
|
return new Promise((resolve, reject) => {
|
|
@@ -39,25 +31,6 @@ Ext.define('Coon.common.component.Auth', {
|
|
|
39
31
|
});
|
|
40
32
|
},
|
|
41
33
|
|
|
42
|
-
isVerified(data) {
|
|
43
|
-
return (
|
|
44
|
-
data &&
|
|
45
|
-
Coon.util.generateHashFromObj(
|
|
46
|
-
Object.assign({}, data, {salt: 'auth'})
|
|
47
|
-
) === this.dataChecksum
|
|
48
|
-
);
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
markAsVerified(data) {
|
|
52
|
-
try {
|
|
53
|
-
this.dataChecksum = Coon.util.generateHashFromObj(
|
|
54
|
-
Object.assign({}, data, {salt: 'auth'})
|
|
55
|
-
);
|
|
56
|
-
} catch (e) {
|
|
57
|
-
Coon.log.error('Failed to mark auth data as verified', e);
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
|
|
61
34
|
parseJWT: (token) => {
|
|
62
35
|
try {
|
|
63
36
|
return JSON.parse(
|
|
@@ -99,6 +72,14 @@ Ext.define('Coon.common.component.Auth', {
|
|
|
99
72
|
});
|
|
100
73
|
},
|
|
101
74
|
},
|
|
75
|
+
showError(e) {
|
|
76
|
+
Ext.create('Coon.report.component.ErrorWindow', {
|
|
77
|
+
autoShow: true,
|
|
78
|
+
title: 'Ошибка авторизации',
|
|
79
|
+
trace: e.message,
|
|
80
|
+
message: 'Во время авторизации произошла ошибка',
|
|
81
|
+
});
|
|
82
|
+
},
|
|
102
83
|
|
|
103
84
|
handleAuthorization() {
|
|
104
85
|
return this.isValid().then((authorized) => authorized || this.request());
|
|
@@ -106,6 +87,7 @@ Ext.define('Coon.common.component.Auth', {
|
|
|
106
87
|
|
|
107
88
|
// Проверяет включена ли авторизация
|
|
108
89
|
isEnabled() {
|
|
90
|
+
return Promise.resolve(true);
|
|
109
91
|
return Coon.SystemProperties.fetch(
|
|
110
92
|
this.systemPropertyName,
|
|
111
93
|
'boolean'
|
|
@@ -116,20 +98,15 @@ Ext.define('Coon.common.component.Auth', {
|
|
|
116
98
|
return new Promise((resolve) => {
|
|
117
99
|
const data = this.getCachedData();
|
|
118
100
|
if (data) {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
.
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
resolve(false);
|
|
129
|
-
});
|
|
130
|
-
} else {
|
|
131
|
-
resolve(true);
|
|
132
|
-
}
|
|
101
|
+
this.verify(data)
|
|
102
|
+
.then((isValid) => {
|
|
103
|
+
resolve(isValid);
|
|
104
|
+
})
|
|
105
|
+
.catch((e) => {
|
|
106
|
+
this.clearCache();
|
|
107
|
+
this.showError(e);
|
|
108
|
+
resolve(false);
|
|
109
|
+
});
|
|
133
110
|
} else {
|
|
134
111
|
resolve(false);
|
|
135
112
|
}
|
|
@@ -142,8 +119,10 @@ Ext.define('Coon.common.component.Auth', {
|
|
|
142
119
|
const wrap = Ext.widget('WindowWrap', {
|
|
143
120
|
title: 'Авторизация',
|
|
144
121
|
maximizable: false,
|
|
145
|
-
resizable:
|
|
122
|
+
resizable: true,
|
|
146
123
|
autoShow: true,
|
|
124
|
+
width: 520,
|
|
125
|
+
height: 280,
|
|
147
126
|
listeners: {
|
|
148
127
|
close: function() {
|
|
149
128
|
resolve(authorized);
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
Ext.define('Coon.uielement.component.characteristic.characteristicGroup.EditorOptionsWindow', {
|
|
2
|
+
extend: 'Ext.window.Window',
|
|
3
|
+
controller: 'EditorOptionsWindowController',
|
|
4
|
+
modal: true,
|
|
5
|
+
xtype: 'EditorOptionsWindow',
|
|
6
|
+
width: 800,
|
|
7
|
+
closeAction: 'destroy',
|
|
8
|
+
title: 'Работа со свойствами',
|
|
9
|
+
height: '80%',
|
|
10
|
+
config: {
|
|
11
|
+
value: null,
|
|
12
|
+
editor: null,
|
|
13
|
+
editorOptions: {},
|
|
14
|
+
},
|
|
15
|
+
listeners: {
|
|
16
|
+
show: 'onShowWindow',
|
|
17
|
+
},
|
|
18
|
+
viewModel: {
|
|
19
|
+
stores: {
|
|
20
|
+
mainStore: {
|
|
21
|
+
type: 'json',
|
|
22
|
+
fields: ['option', 'value'],
|
|
23
|
+
data: [],
|
|
24
|
+
},
|
|
25
|
+
optionsStore: {
|
|
26
|
+
type: 'json',
|
|
27
|
+
data: [],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
data: {
|
|
31
|
+
record: null,
|
|
32
|
+
optionsDataLength: 0,
|
|
33
|
+
currentOption: null,
|
|
34
|
+
optionDescription: '',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
layout: 'border',
|
|
38
|
+
items: [
|
|
39
|
+
{
|
|
40
|
+
xtype: 'grid',
|
|
41
|
+
region: 'center',
|
|
42
|
+
width: 200,
|
|
43
|
+
plugins: {
|
|
44
|
+
cellediting: {
|
|
45
|
+
listeners: {
|
|
46
|
+
edit: 'onEditItem',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
viewConfig: {
|
|
51
|
+
plugins: {
|
|
52
|
+
gridviewdragdrop: {
|
|
53
|
+
dragText: 'Сортировка',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
tbar: {
|
|
58
|
+
items: [
|
|
59
|
+
{
|
|
60
|
+
text: 'Добавить',
|
|
61
|
+
handler: 'addHandler',
|
|
62
|
+
bind: {
|
|
63
|
+
disabled: '{!optionsDataLength}',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
handler: 'deleteHandler',
|
|
68
|
+
text: 'Удалить',
|
|
69
|
+
bind: {
|
|
70
|
+
disabled: '{!record}',
|
|
71
|
+
text: '{buttonText}',
|
|
72
|
+
},
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
bind: {
|
|
77
|
+
store: '{mainStore}',
|
|
78
|
+
selection: '{record}',
|
|
79
|
+
},
|
|
80
|
+
columns: [
|
|
81
|
+
{
|
|
82
|
+
header: 'Свойство',
|
|
83
|
+
dataIndex: 'option',
|
|
84
|
+
xtype: 'hintColumn',
|
|
85
|
+
editor: {
|
|
86
|
+
xtype: 'combo',
|
|
87
|
+
allowBlank: false,
|
|
88
|
+
tpl: Ext.create('Ext.XTemplate',
|
|
89
|
+
'<ul class="x-list-plain">' +
|
|
90
|
+
'<tpl for=".">',
|
|
91
|
+
'<li role="option" data-qtip="{[values.description]}" class="x-boundlist-item">{[values.option]}</li>',
|
|
92
|
+
'</tpl>' +
|
|
93
|
+
'</ul>'),
|
|
94
|
+
queryMode: 'local',
|
|
95
|
+
editable: false,
|
|
96
|
+
displayField: 'option',
|
|
97
|
+
valueField: 'option',
|
|
98
|
+
bind: {
|
|
99
|
+
store: '{optionsStore}',
|
|
100
|
+
},
|
|
101
|
+
listeners: {
|
|
102
|
+
select: 'onSelectCombo',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
flex: 1,
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
xtype: 'form',
|
|
111
|
+
reference: 'valuesForm',
|
|
112
|
+
flex: 1,
|
|
113
|
+
bodyPadding: 10,
|
|
114
|
+
split: true,
|
|
115
|
+
region: 'east',
|
|
116
|
+
bind: {
|
|
117
|
+
disabled: '{!record || !currentOption}',
|
|
118
|
+
},
|
|
119
|
+
items: [
|
|
120
|
+
{
|
|
121
|
+
xtype: 'displayfield',
|
|
122
|
+
fieldLabel: 'Свойство',
|
|
123
|
+
anchor: '100%',
|
|
124
|
+
bind: {
|
|
125
|
+
value: '{currentOption}',
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
xtype: 'displayfield',
|
|
130
|
+
fieldLabel: 'Описание',
|
|
131
|
+
anchor: '100%',
|
|
132
|
+
bind: {
|
|
133
|
+
value: '{optionDescription}',
|
|
134
|
+
},
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
buttons: [
|
|
140
|
+
{
|
|
141
|
+
text: 'Сохранить',
|
|
142
|
+
ui: 'orange-button',
|
|
143
|
+
handler: 'saveHandler',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
text: 'Закрыть',
|
|
147
|
+
handler: 'closeHandler',
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
});
|
package/src/common/component/characteristic/characteristicGroup/EditorOptionsWindowController.js
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
Ext.define('Coon.uielement.component.characteristic.characteristicGroup.EditorOptionsWindowController', {
|
|
2
|
+
extend: 'Ext.app.ViewController',
|
|
3
|
+
alias: 'controller.EditorOptionsWindowController',
|
|
4
|
+
saveHandler: function() {
|
|
5
|
+
this.updateValue();
|
|
6
|
+
const data = {};
|
|
7
|
+
const items = this.getViewModel().getStore('mainStore').getRange();
|
|
8
|
+
if (!items.length) {
|
|
9
|
+
this.fireViewEvent('dataIsSaved', '');
|
|
10
|
+
this.closeHandler();
|
|
11
|
+
}
|
|
12
|
+
items.forEach((rec) => {
|
|
13
|
+
if (rec.get('value')) {
|
|
14
|
+
data[rec.get('option')] = rec.get('value');
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
// console.log(data);
|
|
18
|
+
// const converted = Coon.Function.convertAdvancedProperties(data);
|
|
19
|
+
// console.log(converted);
|
|
20
|
+
this.fireViewEvent('dataIsSaved', Ext.JSON.encode(data));
|
|
21
|
+
this.closeHandler();
|
|
22
|
+
},
|
|
23
|
+
closeHandler: function() {
|
|
24
|
+
if (this.getView()) {
|
|
25
|
+
this.getView().close();
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
onShowWindow: function() {
|
|
29
|
+
if (!this.getView().getEditor()) {
|
|
30
|
+
Ext.Msg.show({
|
|
31
|
+
title: 'Ошибка',
|
|
32
|
+
message: 'Не определен едитор',
|
|
33
|
+
icon: Ext.Msg.ERROR,
|
|
34
|
+
buttons: Ext.Msg.OK,
|
|
35
|
+
});
|
|
36
|
+
this.closeHandler();
|
|
37
|
+
}
|
|
38
|
+
const value = this.getView().getValue();
|
|
39
|
+
const proto = Ext.ClassManager.classes[Ext.ClassManager.aliasToName['widget.'+this.getView().getEditor()]].prototype;
|
|
40
|
+
if (!Ext.isObject(proto.editorOptions)) {
|
|
41
|
+
Ext.Msg.show({
|
|
42
|
+
title: 'Ошибка',
|
|
43
|
+
message: 'Не определены опции едитора',
|
|
44
|
+
icon: Ext.Msg.ERROR,
|
|
45
|
+
buttons: Ext.Msg.OK,
|
|
46
|
+
});
|
|
47
|
+
this.closeHandler();
|
|
48
|
+
}
|
|
49
|
+
this.getView().setEditorOptions(proto.editorOptions);
|
|
50
|
+
if (value && Ext.isObject(value)) {
|
|
51
|
+
this.getViewModel().getStore('mainStore').add(Object.keys(value).map((key) => {
|
|
52
|
+
return {option: key, value: value[key]};
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
this.initOptionStore();
|
|
56
|
+
this.getViewModel().bind('{record}', (rec) => {
|
|
57
|
+
this.getViewModel().set('currentOption', rec && !!rec.get('option') ? rec.get('option') : null);
|
|
58
|
+
}, this);
|
|
59
|
+
this.getViewModel().bind('{currentOption}', this.initValuePanel, this);
|
|
60
|
+
},
|
|
61
|
+
updateValue() {
|
|
62
|
+
const form = this.lookup('valuesForm');
|
|
63
|
+
if (form.getRecord()) {
|
|
64
|
+
form.updateRecord();
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
initValuePanel(currentOption) {
|
|
68
|
+
this.updateValue();
|
|
69
|
+
const editorOptions = this.getView().getEditorOptions();
|
|
70
|
+
this.getViewModel().set('optionDescription',
|
|
71
|
+
currentOption && Ext.isObject(editorOptions) && editorOptions[currentOption] ?
|
|
72
|
+
editorOptions[currentOption]['description'] : ''
|
|
73
|
+
);
|
|
74
|
+
const form = this.lookup('valuesForm');
|
|
75
|
+
if (form.items.items[1]) {
|
|
76
|
+
form.remove(form.items.items.find((field) => field.name === 'value'), true);
|
|
77
|
+
}
|
|
78
|
+
if (currentOption && Ext.isObject(editorOptions) && editorOptions[currentOption] && editorOptions[currentOption]['type']) {
|
|
79
|
+
let config = {
|
|
80
|
+
fieldLabel: 'Значение',
|
|
81
|
+
xtype: 'textfield',
|
|
82
|
+
anchor: '100%',
|
|
83
|
+
name: 'value',
|
|
84
|
+
allowBlank: true,
|
|
85
|
+
};
|
|
86
|
+
let isBool = false;
|
|
87
|
+
switch (editorOptions[currentOption]['type']) {
|
|
88
|
+
case 'bool':
|
|
89
|
+
isBool = true,
|
|
90
|
+
config = {
|
|
91
|
+
xtype: 'combobox',
|
|
92
|
+
allowBlank: true,
|
|
93
|
+
forceSelection: true,
|
|
94
|
+
editable: false,
|
|
95
|
+
anchor: '100%',
|
|
96
|
+
name: 'value',
|
|
97
|
+
value: true,
|
|
98
|
+
fieldLabel: 'Значение',
|
|
99
|
+
store: {
|
|
100
|
+
fields: ['val', 'descr'],
|
|
101
|
+
data: [
|
|
102
|
+
{'val': true, 'descr': 'Да'},
|
|
103
|
+
{'val': false, 'descr': 'Нет'}
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
queryMode: 'local',
|
|
107
|
+
displayField: 'descr',
|
|
108
|
+
valueField: 'val',
|
|
109
|
+
};
|
|
110
|
+
break;
|
|
111
|
+
case 'int':
|
|
112
|
+
config.xtype = 'numberfield';
|
|
113
|
+
break;
|
|
114
|
+
case 'js':
|
|
115
|
+
config.xtype = 'textarea';
|
|
116
|
+
config.grow = true;
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
form.add(config);
|
|
120
|
+
const record = this.getViewModel().get('record');
|
|
121
|
+
if (isBool && record && typeof record.get('value') !== 'boolean') {
|
|
122
|
+
record.set('value', true);
|
|
123
|
+
}
|
|
124
|
+
form.loadRecord(record);
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
addHandler() {
|
|
128
|
+
const record = this.getViewModel().getStore('mainStore').insert(0, {value: null});
|
|
129
|
+
const grid = this.getView().down('grid');
|
|
130
|
+
grid.getSelectionModel().select(0);
|
|
131
|
+
grid.getView().scrollTo(0, 0);
|
|
132
|
+
const context = grid.getView().getPosition(record[0], grid.getColumns()[0]);
|
|
133
|
+
grid.setActionableMode(true, context);
|
|
134
|
+
},
|
|
135
|
+
deleteHandler() {
|
|
136
|
+
const vm = this.getViewModel();
|
|
137
|
+
const record = vm.get('record');
|
|
138
|
+
if (record) {
|
|
139
|
+
vm.getStore('mainStore').remove(record);
|
|
140
|
+
this.initOptionStore();
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
onEditItem(el, context) {
|
|
144
|
+
if (context.field === 'option') {
|
|
145
|
+
this.initOptionStore();
|
|
146
|
+
this.getViewModel().set('currentOption', context.record.get('option') || null);
|
|
147
|
+
context.record.set('value', null);
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
onSelectCombo(el, rec) {
|
|
151
|
+
const record = this.getViewModel().get('record');
|
|
152
|
+
const field = this.lookup('valuesForm').items.items.find((f) => f.name === 'value');
|
|
153
|
+
if (field) {
|
|
154
|
+
field.setValue(null);
|
|
155
|
+
}
|
|
156
|
+
record.set('value', null);
|
|
157
|
+
const grid = this.getView().down('grid');
|
|
158
|
+
const context = grid.getView().getPosition(record, grid.getColumns()[0]);
|
|
159
|
+
grid.setActionableMode(false, context);
|
|
160
|
+
},
|
|
161
|
+
initOptionStore() {
|
|
162
|
+
const vm = this.getViewModel();
|
|
163
|
+
const options = vm.getStore('mainStore').getRange().map((rec) => rec.get('option'));
|
|
164
|
+
const optionsData = [];
|
|
165
|
+
const editorOptions = this.getView().getEditorOptions();
|
|
166
|
+
Object.keys(editorOptions).forEach((key) => {
|
|
167
|
+
if (options.indexOf(key) < 0) {
|
|
168
|
+
optionsData.push({option: key, description: editorOptions[key]['description']});
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
vm.set('optionsDataLength', optionsData.length);
|
|
172
|
+
vm.getStore('optionsStore').setData(optionsData);
|
|
173
|
+
},
|
|
174
|
+
});
|
package/src/common/component/characteristic/characteristicGroup/EntityGroupCharacteristicEditor.js
CHANGED
|
@@ -159,6 +159,14 @@ Ext.define('Coon.uielement.component.characteristic.characteristicGroup.EntityGr
|
|
|
159
159
|
xtype: 'hintColumn',
|
|
160
160
|
editor: {
|
|
161
161
|
xtype: 'textfield',
|
|
162
|
+
triggers: {
|
|
163
|
+
info: {
|
|
164
|
+
cls: 'svg-icon svg-icon-settings',
|
|
165
|
+
tooltip: 'Очистить поле',
|
|
166
|
+
hideOnReadOnly: true,
|
|
167
|
+
handler: 'onTriggerClick',
|
|
168
|
+
},
|
|
169
|
+
},
|
|
162
170
|
},
|
|
163
171
|
flex: 1,
|
|
164
172
|
},
|
|
@@ -188,6 +196,21 @@ Ext.define('Coon.uielement.component.characteristic.characteristicGroup.EntityGr
|
|
|
188
196
|
cellediting: {
|
|
189
197
|
listeners: {
|
|
190
198
|
edit: 'onEditItem',
|
|
199
|
+
beforeedit: (el, context) => {
|
|
200
|
+
if (context.field === 'mask') {
|
|
201
|
+
const editor = context.record.get('editor');
|
|
202
|
+
if (editor) {
|
|
203
|
+
const proto = Ext.ClassManager.classes[Ext.ClassManager.aliasToName['widget.'+editor]].prototype;
|
|
204
|
+
if (Ext.isObject(proto.editorOptions)) {
|
|
205
|
+
context.column.field.triggers.info.show();
|
|
206
|
+
} else {
|
|
207
|
+
context.column.field.triggers.info.hide();
|
|
208
|
+
}
|
|
209
|
+
} else {
|
|
210
|
+
context.column.field.triggers.info.hide();
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
191
214
|
},
|
|
192
215
|
},
|
|
193
216
|
},
|
|
@@ -162,4 +162,42 @@ Ext.define('Coon.uielement.component.characteristic.characteristicGroup.EntityGr
|
|
|
162
162
|
}
|
|
163
163
|
},
|
|
164
164
|
|
|
165
|
+
onTriggerClick(el) {
|
|
166
|
+
const record = this.getViewModel().get('record');
|
|
167
|
+
if (record && record.get('editor')) {
|
|
168
|
+
const fn = () => {
|
|
169
|
+
const json = Ext.JSON.decode(el.getValue(), true);
|
|
170
|
+
const window = Ext.create('Coon.uielement.component.characteristic.characteristicGroup.EditorOptionsWindow', {
|
|
171
|
+
value: json || null,
|
|
172
|
+
editor: record.get('editor') || null,
|
|
173
|
+
});
|
|
174
|
+
window.on('dataIsSaved', (win, data) => {
|
|
175
|
+
record.set('mask', data);
|
|
176
|
+
}, this);
|
|
177
|
+
window.show();
|
|
178
|
+
};
|
|
179
|
+
if (el.getValue()) {
|
|
180
|
+
const json = Ext.JSON.decode(el.getValue(), true);
|
|
181
|
+
if (!json || !Ext.isObject(json)) {
|
|
182
|
+
Ext.Msg.show({
|
|
183
|
+
title: 'Внимание',
|
|
184
|
+
message: 'Текущее значение не является JSON объектом и оно будет удалено. Продолжить?',
|
|
185
|
+
buttons: Ext.Msg.YESNO,
|
|
186
|
+
icon: Ext.Msg.QUESTION,
|
|
187
|
+
fn: function(btn) {
|
|
188
|
+
if (btn === 'yes') {
|
|
189
|
+
record.set('mask', null);
|
|
190
|
+
fn();
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
});
|
|
194
|
+
} else {
|
|
195
|
+
fn();
|
|
196
|
+
}
|
|
197
|
+
} else {
|
|
198
|
+
fn();
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
|
|
165
203
|
});
|
|
@@ -24,6 +24,9 @@ Ext.define('Coon.common.component.editor.CharacteristicGridEditor', {
|
|
|
24
24
|
viewConfig: {
|
|
25
25
|
getRowClass(record) {
|
|
26
26
|
const ns = Coon.report.model.CharacteristicBeanFields;
|
|
27
|
+
if (record.get('isDeleted')) {
|
|
28
|
+
return 'delete-row';
|
|
29
|
+
}
|
|
27
30
|
if (
|
|
28
31
|
record.get(ns.$required) &&
|
|
29
32
|
!record.get(ns.$allowEmpty) &&
|
|
@@ -44,11 +44,6 @@ Ext.define('Coon.common.component.editor.TypedCharacteristicEditor', {
|
|
|
44
44
|
},
|
|
45
45
|
},
|
|
46
46
|
});
|
|
47
|
-
this.viewConfig = {
|
|
48
|
-
getRowClass: Coon.Function.markDelete(
|
|
49
|
-
'isDeleted'
|
|
50
|
-
),
|
|
51
|
-
};
|
|
52
47
|
this.plugins = Ext.clone(this.plugins) || [];
|
|
53
48
|
|
|
54
49
|
if (this.enableToolBar) {
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
Ext.define('Coon.common.component.editor.creators.ByReportEditorCreator', {
|
|
2
2
|
extend: 'Coon.common.component.editor.creators.TriggerFieldEditorCreator',
|
|
3
|
-
alternateClassName: [
|
|
4
|
-
'SigmaUtilities.view.common.component.editor.creators.ByReportEditorCreator'
|
|
5
|
-
],
|
|
6
3
|
alias: 'widget.ByReportEditorCreator',
|
|
7
4
|
xtype: 'ByReportEditorCreator',
|
|
8
5
|
editable: false,
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
Ext.define('Coon.common.component.editor.creators.CustomPanelEditorCreator', {
|
|
2
2
|
extend: 'Coon.common.component.editor.creators.BaseEditorCreator',
|
|
3
|
-
alternateClassName: [
|
|
4
|
-
'SigmaUtilities.view.common.component.editor.creators.CustomPanelEditorCreator'
|
|
5
|
-
],
|
|
6
3
|
alias: 'widget.CustomPanelEditorCreator',
|
|
7
4
|
xtype: 'CustomPanelEditorCreator',
|
|
8
5
|
config: {
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
Ext.define('Coon.common.component.editor.creators.ForeignKeyEditorCreator', {
|
|
2
2
|
extend: 'Coon.common.component.editor.creators.BaseEditorCreator',
|
|
3
|
-
alternateClassName: [
|
|
4
|
-
'SigmaUtilities.view.common.component.editor.creators.ForeignKeyEditorCreator'
|
|
5
|
-
],
|
|
6
3
|
alias: 'widget.ForeignKeyEditorCreator',
|
|
7
4
|
xtype: 'ForeignKeyEditorCreator',
|
|
8
5
|
disableInternalEditor: true,
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
Ext.define('Coon.common.component.editor.creators.NoteEditorCreator', {
|
|
2
2
|
extend: 'Coon.common.component.editor.creators.BaseEditorCreator',
|
|
3
|
-
alternateClassName: [
|
|
4
|
-
'SigmaUtilities.view.common.component.editor.creators.NoteEditorCreator'
|
|
5
|
-
],
|
|
6
3
|
alias: 'widget.NoteEditorCreator',
|
|
7
4
|
xtype: 'NoteEditorCreator',
|
|
8
5
|
createField: function(record, parent) {
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
Ext.define('Coon.common.component.editor.creators.NumberEditorCreator', {
|
|
2
2
|
extend: 'Coon.common.component.editor.creators.BaseEditorCreator',
|
|
3
|
-
alternateClassName: [
|
|
4
|
-
'SigmaUtilities.view.common.component.editor.creators.NumberEditorCreator'
|
|
5
|
-
],
|
|
6
3
|
alias: 'widget.NumberEditorCreator',
|
|
7
4
|
xtype: 'NumberEditorCreator',
|
|
8
5
|
decimalSeparator: ',',
|
|
9
|
-
|
|
6
|
+
/**
|
|
7
|
+
* @description Перенчень параметров разрешенных для добавление в поле маски сущности (характеристики)
|
|
8
|
+
* @param config
|
|
9
|
+
* @example
|
|
10
|
+
* editorOptions: {
|
|
11
|
+
* allowDecimals: {
|
|
12
|
+
* type: 'bool',
|
|
13
|
+
* description: 'Разрешать дробные значения',
|
|
14
|
+
* },
|
|
15
|
+
* },
|
|
16
|
+
*/
|
|
17
|
+
editorOptions: {
|
|
18
|
+
allowDecimals: {
|
|
19
|
+
type: 'bool',
|
|
20
|
+
description: 'Разрешать дробные значения',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
10
23
|
normalizeRawValue(raw, separator) {
|
|
11
24
|
if (!raw) {
|
|
12
25
|
throw new Error('ERROR: normalizeRawValue, raw must be nonempty string!');
|
|
@@ -7,9 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Ext.define('Coon.common.component.editor.creators.SimpleReportEditorCreator', {
|
|
9
9
|
extend: 'Coon.common.component.editor.creators.BaseEditorCreator',
|
|
10
|
-
alternateClassName: [
|
|
11
|
-
'SigmaUtilities.view.common.component.editor.creators.SimpleReportEditorCreator'
|
|
12
|
-
],
|
|
13
10
|
alias: 'widget.SimpleReportEditorCreator',
|
|
14
11
|
xtype: 'SimpleReportEditorCreator',
|
|
15
12
|
createField: function(record, parent, context) {
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
Ext.define('Coon.common.component.editor.creators.TriggerFieldEditorCreator', {
|
|
2
2
|
extend: 'Coon.common.component.editor.creators.BaseEditorCreator',
|
|
3
|
-
alternateClassName: [
|
|
4
|
-
'SigmaUtilities.view.common.component.editor.creators.TriggerFieldEditorCreator'
|
|
5
|
-
],
|
|
6
3
|
alias: 'widget.TriggerFieldEditorCreator',
|
|
7
4
|
xtype: 'TriggerFieldEditorCreator',
|
|
8
5
|
assignDoubleClick: true,
|
|
@@ -24,8 +24,6 @@ Ext.define('Coon.security.GenerateTokenPanel', {
|
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
26
|
},
|
|
27
|
-
width: 520,
|
|
28
|
-
height: 240,
|
|
29
27
|
bodyPadding: 20,
|
|
30
28
|
items: [
|
|
31
29
|
{
|
|
@@ -102,8 +100,10 @@ Ext.define('Coon.security.GenerateTokenPanel', {
|
|
|
102
100
|
const email =
|
|
103
101
|
values.emailPrefix.replace(this.vm.get('defaultDomain'), '') +
|
|
104
102
|
this.vm.get('defaultDomain');
|
|
103
|
+
form.mask();
|
|
105
104
|
this.auth.generateToken(email, values.gitToken)
|
|
106
105
|
.then(function(properties) {
|
|
106
|
+
form && form.unmask();
|
|
107
107
|
if (!Ext.isObject(properties)) {
|
|
108
108
|
throw new Error('Не удалось сохранить токен');
|
|
109
109
|
}
|
|
@@ -117,6 +117,7 @@ Ext.define('Coon.security.GenerateTokenPanel', {
|
|
|
117
117
|
}
|
|
118
118
|
})
|
|
119
119
|
.catch((e) => {
|
|
120
|
+
form && form.unmask();
|
|
120
121
|
Coon.log.error(e.message);
|
|
121
122
|
this.vm.set('pending', false);
|
|
122
123
|
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
Ext.define('Coon.uielement.component.SearchByPropCombo', {
|
|
2
|
+
extend: 'Coon.common.field.combo.BaseComboBox',
|
|
3
|
+
xtype: 'SearchByPropCombo',
|
|
4
|
+
fieldLabel: 'Обработчик',
|
|
5
|
+
loadOnRender: false,
|
|
6
|
+
hideMode: 'offsets',
|
|
7
|
+
valueField: 'handlerName',
|
|
8
|
+
displayField: 'handlerWithPtype',
|
|
9
|
+
minChars: 2,
|
|
10
|
+
store: {
|
|
11
|
+
fields: [
|
|
12
|
+
{name: 'handlerName', type: 'string'},
|
|
13
|
+
{name: 'ptype', type: 'string'},
|
|
14
|
+
{
|
|
15
|
+
name: 'handlerWithPtype',
|
|
16
|
+
calculate: function(data) {
|
|
17
|
+
return data.handlerName + ' - ' + data.ptype;
|
|
18
|
+
},
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
autoLoad: false,
|
|
22
|
+
},
|
|
23
|
+
triggers: {
|
|
24
|
+
search: {
|
|
25
|
+
cls: 'svg-icon svg-icon-magnifying-glass',
|
|
26
|
+
handler: function(el) {
|
|
27
|
+
this.up('UiCustomPanelPluginPanel').getController().searchByProp(this.getValue());
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
getActualPlugins: function() {
|
|
32
|
+
const pluginGrid = this.up('UiCustomPanelEditor').down('UiCustomPanelPluginGrid');
|
|
33
|
+
if (pluginGrid) {
|
|
34
|
+
const data = pluginGrid.getStore().getRange().map((record) => {
|
|
35
|
+
if (record.get('handlerName') !== '-/-') {
|
|
36
|
+
return {
|
|
37
|
+
handlerName: record.get('handlerName'),
|
|
38
|
+
ptype: record.get('ptype'),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}).filter((item) => item!==undefined);
|
|
42
|
+
this.store.loadData(data);
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
initComponent() {
|
|
46
|
+
this.on('focus', this.getActualPlugins, this);
|
|
47
|
+
this.on('render', this.getActualPlugins, this);
|
|
48
|
+
this.on('change', (el, newVal) => {
|
|
49
|
+
el.triggers.search.setHidden(!newVal);
|
|
50
|
+
}, this);
|
|
51
|
+
this.callParent();
|
|
52
|
+
},
|
|
53
|
+
});
|
|
@@ -14,15 +14,27 @@ Ext.define('Coon.uielement.plugin.UnifiedButtonToolbarPlugin', {
|
|
|
14
14
|
this.controller.callDialog = this.callDialog.bind(this);
|
|
15
15
|
view.on('afterrender', () => {
|
|
16
16
|
const window = view.up('WindowWrap');
|
|
17
|
-
if (window) {
|
|
17
|
+
if (window && this.checkChangesOnSave !== false) {
|
|
18
18
|
window.on('beforeclose', this.onBeforeCloseWindow, this);
|
|
19
19
|
}
|
|
20
|
+
this.controller.lookup('standardCancelButton').setHidden(!window);
|
|
20
21
|
}, this);
|
|
21
|
-
|
|
22
22
|
this.controller.unifiedButtonToolbar = Ext.create('Ext.toolbar.Toolbar', {
|
|
23
23
|
dock: this.dock,
|
|
24
24
|
items: [
|
|
25
25
|
'->',
|
|
26
|
+
{
|
|
27
|
+
xtype: 'button',
|
|
28
|
+
reference: 'standardCancelButton',
|
|
29
|
+
text: 'Закрыть',
|
|
30
|
+
hidden: true,
|
|
31
|
+
handler: () => {
|
|
32
|
+
const window = view.up('WindowWrap');
|
|
33
|
+
if (window) {
|
|
34
|
+
window.close();
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
},
|
|
26
38
|
{
|
|
27
39
|
xtype: 'button',
|
|
28
40
|
reference: 'standardSaveButton',
|
|
@@ -50,6 +62,11 @@ Ext.define('Coon.uielement.plugin.UnifiedButtonToolbarPlugin', {
|
|
|
50
62
|
title: 'Сохранить изменения?',
|
|
51
63
|
message: 'Были обнаружены изменения, сохранить их?',
|
|
52
64
|
buttons: Ext.Msg.YESNOCANCEL,
|
|
65
|
+
buttonText: {
|
|
66
|
+
yes: 'Сохранить и закрыть',
|
|
67
|
+
no: 'Закрыть без сохранения',
|
|
68
|
+
cancel: 'Вернуться',
|
|
69
|
+
},
|
|
53
70
|
icon: Ext.Msg.QUESTION,
|
|
54
71
|
fn: function(btn) {
|
|
55
72
|
if (btn === 'yes') {
|
|
@@ -60,19 +60,21 @@ Ext.define('Coon.uielement.plugin.configPanel.MethodChainPluginConfigPanelFormEd
|
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
xtype: 'checkbox',
|
|
63
|
-
boxLabel: 'Прерывать выполнение последовательности если
|
|
64
|
-
flex: 1,
|
|
63
|
+
boxLabel: 'Прерывать выполнение последовательности если Обработчик возвращает false',
|
|
65
64
|
bind: {
|
|
66
65
|
value: '{breakChainOnFalse}',
|
|
67
66
|
},
|
|
68
67
|
},
|
|
69
68
|
{
|
|
70
69
|
xtype: 'ReportPropertiesGrid',
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
plugins: [
|
|
71
|
+
{ptype: 'cellediting', clicksToEdit: 2}
|
|
72
|
+
],
|
|
73
|
+
title: 'Последовательно вызываемые обработчики',
|
|
74
|
+
flex: 1,
|
|
73
75
|
columns: [
|
|
74
76
|
{
|
|
75
|
-
text: '
|
|
77
|
+
text: 'Обработчик',
|
|
76
78
|
dataIndex: 'value',
|
|
77
79
|
required: true,
|
|
78
80
|
flex: 1,
|
|
@@ -97,6 +99,7 @@ Ext.define('Coon.uielement.plugin.configPanel.MethodChainPluginConfigPanelFormEd
|
|
|
97
99
|
},
|
|
98
100
|
{
|
|
99
101
|
xtype: 'widgetcolumn',
|
|
102
|
+
width: 40,
|
|
100
103
|
widget: {
|
|
101
104
|
xtype: 'SearchByPropButton',
|
|
102
105
|
tooltip: 'перейти к плагину с таким обработчиком',
|
|
@@ -104,7 +107,7 @@ Ext.define('Coon.uielement.plugin.configPanel.MethodChainPluginConfigPanelFormEd
|
|
|
104
107
|
},
|
|
105
108
|
},
|
|
106
109
|
{
|
|
107
|
-
text: '
|
|
110
|
+
text: 'Обработчик ошибки (Когда основной обработчик вернет false)',
|
|
108
111
|
dataIndex: 'errorHandler',
|
|
109
112
|
required: true,
|
|
110
113
|
flex: 1,
|
|
@@ -137,6 +140,7 @@ Ext.define('Coon.uielement.plugin.configPanel.MethodChainPluginConfigPanelFormEd
|
|
|
137
140
|
},
|
|
138
141
|
{
|
|
139
142
|
xtype: 'widgetcolumn',
|
|
143
|
+
width: 40,
|
|
140
144
|
widget: {
|
|
141
145
|
xtype: 'SearchByPropButton',
|
|
142
146
|
tooltip: 'перейти к плагину с таким обработчиком',
|
|
@@ -8,6 +8,7 @@ Ext.define('Coon.uielement.plugin.configPanel.UnifiedButtonToolbarPluginConfigPa
|
|
|
8
8
|
prepareBeanHandlerName: '',
|
|
9
9
|
validateBeanHandlerName: '',
|
|
10
10
|
dock: 'bottom',
|
|
11
|
+
checkChangesOnSave: true,
|
|
11
12
|
},
|
|
12
13
|
},
|
|
13
14
|
layout: {
|
|
@@ -22,56 +23,24 @@ Ext.define('Coon.uielement.plugin.configPanel.UnifiedButtonToolbarPluginConfigPa
|
|
|
22
23
|
},
|
|
23
24
|
},
|
|
24
25
|
{
|
|
25
|
-
xtype: '
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
labelWidth: 60,
|
|
30
|
-
flex: 1,
|
|
31
|
-
loadOnRender: false,
|
|
32
|
-
hideMode: 'offsets',
|
|
33
|
-
allowBlank: false,
|
|
34
|
-
store: 'codeHandlers',
|
|
35
|
-
bind: {
|
|
36
|
-
value: '{saveHandlerName}',
|
|
37
|
-
},
|
|
38
|
-
valueField: 'id',
|
|
39
|
-
displayField: 'id',
|
|
26
|
+
xtype: 'SearchByPropCombo',
|
|
27
|
+
fieldLabel: 'Обработчик валидации данных',
|
|
28
|
+
bind: {
|
|
29
|
+
value: '{validateBeanHandlerName}',
|
|
40
30
|
},
|
|
41
31
|
},
|
|
42
32
|
{
|
|
43
|
-
xtype: '
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
labelWidth: 60,
|
|
48
|
-
flex: 1,
|
|
49
|
-
loadOnRender: false,
|
|
50
|
-
hideMode: 'offsets',
|
|
51
|
-
allowBlank: false,
|
|
52
|
-
store: 'codeHandlers',
|
|
53
|
-
bind: {
|
|
54
|
-
value: '{prepareBeanHandlerName}',
|
|
55
|
-
},
|
|
56
|
-
valueField: 'id',
|
|
57
|
-
displayField: 'id',
|
|
33
|
+
xtype: 'SearchByPropCombo',
|
|
34
|
+
fieldLabel: 'Обработчик подготовки данных для сохранения',
|
|
35
|
+
bind: {
|
|
36
|
+
value: '{prepareBeanHandlerName}',
|
|
58
37
|
},
|
|
59
38
|
},
|
|
60
39
|
{
|
|
61
|
-
xtype: '
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
labelWidth: 60,
|
|
66
|
-
flex: 1,
|
|
67
|
-
loadOnRender: false,
|
|
68
|
-
hideMode: 'offsets',
|
|
69
|
-
store: 'codeHandlers',
|
|
70
|
-
bind: {
|
|
71
|
-
value: '{validateBeanHandlerName}',
|
|
72
|
-
},
|
|
73
|
-
valueField: 'id',
|
|
74
|
-
displayField: 'id',
|
|
40
|
+
xtype: 'SearchByPropCombo',
|
|
41
|
+
fieldLabel: 'Обработчик сохранения данных',
|
|
42
|
+
bind: {
|
|
43
|
+
value: '{saveHandlerName}',
|
|
75
44
|
},
|
|
76
45
|
},
|
|
77
46
|
{
|
|
@@ -88,6 +57,24 @@ Ext.define('Coon.uielement.plugin.configPanel.UnifiedButtonToolbarPluginConfigPa
|
|
|
88
57
|
text: 'Отобразить вверху',
|
|
89
58
|
value: 'top',
|
|
90
59
|
}],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
fieldLabel: 'Отслеживать не сохраненные данные при закрытии',
|
|
63
|
+
xtype: 'combo',
|
|
64
|
+
store: {
|
|
65
|
+
fields: ['val', 'descr'],
|
|
66
|
+
data: [
|
|
67
|
+
{'val': true, 'descr': 'Да'},
|
|
68
|
+
{'val': false, 'descr': 'Нет'}
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
editable: false,
|
|
72
|
+
queryMode: 'local',
|
|
73
|
+
displayField: 'descr',
|
|
74
|
+
valueField: 'val',
|
|
75
|
+
bind: {
|
|
76
|
+
value: '{checkChangesOnSave}',
|
|
77
|
+
},
|
|
91
78
|
}
|
|
92
79
|
],
|
|
93
80
|
getData: function() {
|
|
@@ -108,11 +95,12 @@ Ext.define('Coon.uielement.plugin.configPanel.UnifiedButtonToolbarPluginConfigPa
|
|
|
108
95
|
getConfiguration: function() {
|
|
109
96
|
const result = {};
|
|
110
97
|
const vm = this.getViewModel();
|
|
111
|
-
['saveHandlerName', 'prepareBeanHandlerName', 'validateBeanHandlerName', 'dock'].forEach((el) => {
|
|
112
|
-
if (vm.get(el)) {
|
|
98
|
+
['saveHandlerName', 'prepareBeanHandlerName', 'validateBeanHandlerName', 'dock', 'checkChangesOnSave'].forEach((el) => {
|
|
99
|
+
if (typeof vm.get(el) !== 'undefined') {
|
|
113
100
|
result[el] = vm.get(el);
|
|
114
101
|
}
|
|
115
102
|
});
|
|
116
103
|
return result;
|
|
117
104
|
},
|
|
105
|
+
|
|
118
106
|
});
|
package/src/version.js
CHANGED