ru.coon 2.5.68 → 2.6.1

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.
Files changed (31) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/package.json +1 -1
  3. package/src/Function.scss +4 -0
  4. package/src/common/component/characteristic/CharacteristicPanel.js +91 -71
  5. package/src/common/component/characteristic/CharacteristicPanelController.js +21 -6
  6. package/src/common/component/characteristic/characteristicAlgorithm/AlgorithmChainEditWindow.js +24 -29
  7. package/src/common/component/characteristic/characteristicAlgorithm/AlgorithmChainSearchWindow.js +3 -1
  8. package/src/common/component/characteristic/characteristicAlgorithm/CharacteristicAlgorithmList.js +10 -1
  9. package/src/common/component/characteristic/characteristicAlgorithm/CharacteristicAlgorithmListController.js +6 -1
  10. package/src/common/component/characteristic/characteristicAlgorithm/CharacteristicAlgorithmSearchWindow.js +4 -4
  11. package/src/common/component/characteristic/characteristicGroup/CharacteristicAccessList.js +13 -2
  12. package/src/common/component/characteristic/characteristicGroup/CharacteristicAccessListController.js +7 -2
  13. package/src/common/component/characteristic/characteristicGroup/CharacteristicGroupPanel.js +2 -0
  14. package/src/common/component/characteristic/characteristicGroup/CharacteristicGroupSearchWindow.js +29 -6
  15. package/src/common/component/characteristic/characteristicGroup/CharacteristicTypeSearchWindow.js +1 -0
  16. package/src/common/component/characteristic/characteristicGroup/EditCharacteristicGroupWindow.js +24 -9
  17. package/src/common/component/characteristic/characteristicGroup/EntityGroupCharacteristicEditor.js +23 -6
  18. package/src/common/component/characteristic/characteristicGroup/EntityGroupCharacteristicEditorController.js +11 -3
  19. package/src/common/component/characteristic/characteristicGroup/UserGroupForeignWindow.js +1 -1
  20. package/src/common/component/editor/EditorFactory.js +56 -46
  21. package/src/common/component/editor/TypedCharacteristicEditor.js +7 -3
  22. package/src/common/component/editor/creators/CustomPanelEditorCreator.js +2 -2
  23. package/src/common/component/editor/creators/NoteEditorCreator.js +3 -2
  24. package/src/common/component/editor/creators/NumberEditorCreator.js +22 -6
  25. package/src/common/component/editor/creators/SimpleReportEditorCreator.js +3 -5
  26. package/src/common/component/editor/creators/TimeEditorCreator.js +3 -5
  27. package/src/report/component/reportpanel/ReportGrid.scss +1 -1
  28. package/src/report/plugin/grid/GridEditorsPlugin.js +16 -17
  29. package/src/report/plugin/grid/GridQuickSearchPlugin.js +3 -0
  30. package/src/uielement/plugin/OpenPanelPlugin.js +4 -0
  31. package/src/version.js +1 -1
package/CHANGELOG.md CHANGED
@@ -1,10 +1,26 @@
1
+ # Version 2.6.1, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2b7d5d8cd09bf94320d149f9cf3aa78ef27594a8)
2
+ * ## Fixes
3
+ * <span style='color:red'> HT-7281 GridEditorPlugin editor dependField</span> ([e9c537], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e9c53704ee957042292ed639343bf217c8cdeca8))
4
+
5
+ * HT-8006 hotfix ([6569c3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6569c3b6e197471fabb6af4da5c3212fd7079be2))
6
+ * update: CHANGELOG.md ([e7b502], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e7b50227f8ddeaac7322ce3e436c2c0b5fd12163))
7
+
8
+ # Version 2.6.0, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/78a28499d4ba7dc466ba5ff5a4b815d191c349bf)
9
+ * ## Features
10
+ * <span style='color:green'>feat: HT-7986: chars editor interface upgrade</span> ([9af20a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9af20aa30d2b1fa494994e0cf7d84b26b19604e0))
11
+ * <span style='color:green'>feat: HT-7986: chars editor interface upgrade</span> ([ccf1d4], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ccf1d42831f67ca298e2598422430da06b01ab49))
12
+
13
+ * update: CHANGELOG.md ([e47fec], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e47fec57e3e5450390ece76176541c6e3a668bd1))
14
+
1
15
  # Version 2.5.68, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/98ad55fc31f43905c6600483ea3665275bccbcb0)
2
16
  * ## Features
17
+ * <span style='color:green'>feat: HT-7986: chars editor interface upgrade</span> ([a27806], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a278066acdef2f6abd723de5a360f612179d50e9))
3
18
  * <span style='color:green'>feat: NEVA-439: set null values before send on server for postgres</span> ([bf7739], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bf7739be43a2bb3e52932059699b493e31f2371f))
4
19
  * <span style='color:green'>feat: HT-7969: set xtypes for editors</span> ([8c4edc], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8c4edc5c63f46d647bb4f3286e4517af31cbbe5b))
5
20
  * <span style='color:green'>feat: HT-7969: view group description, fix fields name in chain</span> ([e19b98], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e19b98356ac3738d40afdd92401d8433d3b86056))
6
21
 
7
22
  * Resolve HT-7568 ([eb0297], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/eb0297d1927ae6e2d3a8d492d368d5ea7bef89ef))
23
+ * HT-7882 поддержать возможность передачи свойств редактора х-ки в поле mask в формате json ([ff9d88], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ff9d88c6e8f12d59ea7fd4f8be344696670d13af))
8
24
  * update: CHANGELOG.md ([fed09b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/fed09bab2391b2ef0adde36107c4c8e9f8e9ad32))
9
25
 
10
26
  # Version 2.5.67, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/eda77f29b413590ae650c8fb7ba1615c63cf104a)
@@ -30,6 +46,7 @@
30
46
  * <span style='color:red'> HT-7941: check if do not have saved data object then close window</span> ([0baf4e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0baf4ea72862a4a61230ffc3ac0af7f8b065d794))
31
47
 
32
48
  * remove unnecessary filterItemsOnRow property ([772f61], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/772f6190df8b958bd6ff97e5731a59971c9a11fc))
49
+ * HT-7882 поддержать возможность передачи свойств редактора х-ки в поле mask в формате json ([507490], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5074900afb170d9f11aa10de6549e05cef12f7cb))
33
50
  * update: CHANGELOG.md ([2ec18c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2ec18ccddcb1d571ef6a1d00b9cde439355c8304))
34
51
 
35
52
  # Version 2.5.63, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/49035e56acea653959f01f96ea96a10d962b1424)
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.5.68",
7
+ "version": "2.6.1",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -0,0 +1,4 @@
1
+ .delete-row {
2
+ text-decoration: line-through;
3
+ color: darkred;
4
+ }
@@ -7,6 +7,7 @@ Ext.define('Coon.uielement.component.characteristic.CharacteristicPanel', {
7
7
  entity: null,
8
8
  isNew: false,
9
9
  groups: null,
10
+ title: 'Редактирование сущности',
10
11
  },
11
12
  stores: {
12
13
  characteristicEntityStore: {
@@ -15,6 +16,9 @@ Ext.define('Coon.uielement.component.characteristic.CharacteristicPanel', {
15
16
  },
16
17
  },
17
18
  },
19
+ bind: {
20
+ title: '{title}',
21
+ },
18
22
  layout: {
19
23
  type: 'vbox',
20
24
  align: 'stretch',
@@ -36,91 +40,107 @@ Ext.define('Coon.uielement.component.characteristic.CharacteristicPanel', {
36
40
  reference: 'entityForm',
37
41
  bodyPadding: 5,
38
42
  layout: 'anchor',
39
- defaults: {
40
- anchor: '100%',
41
- xtype: 'container',
42
- layout: 'column',
43
- defaults: {
44
- columnWidth: 0.33,
45
- xtype: 'textfield',
46
- margin: '0 0 0 15px',
47
- },
48
- },
49
43
  items: [
50
44
  {
51
- items: [
52
- {
53
- fieldLabel: 'Код',
54
- name: 'entity',
55
- reference: 'entityField',
56
- margin: 0,
57
- allowBlank: false,
58
- bind: {
59
- disabled: '{!isNew}',
60
- },
45
+ anchor: '100%',
46
+ bind: {
47
+ collapsed: '{!!entity}',
48
+ title: 'Данные сущности {entity}',
49
+ },
50
+ defaults: {
51
+ xtype: 'container',
52
+ flex: 1,
53
+ layout: 'column',
54
+ defaults: {
55
+ columnWidth: 0.33,
56
+ xtype: 'textfield',
57
+ margin: '0 0 0 15px',
61
58
  },
62
- {
63
- xtype: 'combo',
64
- reference: 'characteristicEntityCombo',
65
- fieldLabel: 'Класс сущности',
66
- name: 'characteristicEntity',
67
- allowBlank: false,
68
- queryMode: 'local',
69
- displayField: 'description',
70
- valueField: 'value',
71
- bind: {
72
- store: '{characteristicEntityStore}',
73
- },
74
- },
75
- {
76
- fieldLabel: 'Тип сущности',
77
- name: 'entityType',
78
- }
79
- ],
80
- },
81
- {
59
+ },
60
+ xtype: 'fieldset',
61
+ collapsible: true,
62
+ layout: {
63
+ type: 'vbox',
64
+ align: 'stretch',
65
+ },
82
66
  items: [
83
67
  {
84
- fieldLabel: 'Тип сущности 2-го порядка',
85
- margin: 0,
86
- name: 'entityType2',
68
+ items: [
69
+ {
70
+ fieldLabel: 'Код',
71
+ name: 'entity',
72
+ reference: 'entityField',
73
+ margin: 0,
74
+ allowBlank: false,
75
+ bind: {
76
+ disabled: '{!isNew}',
77
+ },
78
+ },
79
+ {
80
+ xtype: 'combo',
81
+ reference: 'characteristicEntityCombo',
82
+ fieldLabel: 'Класс сущности',
83
+ name: 'characteristicEntity',
84
+ allowBlank: false,
85
+ queryMode: 'local',
86
+ displayField: 'description',
87
+ valueField: 'value',
88
+ bind: {
89
+ store: '{characteristicEntityStore}',
90
+ },
91
+ },
92
+ {
93
+ fieldLabel: 'Тип сущности',
94
+ name: 'entityType',
95
+ }
96
+ ],
87
97
  },
88
98
  {
89
- fieldLabel: 'Тип сущности 3-го порядка',
90
- name: 'entityType3',
99
+ items: [
100
+ {
101
+ fieldLabel: 'Тип сущности 2-го порядка',
102
+ margin: 0,
103
+ name: 'entityType2',
104
+ },
105
+ {
106
+ fieldLabel: 'Тип сущности 3-го порядка',
107
+ name: 'entityType3',
108
+ },
109
+ {
110
+ fieldLabel: 'Тип сущности 4-го порядка',
111
+ name: 'entityType4',
112
+ }
113
+ ],
91
114
  },
92
115
  {
93
- fieldLabel: 'Тип сущности 4-го порядка',
94
- name: 'entityType4',
95
- }
96
- ],
97
- },
98
- {
99
- items: [
100
- {
101
- fieldLabel: 'Тип сущности 5-го порядка',
102
- name: 'entityType5',
103
- margin: 0,
104
- },
105
- {
106
- fieldLabel: 'entryPoint',
107
- name: 'cmEntryPoint',
116
+ items: [
117
+ {
118
+ fieldLabel: 'Тип сущности 5-го порядка',
119
+ name: 'entityType5',
120
+ margin: 0,
121
+ },
122
+ {
123
+ fieldLabel: 'entryPoint',
124
+ name: 'cmEntryPoint',
125
+ },
126
+ {
127
+ fieldLabel: 'Описание',
128
+ name: 'description',
129
+ allowBlank: false,
130
+ }
131
+ ],
108
132
  },
109
133
  {
110
- fieldLabel: 'Описание',
111
- name: 'description',
112
- allowBlank: false,
134
+ boxLabel: 'Отображать только эффективные значения для предопределенных характеристик',
135
+ xtype: 'checkbox',
136
+ name: 'isEffective',
137
+ labelWidth: 500,
138
+ labelTextAlign: 'right',
139
+ boxLabelAlign: 'after',
113
140
  }
114
141
  ],
115
- },
116
- {
117
- boxLabel: 'Отображать только эффективные значения для предопределенных характеристик',
118
- xtype: 'checkbox',
119
- name: 'isEffective',
120
- labelWidth: 500,
121
- labelTextAlign: 'right',
122
- boxLabelAlign: 'after',
123
142
  }
143
+
124
144
  ],
125
145
  },
126
146
  {
@@ -13,14 +13,19 @@ Ext.define('Coon.uielement.component.characteristic.CharacteristicPanelControlle
13
13
 
14
14
  doInitForm: function(entity) {
15
15
  const vm = this.getViewModel();
16
- vm.set('entity', entity || null);
16
+ entity = entity || vm.get('entity') || null;
17
+ vm.set('entity', entity);
17
18
  vm.set('isNew', !vm.get('entity'));
18
19
  if (entity) {
20
+ vm.set('title', 'Редактирование сущности ' + entity);
19
21
  this.lookup('characteristicAlgorithmList').doInit(entity);
20
22
  this.lookup('characteristicEditor').doInit(entity, 'SUBENTITY');
21
23
  this.load();
24
+ } else {
25
+ vm.set('title', 'Добавление новой сущности ');
22
26
  }
23
27
  this.initCharacteristicEntityStore();
28
+ this.lookup('entityForm').isValid();
24
29
  },
25
30
 
26
31
  doInitFormGroupReload: function(entity) {
@@ -65,9 +70,12 @@ Ext.define('Coon.uielement.component.characteristic.CharacteristicPanelControlle
65
70
  const isNew = this.getViewModel().get('isNew');
66
71
  data.isNew = isNew;
67
72
  this.getView().mask('Сохранение');
68
- const command = Ext.create('Iswe.command.IsweSaveEntity');
69
- command.on('complete', function() {
70
- this.getView().unmask();
73
+ const me = this;
74
+ Coon.util.promisifyCmd(
75
+ 'Iswe.command.IsweSaveEntity',
76
+ data
77
+ ).then(() => {
78
+ me.getView().unmask();
71
79
  if (isNew) {
72
80
  this.getViewModel().set('isNew', false);
73
81
  this.doInitForm(data['entity']);
@@ -76,8 +84,15 @@ Ext.define('Coon.uielement.component.characteristic.CharacteristicPanelControlle
76
84
  this.lookup('characteristicEditor').save();
77
85
  this.lookup('characteristicAlgorithmList').save();
78
86
  }
79
- }, this);
80
- command.execute(data);
87
+ }).catch((error) => {
88
+ me.getView().unmask();
89
+ Ext.Msg.show({
90
+ title: 'Ошибка',
91
+ message: error.responceText,
92
+ icon: Ext.Msg.ERROR,
93
+ buttons: Ext.Msg.OK,
94
+ });
95
+ });
81
96
  }
82
97
  },
83
98
  validate: function() {
@@ -42,48 +42,41 @@ Ext.define('Coon.uielement.component.characteristic.characteristicAlgorithm.Algo
42
42
  {
43
43
  xtype: 'form',
44
44
  reference: 'formPanel',
45
- bodyPadding: 5,
46
- layout: 'anchor',
45
+ bodyPadding: 10,
46
+ layout: 'column',
47
47
  defaults: {
48
- anchor: '100%',
49
- xtype: 'fieldset',
50
- layout: 'column',
51
- title: 'Данные цепочки алгоритмов',
52
- defaults: {
53
- columnWidth: 0.5,
54
- allowBlank: false,
55
- xtype: 'textfield',
56
- margin: '0 0 0 15px',
57
- },
48
+ columnWidth: 0.5,
49
+ allowBlank: false,
50
+ xtype: 'textfield',
51
+ margin: '0 0 0 15px',
58
52
  },
59
- items: [{
60
- items: [
61
- {
62
- fieldLabel: 'Код',
63
- name: 'AlgorithmChain',
64
- margin: 0,
65
- bind: {
66
- disabled: '{!isNew}',
67
- },
53
+ items: [
54
+ {
55
+ fieldLabel: 'Код',
56
+ name: 'AlgorithmChain',
57
+ margin: 0,
58
+ bind: {
59
+ disabled: '{!isNew}',
68
60
  },
69
- {
70
- fieldLabel: 'Наименование',
71
- name: 'description',
72
- }
73
- ],
74
- }],
61
+ },
62
+ {
63
+ fieldLabel: 'Наименование',
64
+ name: 'description',
65
+ }
66
+ ],
75
67
  },
76
68
  {
77
69
  xtype: 'panel',
70
+ margin: '10px 0 0 0',
78
71
  flex: 1,
79
72
  layout: {
80
- type: 'hbox',
81
- align: 'stretch',
73
+ type: 'border',
82
74
  },
83
75
  items: [
84
76
  {
85
77
  reference: 'algorithmChainBindList',
86
78
  flex: 2,
79
+ region: 'center',
87
80
  xtype: 'AlgorithmChainBindList',
88
81
  listeners: {
89
82
  beforeselect: 'onBeforeSelectAlgorithmChainBindList',
@@ -93,6 +86,8 @@ Ext.define('Coon.uielement.component.characteristic.characteristicAlgorithm.Algo
93
86
  xtype: 'AlgorithmChainBindDependencyList',
94
87
  reference: 'algorithmChainBindDependencyList',
95
88
  flex: 1,
89
+ split: true,
90
+ region: 'east',
96
91
  bind: {
97
92
  disabled: '{!record}',
98
93
  },
@@ -1,7 +1,7 @@
1
1
  Ext.define('Coon.uielement.component.characteristic.characteristicAlgorithm.AlgorithmChainSearchWindow', {
2
2
  extend: 'Ext.window.Window',
3
3
  xtype: 'AlgorithmChainSearchWindow',
4
- width: '80%',
4
+ width: 800,
5
5
  closeAction: 'hide',
6
6
  modal: true,
7
7
  title: 'Поиск цепочки алгоритмов',
@@ -124,6 +124,7 @@ Ext.define('Coon.uielement.component.characteristic.characteristicAlgorithm.Algo
124
124
  columnWidth: 0.12,
125
125
  margin: '15px 0 0 10px',
126
126
  text: 'Поиск',
127
+ ui: 'orange-button',
127
128
  handler: 'searchHandler',
128
129
  }
129
130
  ],
@@ -176,6 +177,7 @@ Ext.define('Coon.uielement.component.characteristic.characteristicAlgorithm.Algo
176
177
  },
177
178
  {
178
179
  header: 'Название',
180
+ flex: 1,
179
181
  dataIndex: 'description',
180
182
  xtype: 'hintColumn',
181
183
  }
@@ -14,6 +14,14 @@ Ext.define('Coon.uielement.component.characteristic.characteristicAlgorithm.Char
14
14
  }
15
15
  return false;
16
16
  },
17
+ selectionChange: function(get) {
18
+ const rec = get('record');
19
+ if (rec) {
20
+ this.set('buttonText', rec.get('isDeleted') ? 'Восстановить': 'Удалить');
21
+ } else {
22
+ this.set('buttonText', 'Удалить');
23
+ }
24
+ },
17
25
  },
18
26
  stores: {
19
27
  mainStore: {
@@ -26,6 +34,7 @@ Ext.define('Coon.uielement.component.characteristic.characteristicAlgorithm.Char
26
34
  },
27
35
  },
28
36
  data: {
37
+ buttonText: 'Удалить',
29
38
  record: null,
30
39
  },
31
40
  },
@@ -54,10 +63,10 @@ Ext.define('Coon.uielement.component.characteristic.characteristicAlgorithm.Char
54
63
  },
55
64
  },
56
65
  {
57
- text: 'Удалить',
58
66
  handler: 'deleteHandler',
59
67
  bind: {
60
68
  disabled: '{!record}',
69
+ text: '{buttonText}',
61
70
  },
62
71
  }
63
72
  ],
@@ -78,13 +78,18 @@ Ext.define('Coon.uielement.component.characteristic.characteristicAlgorithm.Char
78
78
  },
79
79
 
80
80
  deleteHandler: function() {
81
- const record = this.getViewModel().get('record');
81
+ const vm = this.getViewModel();
82
+ const record = vm.get('record');
82
83
  if (record) {
83
84
  if (record.isNew) {
84
85
  this.getViewModel().getStore('mainStore').remove(record);
86
+ vm.set('buttonText', 'Удалить');
85
87
  } else {
86
88
  record.set('isDeleted', !record.get('isDeleted'));
89
+ vm.set('buttonText', record.get('isDeleted') ? 'Восстановить': 'Удалить');
87
90
  }
91
+ } else {
92
+ vm.set('buttonText', 'Удалить');
88
93
  }
89
94
  },
90
95
 
@@ -1,11 +1,12 @@
1
1
  Ext.define('Coon.uielement.component.characteristic.characteristicAlgorithm.CharacteristicAlgorithmSearchWindow', {
2
2
  extend: 'Ext.window.Window',
3
3
  xtype: 'CharacteristicAlgorithmSearchWindow',
4
- width: '80%',
4
+ width: 600,
5
5
  closeAction: 'hide',
6
6
  title: 'Поиск алгоритма',
7
7
  modal: true,
8
8
  height: '80%',
9
+ layout: 'fit',
9
10
  controller: {
10
11
  choose: function() {
11
12
  this.getView().fireEvent('choose', this.getViewModel().get('record'));
@@ -47,12 +48,11 @@ Ext.define('Coon.uielement.component.characteristic.characteristicAlgorithm.Char
47
48
  {
48
49
  xtype: 'ReportPanel',
49
50
  reference: 'algReport',
50
- flex: 1,
51
51
  reportId: 'ISWE_ALG_SEARCH',
52
52
  scrollable: true,
53
- hideFilterPanel: false,
53
+ hideFilterPanel: true,
54
54
  header: false,
55
- autoFilter: false,
55
+ autoFilter: true,
56
56
  listeners: {
57
57
  configured: 'onConfigured',
58
58
  },
@@ -9,8 +9,19 @@ Ext.define('Coon.uielement.component.characteristic.characteristicGroup.Characte
9
9
  data: [],
10
10
  },
11
11
  },
12
+ formulas: {
13
+ selectionChange: function(get) {
14
+ const rec = get('localRecord');
15
+ if (rec) {
16
+ this.set('buttonText', rec.get('isDeleted') ? 'Восстановить': 'Удалить');
17
+ } else {
18
+ this.set('buttonText', 'Удалить');
19
+ }
20
+ },
21
+ },
12
22
  data: {
13
23
  localRecord: null,
24
+ buttonText: 'Удалить',
14
25
  },
15
26
  },
16
27
  bind: {
@@ -30,10 +41,10 @@ Ext.define('Coon.uielement.component.characteristic.characteristicGroup.Characte
30
41
  handler: 'addHandler',
31
42
  },
32
43
  {
33
- text: 'Удалить',
34
44
  handler: 'deleteHandler',
35
45
  bind: {
36
46
  disabled: '{!localRecord}',
47
+ text: '{buttonText}',
37
48
  },
38
49
  }
39
50
  ],
@@ -43,7 +54,7 @@ Ext.define('Coon.uielement.component.characteristic.characteristicGroup.Characte
43
54
  'header': 'Группа пользователя',
44
55
  'dataIndex': 'userGroupDescription',
45
56
  'xtype': 'hintColumn',
46
- 'flex': 1,
57
+ 'width': 180,
47
58
  'editable': false,
48
59
  },
49
60
  {
@@ -26,13 +26,18 @@ Ext.define('Coon.uielement.component.characteristic.characteristicGroup.Characte
26
26
  },
27
27
 
28
28
  deleteHandler: function() {
29
- const record = this.getViewModel().get('localRecord');
29
+ const vm = this.getViewModel();
30
+ const record = vm.get('localRecord');
30
31
  if (record) {
31
32
  if (record.get('isNew')) {
32
- this.getViewModel().getStore('mainStore').remove(record);
33
+ vm.getStore('mainStore').remove(record);
34
+ vm.set('buttonText', 'Удалить');
33
35
  } else {
34
36
  record.set('isDeleted', !record.get('isDeleted'));
37
+ vm.set('buttonText', record.get('isDeleted') ? 'Восстановить': 'Удалить');
35
38
  }
39
+ } else {
40
+ vm.set('buttonText', 'Удалить');
36
41
  }
37
42
  },
38
43
  getFullList: function(encode) {
@@ -23,6 +23,7 @@ Ext.define('Coon.uielement.component.characteristic.characteristicGroup.Characte
23
23
  items: [
24
24
  {
25
25
  region: 'center',
26
+ layout: 'fit',
26
27
  reference: 'entityGroupCharacteristicEditor',
27
28
  flex: 1,
28
29
  xtype: 'EntityGroupCharacteristicEditor',
@@ -32,6 +33,7 @@ Ext.define('Coon.uielement.component.characteristic.characteristicGroup.Characte
32
33
  },
33
34
  {
34
35
  region: 'south',
36
+ layout: 'fit',
35
37
  reference: 'characteristicAccessList',
36
38
  xtype: 'CharacteristicAccessList',
37
39
  flex: 1,