ru.coon 2.6.5 → 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 +25 -0
- package/index.js +0 -1
- package/package.json +2 -2
- package/src/Function.js +1 -1
- 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/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/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
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* global Ext */
|
|
2
|
+
Ext.define('Coon.common.component.formeditor.UiCFSegmentedButton', {
|
|
3
|
+
extend: 'Ext.button.Segmented',
|
|
4
|
+
xtype: 'UiCFSegmentedButton',
|
|
5
|
+
style: {
|
|
6
|
+
maxHeight: '30px',
|
|
7
|
+
},
|
|
8
|
+
getName() {
|
|
9
|
+
return this.name;
|
|
10
|
+
},
|
|
11
|
+
setName(name) {
|
|
12
|
+
this.name = name;
|
|
13
|
+
},
|
|
14
|
+
controller: {
|
|
15
|
+
init(view) {
|
|
16
|
+
let i = 1;
|
|
17
|
+
if (view.initialConfig && !view.initialConfig.checkOptions) {
|
|
18
|
+
if (view.initialConfig && view.initialConfig.countCards) {
|
|
19
|
+
view.initialConfig.countCards.forEach((setting, index) => {
|
|
20
|
+
let item = view.items.getAt(view.items.findIndex('itemId', setting.itemId));
|
|
21
|
+
if (!item) {
|
|
22
|
+
item = view.add({
|
|
23
|
+
itemId: setting.itemId,
|
|
24
|
+
value: setting.value,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
if (setting.text) {
|
|
28
|
+
item.setText(setting.text);
|
|
29
|
+
}
|
|
30
|
+
if (setting.value) {
|
|
31
|
+
item.value = setting.value;
|
|
32
|
+
} else {
|
|
33
|
+
item.value = i++;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
if (view.initialConfig.countCards.length < view.items.getCount()) {
|
|
37
|
+
const ids = view.initialConfig.countCards.map((item) => item.itemId);
|
|
38
|
+
view.items.items.forEach((item) => {
|
|
39
|
+
if (ids.indexOf(item.itemId) < 0) {
|
|
40
|
+
view.remove(item);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
} else {
|
|
45
|
+
const itemId = 'UiCFSegmented_' + Ext.id().replace('-', '_');
|
|
46
|
+
view.countCards = [
|
|
47
|
+
{
|
|
48
|
+
'itemId': itemId,
|
|
49
|
+
'value': i,
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
view.add({
|
|
53
|
+
'itemId': itemId,
|
|
54
|
+
'value': i,
|
|
55
|
+
});
|
|
56
|
+
i++;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
items: [],
|
|
62
|
+
});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* global Ext */
|
|
2
|
+
Ext.define('Coon.common.component.formeditor.UiCFSegmentedButtonGrid', {
|
|
3
|
+
extend: 'Ext.grid.Panel',
|
|
4
|
+
xtype: 'UiCFSegmentedButtonGrid',
|
|
5
|
+
flex: 1,
|
|
6
|
+
title: 'Значения',
|
|
7
|
+
minHeight: 100,
|
|
8
|
+
controller: {
|
|
9
|
+
init(view) {
|
|
10
|
+
const vm = this.getViewModel();
|
|
11
|
+
vm.getStore('cardsStore').on('datachanged', (store) => {
|
|
12
|
+
vm.set('dataCount', store.data.length);
|
|
13
|
+
}, this);
|
|
14
|
+
if (view.initialConfig && view.initialConfig.value) {
|
|
15
|
+
vm.getStore('cardsStore').loadData(view.initialConfig.value);
|
|
16
|
+
}
|
|
17
|
+
view.getFormData = this.getFormData.bind(this);
|
|
18
|
+
},
|
|
19
|
+
getFormData() {
|
|
20
|
+
return this.getViewModel().getStore('cardsStore').getRange().map((rec) => {
|
|
21
|
+
return {text: rec.get('text'), itemId: rec.get('itemId'), value: rec.get('value')};
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
addRow() {
|
|
25
|
+
this.getViewModel().getStore('cardsStore').add({itemId: 'UiCFSegmented_' + Ext.id().replace('-', '_')});
|
|
26
|
+
},
|
|
27
|
+
deleteRow() {
|
|
28
|
+
this.getViewModel().getStore('cardsStore').remove(this.getViewModel().get('selection'));
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
viewModel: {
|
|
32
|
+
data: {
|
|
33
|
+
selection: null,
|
|
34
|
+
dataCount: 1,
|
|
35
|
+
},
|
|
36
|
+
stores: {
|
|
37
|
+
cardsStore: {
|
|
38
|
+
type: 'json',
|
|
39
|
+
fields: ['text', 'itemId', 'value'],
|
|
40
|
+
data: [
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
tbar: [
|
|
46
|
+
{
|
|
47
|
+
text: 'Добавить',
|
|
48
|
+
handler: 'addRow',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
text: 'Удалить',
|
|
52
|
+
handler: 'deleteRow',
|
|
53
|
+
bind: {
|
|
54
|
+
disabled: '{!selection || dataCount < 2}',
|
|
55
|
+
},
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
bind: {
|
|
59
|
+
store: '{cardsStore}',
|
|
60
|
+
selection: '{selection}',
|
|
61
|
+
},
|
|
62
|
+
columns: [
|
|
63
|
+
{xtype: 'rownumberer'},
|
|
64
|
+
{dataIndex: 'text', text: 'Заголовок', flex: 2, editor: {xtype: 'textfield'}},
|
|
65
|
+
{dataIndex: 'value', text: 'Значение', flex: 1, editor: {xtype: 'textfield'}}
|
|
66
|
+
],
|
|
67
|
+
plugins: [
|
|
68
|
+
{ptype: 'cellediting'}
|
|
69
|
+
],
|
|
70
|
+
});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
Ext.define('Coon.common.component.formeditor.UiCFSettingsWindow', {
|
|
2
|
+
extend: 'Ext.window.Window',
|
|
3
|
+
xtype: 'UiCFSettingsWindow',
|
|
4
|
+
closable: true,
|
|
5
|
+
closeAction: 'hide',
|
|
6
|
+
width: 500,
|
|
7
|
+
title: 'Настройки формы',
|
|
8
|
+
height: 220,
|
|
9
|
+
modal: true,
|
|
10
|
+
maximazible: false,
|
|
11
|
+
minimazible: false,
|
|
12
|
+
items: [
|
|
13
|
+
{
|
|
14
|
+
xtype: 'form',
|
|
15
|
+
reference: 'formData',
|
|
16
|
+
bodyPadding: 5,
|
|
17
|
+
items: [
|
|
18
|
+
{
|
|
19
|
+
xtype: 'textfield',
|
|
20
|
+
reference: 'idField',
|
|
21
|
+
name: 'UI_ELEMENT_CD',
|
|
22
|
+
allowBlank: false,
|
|
23
|
+
width: '100%',
|
|
24
|
+
fieldLabel: 'UI_ELEMENT_CD',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
xtype: 'textfield',
|
|
28
|
+
name: 'description',
|
|
29
|
+
allowBlank: false,
|
|
30
|
+
width: '100%',
|
|
31
|
+
fieldLabel: 'Описание',
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
buttons: [
|
|
35
|
+
{
|
|
36
|
+
text: 'Применить',
|
|
37
|
+
formBind: true,
|
|
38
|
+
handler: function() {
|
|
39
|
+
const window = this.up('window');
|
|
40
|
+
const form = window.down('form');
|
|
41
|
+
window.fireEvent('applySettings', form.getForm().getValues());
|
|
42
|
+
window.close();
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
text: 'Отмена',
|
|
47
|
+
handler: function() {
|
|
48
|
+
this.up('window').close();
|
|
49
|
+
},
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
|
|
55
|
+
loadFormData(params) {
|
|
56
|
+
if (params['UI_ELEMENT_CD']) {
|
|
57
|
+
this.down('[reference="idField"]').setReadOnly(true);
|
|
58
|
+
}
|
|
59
|
+
this.down('form').getForm().setValues(params);
|
|
60
|
+
},
|
|
61
|
+
})
|
|
62
|
+
;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* global Ext */
|
|
2
|
+
Ext.define('Coon.common.component.formeditor.UiCFTab', {
|
|
3
|
+
extend: 'Ext.tab.Panel',
|
|
4
|
+
xtype: 'UiCFTab',
|
|
5
|
+
controller: {
|
|
6
|
+
init(view) {
|
|
7
|
+
if (view.initialConfig && !view.initialConfig.checkOptions) {
|
|
8
|
+
if (view.initialConfig && view.initialConfig.countCards) {
|
|
9
|
+
view.initialConfig.countCards.forEach((setting, index) => {
|
|
10
|
+
let item = view.items.getAt(view.items.findIndex('itemId', setting.itemId));
|
|
11
|
+
if (!item) {
|
|
12
|
+
item = view.add({
|
|
13
|
+
xtype: 'panel',
|
|
14
|
+
layout: 'fit',
|
|
15
|
+
itemId: setting.itemId,
|
|
16
|
+
items: [{xtype: 'UiCFContainer'}],
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
if (setting.title) {
|
|
20
|
+
item.setTitle(setting.title);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
if (view.initialConfig.countCards.length < view.items.getCount()) {
|
|
24
|
+
const ids = view.initialConfig.countCards.map((item) => item.itemId);
|
|
25
|
+
view.items.items.forEach((item) => {
|
|
26
|
+
if (ids.indexOf(item.itemId) < 0) {
|
|
27
|
+
view.remove(item);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
} else {
|
|
32
|
+
const itemId = 'UiCFCard_' + Ext.id().replace('-', '_');
|
|
33
|
+
view.value = view.countCards = [
|
|
34
|
+
{
|
|
35
|
+
'title': '',
|
|
36
|
+
'itemId': itemId,
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
view.add({
|
|
40
|
+
xtype: 'panel',
|
|
41
|
+
layout: 'fit',
|
|
42
|
+
itemId: itemId,
|
|
43
|
+
items: [{xtype: 'UiCFContainer'}],
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
minHeight: 100,
|
|
50
|
+
items: [],
|
|
51
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* global Ext */
|
|
2
|
+
Ext.define('Coon.common.component.formeditor.UiCustomForm', {
|
|
3
|
+
extend: 'Ext.form.Panel',
|
|
4
|
+
xtype: 'UiCustomForm',
|
|
5
|
+
layout: 'form',
|
|
6
|
+
setFormData(data) {
|
|
7
|
+
this.getForm().setValues(data);
|
|
8
|
+
},
|
|
9
|
+
getFormData(valuesAsIs, dateFormat, excludeReadOnly, excludeDisabled) {
|
|
10
|
+
return Coon.Function.getDataFromForm(this, valuesAsIs, dateFormat, excludeReadOnly, excludeDisabled);
|
|
11
|
+
},
|
|
12
|
+
initComponent() {
|
|
13
|
+
if (this.initialConfig && this.initialConfig.UiCFId) {
|
|
14
|
+
this.on('added', (view) => {
|
|
15
|
+
const command = Ext.create('Coon.uielement.command.GetUIElementCommand');
|
|
16
|
+
command.on('complete', function(response) {
|
|
17
|
+
if (response) {
|
|
18
|
+
const data = response.propertyData !== '{}' ? JSON.parse(response.propertyData) : null;
|
|
19
|
+
if (data) {
|
|
20
|
+
view.add(data.items || []);
|
|
21
|
+
Ext.defer(() => {
|
|
22
|
+
Ext.ComponentQuery.query('UiCFCell', view).forEach((cmp) => cmp.getController().readOnly = true);
|
|
23
|
+
Ext.ComponentQuery.query('UiCFContainer', view).forEach((cmp) => cmp.getController().readOnly = true);
|
|
24
|
+
}, 500);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}, this);
|
|
28
|
+
command.execute(view.initialConfig.UiCFId);
|
|
29
|
+
}, this);
|
|
30
|
+
}
|
|
31
|
+
this.callParent();
|
|
32
|
+
},
|
|
33
|
+
});
|
|
@@ -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
|
+
});
|