ru.coon 2.6.6 → 2.6.7
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 +11 -0
- package/index.js +0 -1
- package/package.json +1 -1
- package/src/Function.js +1 -1
- package/src/common/component/formeditor/UiCFCard.js +86 -0
- package/src/common/component/formeditor/UiCFCardsGrid.js +69 -0
- package/src/common/component/formeditor/UiCFCell.js +12 -0
- package/src/common/component/formeditor/UiCFCellController.js +236 -0
- package/src/common/component/formeditor/UiCFCheckboxGroup.js +53 -0
- package/src/common/component/formeditor/UiCFContainer.js +15 -0
- package/src/common/component/formeditor/UiCFContainerController.js +217 -0
- package/src/common/component/formeditor/UiCFFieldsConfig.js +342 -0
- package/src/common/component/formeditor/UiCFRadioGrid.js +70 -0
- package/src/common/component/formeditor/UiCFRadioGroup.js +53 -0
- package/src/common/component/formeditor/UiCFReportField.js +48 -0
- package/src/common/component/formeditor/UiCFRow.js +13 -0
- package/src/common/component/formeditor/UiCFRowController.js +155 -0
- package/src/common/component/formeditor/UiCFSegmentedButton.js +62 -0
- package/src/common/component/formeditor/UiCFSegmentedButtonGrid.js +70 -0
- package/src/common/component/formeditor/UiCFSettingsWindow.js +62 -0
- package/src/common/component/formeditor/UiCFSpacer.js +8 -0
- package/src/common/component/formeditor/UiCFTab.js +51 -0
- package/src/common/component/formeditor/UiCustomForm.js +33 -0
- package/src/common/component/formeditor/UiCustomFormController.js +6 -0
- package/src/common/component/formeditor/UiCustomFormEditor.js +191 -0
- package/src/common/component/formeditor/UiCustomFormEditor.scss +13 -0
- package/src/common/component/formeditor/UiCustomFormEditorController.js +654 -0
- package/src/common/component/formeditor/UiCustomFormEditorView.js +7 -0
- package/src/report/component/settings/plugin/ReportFormPluginPanelController.js +1 -1
- package/src/report/plugin/grid/ReportColumnStatePlugin.js +18 -2
- package/src/version.js +1 -1
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/* global Ext */
|
|
2
|
+
Ext.define('Coon.common.component.formeditor.UiCustomFormEditor', {
|
|
3
|
+
extend: 'Ext.panel.Panel',
|
|
4
|
+
controller: 'UiCustomFormEditorController',
|
|
5
|
+
xtype: 'UiCustomFormEditor',
|
|
6
|
+
layout: 'border',
|
|
7
|
+
cls: 'UiCustomFormEditor',
|
|
8
|
+
viewModel: {
|
|
9
|
+
data: {
|
|
10
|
+
viewMode: false,
|
|
11
|
+
focusedField: null,
|
|
12
|
+
activeForm: 0,
|
|
13
|
+
focusedFieldXType: null,
|
|
14
|
+
UI_ELEMENT_CD: null,
|
|
15
|
+
description: null,
|
|
16
|
+
},
|
|
17
|
+
stores: {
|
|
18
|
+
configStore: {
|
|
19
|
+
type: 'json',
|
|
20
|
+
data: [],
|
|
21
|
+
fields: ['key', 'type', 'property', 'visible', 'title', 'description'],
|
|
22
|
+
},
|
|
23
|
+
typeStore: {
|
|
24
|
+
type: 'json',
|
|
25
|
+
data: [{key: 'text'}, {key: 'int'}, {key: 'bool'}, {key: 'date'}, {key: 'dateFormat'},
|
|
26
|
+
{key: 'timeFormat'}, {key: 'timeTextFormat'}, {key: 'reportsList'},
|
|
27
|
+
{key: 'cards'}, {key: 'radio'}, {key: 'segmented'}, {key: 'allowedExtensions'}, {key: 'reportField'}],
|
|
28
|
+
fields: ['key'],
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
items: [
|
|
33
|
+
{
|
|
34
|
+
xtype: 'UiCFContainer',
|
|
35
|
+
region: 'center',
|
|
36
|
+
scrollable: 'y',
|
|
37
|
+
flex: 1,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
reference: 'settingsPanel',
|
|
41
|
+
layout: 'card',
|
|
42
|
+
xtype: 'panel',
|
|
43
|
+
items: [
|
|
44
|
+
{
|
|
45
|
+
xtype: 'form',
|
|
46
|
+
reference: 'settingsForm',
|
|
47
|
+
layout: 'anchor',
|
|
48
|
+
scrollable: 'y',
|
|
49
|
+
bodyPadding: 5,
|
|
50
|
+
defaults: {
|
|
51
|
+
anchor: '100%',
|
|
52
|
+
},
|
|
53
|
+
items: [],
|
|
54
|
+
buttons: [
|
|
55
|
+
{
|
|
56
|
+
text: 'Применить',
|
|
57
|
+
ui: 'orange-button',
|
|
58
|
+
flex: 1,
|
|
59
|
+
handler: 'applySettings',
|
|
60
|
+
disabled: true,
|
|
61
|
+
bind: {
|
|
62
|
+
disabled: '{!focusedField}',
|
|
63
|
+
},
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
xtype: 'panel',
|
|
69
|
+
layout: 'fit',
|
|
70
|
+
items: [
|
|
71
|
+
{
|
|
72
|
+
xtype: 'grid',
|
|
73
|
+
buttons: [{
|
|
74
|
+
text: 'Применить',
|
|
75
|
+
ui: 'orange-button',
|
|
76
|
+
flex: 1,
|
|
77
|
+
handler: 'applyXTypeSettings',
|
|
78
|
+
disabled: true,
|
|
79
|
+
bind: {
|
|
80
|
+
disabled: '{!focusedField}',
|
|
81
|
+
},
|
|
82
|
+
}],
|
|
83
|
+
reference: 'configGrid',
|
|
84
|
+
bind: {
|
|
85
|
+
store: '{configStore}',
|
|
86
|
+
},
|
|
87
|
+
columns: [
|
|
88
|
+
{text: 'Вкл.', dataIndex: 'visible', xtype: 'checkcolumn', filter: {type: 'boolean'}},
|
|
89
|
+
{text: 'Переменная', dataIndex: 'property', flex: 1, filter: {type: 'string'}},
|
|
90
|
+
{
|
|
91
|
+
text: 'Тип',
|
|
92
|
+
dataIndex: 'type',
|
|
93
|
+
editor: {
|
|
94
|
+
xtype: 'combo',
|
|
95
|
+
bind: {
|
|
96
|
+
store: '{typeStore}',
|
|
97
|
+
},
|
|
98
|
+
queryMode: 'local',
|
|
99
|
+
displayField: 'key',
|
|
100
|
+
valueField: 'key',
|
|
101
|
+
},
|
|
102
|
+
flex: 1,
|
|
103
|
+
},
|
|
104
|
+
{text: 'Заголовок', dataIndex: 'title', editor: {xtype: 'textfield'}, flex: 1, filter: {type: 'string'}},
|
|
105
|
+
{text: 'Описание', dataIndex: 'description', editor: {xtype: 'textfield'}, flex: 1}
|
|
106
|
+
],
|
|
107
|
+
plugins: [
|
|
108
|
+
{ptype: 'cellediting', clicksToEdit: 2},
|
|
109
|
+
{ptype: 'gridfilterbar'}
|
|
110
|
+
],
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
animCollapse: 100,
|
|
116
|
+
region: 'east',
|
|
117
|
+
width: 500,
|
|
118
|
+
collapsible: true,
|
|
119
|
+
collapseDirection: 'right',
|
|
120
|
+
hideCollapseTool: true,
|
|
121
|
+
collapseMode: 'header',
|
|
122
|
+
collapsed: true,
|
|
123
|
+
header: {
|
|
124
|
+
iconCls: 'x-fa fa-th',
|
|
125
|
+
title: 'Настройки',
|
|
126
|
+
},
|
|
127
|
+
bind: {
|
|
128
|
+
activeItem: '{activeForm}',
|
|
129
|
+
},
|
|
130
|
+
tools: [
|
|
131
|
+
{
|
|
132
|
+
iconCls: 'fa fa-eye',
|
|
133
|
+
hidden: true,
|
|
134
|
+
bind: {
|
|
135
|
+
hidden: '{viewMode === true}',
|
|
136
|
+
},
|
|
137
|
+
callback: function(view) {
|
|
138
|
+
view.up('UiCustomFormEditor').getViewModel().set('viewMode', true);
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
iconCls: 'fa fa-eye-slash',
|
|
143
|
+
hidden: true,
|
|
144
|
+
bind: {
|
|
145
|
+
hidden: '{viewMode === false}',
|
|
146
|
+
},
|
|
147
|
+
callback: function(view) {
|
|
148
|
+
view.up('UiCustomFormEditor').getViewModel().set('viewMode', false);
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
iconCls: 'fa fa-cogs', // Reply icon
|
|
153
|
+
bind: {
|
|
154
|
+
hidden: '{activeForm !== 0}',
|
|
155
|
+
},
|
|
156
|
+
callback: function(view) {
|
|
157
|
+
view.up('UiCustomFormEditor').getViewModel().set('activeForm', 1);
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
iconCls: 'fa fa-reply', // Reply icon
|
|
162
|
+
hidden: true,
|
|
163
|
+
bind: {
|
|
164
|
+
hidden: '{activeForm !== 1}',
|
|
165
|
+
},
|
|
166
|
+
callback: function(view) {
|
|
167
|
+
view.up('UiCustomFormEditor').getViewModel().set('activeForm', 0);
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
type: 'pin',
|
|
172
|
+
itemId: 'pinned',
|
|
173
|
+
callback(view, tool) {
|
|
174
|
+
if (tool.type === 'pin') {
|
|
175
|
+
tool.setType('unpin');
|
|
176
|
+
} else {
|
|
177
|
+
tool.setType('pin');
|
|
178
|
+
}
|
|
179
|
+
const pinned = tool.type === 'unpin';
|
|
180
|
+
view.up('UiCustomFormEditor').getController().setPinned(pinned);
|
|
181
|
+
Ext.state.Manager.getProvider().set('settingsPanel', {pinned});
|
|
182
|
+
},
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
],
|
|
186
|
+
listeners: {
|
|
187
|
+
render: 'onSettingsRender',
|
|
188
|
+
},
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
});
|