ru.coon 3.0.50 → 3.0.52

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,23 @@
1
+ # Version 3.0.52, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/290ca0d6e133cd9631aae34caa6f0c63ab449128)
2
+ * ## Features
3
+ * <span style='color:green'>feat: NEVA-974: Добавил возможность выбора нескольких файлов</span> ([2f49c5], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2f49c53d5af263c1c7931497140faea164a94357))
4
+ * <span style='color:green'>feat: NEVA-974: Убрал вставляемый по дефолту заголовок, при интеграции в форму он не всегда нужен</span> ([c03ca9], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c03ca9eb849b2011ce03dc0600e0ce39a0dd28b4))
5
+
6
+ * ## Fixes
7
+ * <span style='color:red'> UiCustomController title setup</span> ([c1d588], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c1d588bd0dcf2c1d91ff99644a94b8408a008c98))
8
+
9
+ * upd ([9204e3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9204e301a710bf0fb0d0742f88986cf281d62230))
10
+ * upd ([800934], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/800934ee0dfb8d8d4965fb46e1b34f686b59da4f))
11
+ * upd ([98cb3c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/98cb3c6330d03a5d0da6604c7884375a42b03993))
12
+ * upd ([bb5a58], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bb5a58174b8e00131cb673d27c42566df615c52c))
13
+ * update: CHANGELOG.md ([44a62d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/44a62d6492224a185291f9cd359bff3655b79991))
14
+
15
+ # Version 3.0.51, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/64e72d95cacc2f81ab46d1d6d36728f73d0fa68e)
16
+ * ## Features
17
+ * <span style='color:green'>feat: NEVA-974: Доработка передачи в сервиз загрузки файлов обязательного параметра fileTypeId</span> ([5154fb], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5154fbb972d7b84a0d880babe97b81fb16f9001c))
18
+
19
+ * update: CHANGELOG.md ([5d7a42], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5d7a428cd48fd8b9d51cc830171812f0efba13ed))
20
+
1
21
  # Version 3.0.50, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/afdbae38fc7d35cb8df2ad696dc242e0ef3019b1)
2
22
  * ## Fixes
3
23
  * <span style='color:red'>HT-13994: fix column setVisible bug</span> ([b33727], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b33727b0f0a19ec9a9d502540684ebbc739d4a45))
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "3.0.50",
7
+ "version": "3.0.52",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -129,7 +129,7 @@ Ext.define('Coon.app.viewPort.CenterView', {
129
129
  this.add(component);
130
130
 
131
131
  component.on('titlechange', function(_, title) {
132
- title = title || '<span style="color:red">ошибка</span>';
132
+ title = title || Coon.format.withHint('<span style="color:red">---</span>', 'заголовок не задан');
133
133
  if (typeof title !== 'string') {
134
134
  if (typeof title.getTitle !== 'function') {
135
135
  return;
@@ -161,7 +161,8 @@ Ext.define('Coon.common.panel.WindowWrap', {
161
161
  this.doClose();
162
162
  }, this);
163
163
 
164
- this.content.on('titlechange', function(view, title) {
164
+ this.content.on('titlechange', function(_, title) {
165
+ title = title || Coon.format.withHint('<span style="color:red">---</span>', 'заголовок не задан');
165
166
  if (typeof title !== 'string') {
166
167
  if (typeof title.getTitle !== 'function') {
167
168
  return;
@@ -98,6 +98,8 @@ Ext.define('Coon.common.panel.dropzone.UniversalMultiUploadForm', {
98
98
  * @param {Object}
99
99
  */
100
100
  headers: {},
101
+
102
+ fileTypeId: 'UNKNOWN',
101
103
  },
102
104
 
103
105
  layout: {
@@ -112,7 +114,7 @@ Ext.define('Coon.common.panel.dropzone.UniversalMultiUploadForm', {
112
114
  const docElem = document.documentElement;
113
115
  const y = window.innerHeight|| docElem.clientHeight;
114
116
  this.height = y > 0 ? y * 0.8 : 600;
115
- this.title = this.title || 'Форма загрузки данных';
117
+ // this.title = this.title || 'Форма загрузки данных';
116
118
  this.buttons = this.createButtons();
117
119
  this.uploadForm = Ext.create('Ext.form.Panel', {
118
120
  reference: 'formPanelRef',
@@ -129,7 +129,13 @@ Ext.define('Coon.common.panel.dropzone.UniversalMultiUploadFormController', {
129
129
  submitFunction: async function() {
130
130
  if (this.validate()) {
131
131
  const parameters = this.collectParams();
132
+ const fileTypeId = this.getView().getFileTypeId();
133
+ if (!fileTypeId) {
134
+ Ext.Msg.alert('Сообщение системы', 'Не определен параметр fileTypeId');
135
+ return;
136
+ }
132
137
  const formData = new FormData();
138
+ formData.append('fileTypeId', fileTypeId);
133
139
  for (const key in parameters) {
134
140
  formData.append(key, parameters[key]);
135
141
  }
@@ -15,7 +15,7 @@ Ext.define('Coon.common.panel.dropzone.UploadDropZone', {
15
15
  <span><i class="fa fa-cloud-upload-alt icon-upload" style=""></i></span>
16
16
  ${this.baseText}
17
17
  </div>
18
- <input name="files[]" type="file" class="file-input" />
18
+ <input name="files[]" type="file" multiple class="file-input" />
19
19
  </div>`);
20
20
  this.callParent();
21
21
  },
@@ -169,7 +169,7 @@ Ext.define('Coon.report.component.report.NorthPanel', {
169
169
  Ext.merge(this, properties);
170
170
  this.filterPlugins.push({
171
171
  ptype: 'EnterConfirmFormPlugin',
172
- confirmHandler: this.reportPanel ? Ext.bind(this.reportPanel.filterHandler, this.reportPanel) : Ext.emptyFn,
172
+ confirmHandler: report ? Ext.bind(report.filterHandler, report) : Ext.emptyFn,
173
173
  });
174
174
  this.filterPlugins.push(Ext.apply({
175
175
  ptype: 'FormFieldFocusPlugin',
@@ -140,29 +140,66 @@ Ext.define('Coon.uielement.component.UiCustomController', {
140
140
  return staticPlace === 'end' ? `${contextPart}${delimiterPart}${staticPart}` : `${staticPart}${delimiterPart}${contextPart}`;
141
141
  },
142
142
 
143
- setCustomPanelTitle(title) {
143
+ getComponentTitle() {
144
144
  const componentTitle = this.getView().componentTitle;
145
- if (!title && Ext.isObject(componentTitle) && (componentTitle.static || componentTitle.context)) {
145
+ return Ext.isObject(componentTitle) &&
146
+ (componentTitle.static || componentTitle.context) &&
147
+ componentTitle;
148
+ },
149
+
150
+ setCustomPanelTitle() {
151
+ const setupTitle = (title, options = {}) => {
152
+ const view = this.getView();
153
+ if (!typeof title === 'string') {
154
+ return;
155
+ }
156
+ title = title || Coon.format.withHint('<span style="color:red">---</span>', 'заголовок не задан');
157
+ view.titleText = title;
158
+ if (
159
+ view.tab && typeof view.tab.setTooltip === 'function'
160
+ ) {
161
+ this.getView().tab.setTooltip(title);
162
+ }
163
+ if (!options.silent) {
164
+ view.fireEvent('titlechange', this.getView(), title);
165
+ }
166
+ };
167
+
168
+ const componentTitle = this.getComponentTitle();
169
+ if (componentTitle) {
146
170
  const {static: staticText, context} = componentTitle;
147
171
  const testContext = /^[a-zA-Z._]+$/;
148
172
  if (typeof context === 'string' && testContext.test(context)) {
149
- this.getViewModel().bind(`{${context}}`, function(contextValue, ...args) {
150
- this.setCustomPanelTitle(
151
- this.makeComponentTitle(staticText, contextValue)
173
+ this.getViewModel().bind(`{${context}}`, function(contextValue) {
174
+ setupTitle(
175
+ this.makeComponentTitle(staticText, contextValue),
176
+ {silent: true}
152
177
  );
153
178
  }, this);
154
179
  } else {
155
- this.setCustomPanelTitle(
156
- this.makeComponentTitle(staticText)
180
+ setupTitle(
181
+ this.makeComponentTitle(staticText),
182
+ {silent: true}
157
183
  );
158
184
  }
159
- return;
185
+ } else {
186
+ let title = this.getView().getTitle();
187
+ if (Ext.isObject(title) && typeof title.getTitle === 'function') {
188
+ title = title.getTitle();
189
+ }
190
+ setupTitle(title);
160
191
  }
192
+ },
193
+
194
+ setupTitle(title, options = {}) {
161
195
  if (!typeof title === 'string') {
162
196
  return;
163
197
  }
198
+ title = title || Coon.format.withHint('<span style="color:red">---</span>', 'заголовок не задан');
164
199
  this.getView().titleText = title;
165
- this.getView().fireEvent('titlechange', this.getView(), title);
200
+ if (!options.silent) {
201
+ this.getView().fireEvent('titlechange', this.getView(), title);
202
+ }
166
203
  if (
167
204
  this.getView().tab &&
168
205
  typeof this.getView().tab.setTooltip === 'function'
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '3.0.50',
3
+ number: '3.0.52',
4
4
  });