ru.coon 2.7.0 → 2.7.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # Version 2.7.1, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9028ecb552a8341a78e6a7e0d2f9eee91554c2d0)
2
+ * upd ([901f4c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/901f4c345d1025ef8861b1b649d84590c6a6a7ec))
3
+ * update: CHANGELOG.md ([1a5ea6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1a5ea663b234831a73ec046c23b951b71797481a))
4
+
1
5
  # Version 2.7.0, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c03c093df3594cbec9b0b6a2e3e4ca8d24b07e76)
2
6
  * ## Features
3
7
  * <span style='color:green'>feat: HT-7850 Включение FilterConditionToolbar в ReportPanel</span> ([02015f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/02015fd6518dec2fbbf4a16e8e29ff958fe4f1b3))
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.7.0",
7
+ "version": "2.7.1",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -16,6 +16,9 @@
16
16
  }
17
17
  }
18
18
  .filtered-column {
19
+ .x-column-header-text span{
20
+ text-decoration: underline;
21
+ }
19
22
  font-style: italic;
20
23
  font-weight: bold;
21
24
  }
@@ -20,7 +20,7 @@ Ext.define('Coon.report.plugin.grid.AddFilterConditionPlugin', {
20
20
  handler: this.addFilter.bind(this),
21
21
  }));
22
22
  contextMenu.add(new Ext.menu.Item({
23
- text: 'Отменить фильтр для столбца',
23
+ originalText: 'Отменить фильтр',
24
24
  hidden: true,
25
25
  itemId: 'cancelCurrentColumnFilter',
26
26
  handler: this.clearCurrentColumnFilter.bind(this),
@@ -98,11 +98,6 @@ Ext.define('Coon.report.plugin.grid.AddFilterConditionPlugin', {
98
98
  return this.filters.has(this.getColumnKey());
99
99
  },
100
100
 
101
- showCancelMenuItems: function() {
102
- const cancelCurrentItem = this.findMenuItem('cancelCurrentColumnFilter');
103
- cancelCurrentItem && cancelCurrentItem.setHidden(!this.isColumnFiltered());
104
- },
105
-
106
101
  findMenuItem: function(findBy) {
107
102
  const contextMenu = this.grid.contextMenu;
108
103
  return contextMenu.down(`#${findBy}`);
@@ -144,6 +139,18 @@ Ext.define('Coon.report.plugin.grid.AddFilterConditionPlugin', {
144
139
  return true;
145
140
  },
146
141
 
142
+ getValueText() {
143
+ if (typeof this.columnValue !== true && this.columnValue) {
144
+ return this.columnValue;
145
+ }
146
+ if (typeof this.columnValue === 'boolean') {
147
+ return this.columnValue ? 'истинно' : 'ложно';
148
+ }
149
+ if (this.columnValue === null || this.columnValue === undefined || this.columnValue === '') {
150
+ return 'пустое значение';
151
+ }
152
+ },
153
+
147
154
  setMenuText(record, cellIndex) {
148
155
  const contextMenu = this.grid.contextMenu;
149
156
  const columns = this.grid.getColumns();
@@ -154,11 +161,15 @@ Ext.define('Coon.report.plugin.grid.AddFilterConditionPlugin', {
154
161
  this.column = column;
155
162
  this.columnValue = record.get(column.dataIndex);
156
163
 
157
- this.showCancelMenuItems();
164
+ const cancelCurrentItem = this.findMenuItem('cancelCurrentColumnFilter');
165
+ cancelCurrentItem.hide();
166
+
158
167
  const foundMenuItem = contextMenu.down('#filterByCellValue');
159
168
  foundMenuItem.show();
160
169
  if (this.filters.size && this.filters.get(this.getColumnKey()) === this.columnValue) {
161
170
  foundMenuItem.hide();
171
+ cancelCurrentItem.setText(`${cancelCurrentItem.originalText} по значению: ${this.getValueText()}`);
172
+ cancelCurrentItem.show();
162
173
  }
163
174
 
164
175
  if (this.isFilterable()) {
@@ -52,10 +52,10 @@ Ext.define('Coon.report.plugin.grid.GridContextMenu', {
52
52
  this.qtipSpan = cell.querySelector('[data-qtip]');
53
53
  this.qtipSpan && this.qtipSpan.removeAttribute('data-qtip');
54
54
 
55
- contextMenu.alignTo(cell, 'tl-bl');
55
+ // contextMenu.alignTo(cell, 'tl-bl');
56
56
 
57
- const y = contextMenu.getY();
58
- contextMenu.setY(y - 7);
57
+ // const y = contextMenu.getY();
58
+ // contextMenu.setY(y - 7);
59
59
  },
60
60
 
61
61
  restoreCellQtip: function() {
@@ -37,7 +37,6 @@ Ext.define('Coon.uielement.component.formchips.FilterConditionToolbarController'
37
37
  }
38
38
  }, this);
39
39
 
40
- reportPanel.on('filterchange', this.setReportGridFilters, this);
41
40
  reportPanel.on('clearFilter', this.onReportFilterClear, this);
42
41
  } else { // Реализация в кастомной панели
43
42
  const mainPanel = this.getView().up();
@@ -151,7 +150,6 @@ Ext.define('Coon.uielement.component.formchips.FilterConditionToolbarController'
151
150
  */
152
151
  fillChipsHandler: function() {
153
152
  this.fillRemoteChips();
154
- this.fillLocalChips();
155
153
  this.fillIfNoChips();
156
154
  this.addButtons();
157
155
  },
@@ -182,18 +180,6 @@ Ext.define('Coon.uielement.component.formchips.FilterConditionToolbarController'
182
180
  }
183
181
  },
184
182
 
185
- fillLocalChips: function() {
186
- const cont = this.lookup('chipsContainer');
187
- const filters = this.filters || [];
188
- this.countLocalChips = 0;
189
- filters.forEach(function(chipConfig) {
190
- const cmp = new Coon.uielement.component.formchips.Chip(chipConfig);
191
- cmp.on('needReloadChips', this.onReloadChipsHandler, this);
192
- cont.add(cmp);
193
- this.countLocalChips++;
194
- }, this);
195
- },
196
-
197
183
  fillIfNoChips: function() {
198
184
  if (!this.countRemoteChips && !this.countLocalChips) {
199
185
  const cmp = new Coon.uielement.component.formchips.Chip({
@@ -244,14 +230,6 @@ Ext.define('Coon.uielement.component.formchips.FilterConditionToolbarController'
244
230
  return ret;
245
231
  },
246
232
 
247
- /**
248
- * Установить данные для чипов из фильтров
249
- * @param {Array<Object>} filters
250
- */
251
- setReportGridFilters(filters) {
252
- this.filters = filters || [];
253
- },
254
-
255
233
  onReportFilterClear() {
256
234
  this.setLastSearchFields([]);
257
235
  this.onReloadChipsHandler();
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '2.7.0',
3
+ number: '2.7.1',
4
4
  });