ru.coon 2.7.25 → 2.7.26
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/package.json +1 -1
- package/src/Function.js +13 -9
- package/src/common/component/editor/creators/SimpleReportEditorCreator.js +1 -0
- package/src/common/field/fieldset/DateTimeField.js +0 -5
- package/src/report/component/SimplestReportCombo.js +5 -0
- package/src/report/model/CharacteristicBean.js +8 -2
- package/src/common/field/checkbox/RoundCheckbox.js +0 -5
- package/src/common/field/checkbox/RoundCheckbox.scss +0 -48
- package/src/nav/MenuLoader.js +0 -23
- package/src/report/plugin/grid/ExportReportDataToFilePlugin.md +0 -7
package/package.json
CHANGED
package/src/Function.js
CHANGED
|
@@ -17,7 +17,7 @@ Ext.define('Coon.Function', {
|
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
*
|
|
20
|
-
* @param {*}
|
|
20
|
+
* @param {*} component Ext component
|
|
21
21
|
* @param {*} requestOptions
|
|
22
22
|
* @param {String} requestOptions.url url
|
|
23
23
|
* @param {Boolean} requestOptions.binary
|
|
@@ -26,18 +26,15 @@ Ext.define('Coon.Function', {
|
|
|
26
26
|
* @param {Boolean} sync sync|async request
|
|
27
27
|
* @returns
|
|
28
28
|
*/
|
|
29
|
-
doRequest: function(
|
|
29
|
+
doRequest: function(component, requestOptions, sync) {
|
|
30
30
|
const requestHash = Coon.util.generateHashFromObj(requestOptions);
|
|
31
31
|
if (!this.beforeRequest(requestOptions, requestHash)) {
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
34
|
let myMask;
|
|
35
|
-
if (
|
|
36
|
-
if (!win.isComponent) {
|
|
37
|
-
Coon.log.error('win parameter is element instead component');
|
|
38
|
-
}
|
|
35
|
+
if (component && !this.isComponentRendered(component)) {
|
|
39
36
|
myMask = new Ext.LoadMask({
|
|
40
|
-
target:
|
|
37
|
+
target: component,
|
|
41
38
|
msg: requestOptions.text || 'Загрузка...',
|
|
42
39
|
});
|
|
43
40
|
myMask.show();
|
|
@@ -63,7 +60,7 @@ Ext.define('Coon.Function', {
|
|
|
63
60
|
response.responseJSON = Ext.decode(response.responseText, true);
|
|
64
61
|
}
|
|
65
62
|
try {
|
|
66
|
-
requestOptions.callback.call(this,
|
|
63
|
+
requestOptions.callback.call(this, component, true, response, requestOptions);
|
|
67
64
|
} catch (e) {
|
|
68
65
|
Coon.log.error(e);
|
|
69
66
|
}
|
|
@@ -79,7 +76,7 @@ Ext.define('Coon.Function', {
|
|
|
79
76
|
response.responseJSON = Ext.decode(response.responseText, true);
|
|
80
77
|
}
|
|
81
78
|
try {
|
|
82
|
-
requestOptions.failure.call(this,
|
|
79
|
+
requestOptions.failure.call(this, component, requestOptions, response);
|
|
83
80
|
} catch (e) {
|
|
84
81
|
console.warn(e);
|
|
85
82
|
}
|
|
@@ -95,6 +92,13 @@ Ext.define('Coon.Function', {
|
|
|
95
92
|
return request;
|
|
96
93
|
},
|
|
97
94
|
|
|
95
|
+
isComponentRendered: function(component) {
|
|
96
|
+
return
|
|
97
|
+
component &&
|
|
98
|
+
component.isComponent &&
|
|
99
|
+
component.rendered
|
|
100
|
+
},
|
|
101
|
+
|
|
98
102
|
/**
|
|
99
103
|
* Сериализация содержимого Store
|
|
100
104
|
* @param store
|
|
@@ -41,7 +41,6 @@ Ext.define('Coon.common.field.fieldset.DateTimeField', {
|
|
|
41
41
|
|
|
42
42
|
initComponent: function() {
|
|
43
43
|
this.callParent();
|
|
44
|
-
this.on('change', this.publishValue, this);
|
|
45
44
|
this.triggers.time.setHidden(!!this.hideTimeTrigger);
|
|
46
45
|
},
|
|
47
46
|
|
|
@@ -136,8 +135,4 @@ Ext.define('Coon.common.field.fieldset.DateTimeField', {
|
|
|
136
135
|
this.picker.setValue(Ext.isDate(value) ? value : this.createInitialDate());
|
|
137
136
|
}
|
|
138
137
|
},
|
|
139
|
-
|
|
140
|
-
publishValue: function() {
|
|
141
|
-
this.publishState('value', this.getValue());
|
|
142
|
-
},
|
|
143
138
|
});
|
|
@@ -280,6 +280,11 @@ Ext.define('Coon.report.component.SimplestReportCombo', {
|
|
|
280
280
|
const find = map.find((e) => e[this.defaultValueFlg || 'IS_DEFAULT'] === 'Y');
|
|
281
281
|
const defaultValue = this.value || (find && find[this.valueField]);
|
|
282
282
|
if (defaultValue) {
|
|
283
|
+
const foundByValueField = map.find((e) => e[this.valueField] === this.value);
|
|
284
|
+
if (!foundByValueField) {
|
|
285
|
+
this.setValue(null);
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
283
288
|
this.setValue(defaultValue);
|
|
284
289
|
if (Ext.isFunction(this.publishState)) {
|
|
285
290
|
this.publishState('value', this.getValue());
|
|
@@ -10,9 +10,15 @@ Ext.define('Coon.report.model.CharacteristicBean', {
|
|
|
10
10
|
requires: 'Coon.report.model.CharacteristicBeanFields',
|
|
11
11
|
fields: [
|
|
12
12
|
{name: Coon.report.model.CharacteristicBeanFields.$effectiveDate, type: 'date'},
|
|
13
|
-
{
|
|
13
|
+
{
|
|
14
|
+
name: Coon.report.model.CharacteristicBeanFields.$value, type: 'string', convert: (val) => {
|
|
15
|
+
return typeof val === 'string' ? val.trim() : val;
|
|
16
|
+
},
|
|
17
|
+
},
|
|
14
18
|
{name: Coon.report.model.CharacteristicBeanFields.$valueDescription, type: 'string'},
|
|
15
|
-
{name: Coon.report.model.CharacteristicBeanFields.$type, type: 'string'
|
|
19
|
+
{name: Coon.report.model.CharacteristicBeanFields.$type, type: 'string', convert: (val) => {
|
|
20
|
+
return typeof val === 'string' ? val.trim() : val;
|
|
21
|
+
}},
|
|
16
22
|
{name: Coon.report.model.CharacteristicBeanFields.$typeDescription, type: 'string'},
|
|
17
23
|
{name: Coon.report.model.CharacteristicBeanFields.$editable, type: 'boolean', defaultValue: true},
|
|
18
24
|
{name: Coon.report.model.CharacteristicBeanFields.$visible, type: 'boolean', defaultValue: true},
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
.x-form-fieldCheckbox {
|
|
2
|
-
.x-form-field {
|
|
3
|
-
position: relative;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.x-form-field label {
|
|
7
|
-
background-color: #fff;
|
|
8
|
-
border: 1px solid #ccc;
|
|
9
|
-
border-radius: 50%;
|
|
10
|
-
cursor: pointer;
|
|
11
|
-
height: 28px;
|
|
12
|
-
left: 0;
|
|
13
|
-
position: absolute;
|
|
14
|
-
top: 0;
|
|
15
|
-
width: 28px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.x-form-field label:after {
|
|
19
|
-
border: 2px solid #fff;
|
|
20
|
-
border-top: none;
|
|
21
|
-
border-right: none;
|
|
22
|
-
content: "";
|
|
23
|
-
height: 6px;
|
|
24
|
-
left: 7px;
|
|
25
|
-
opacity: 0;
|
|
26
|
-
position: absolute;
|
|
27
|
-
top: 8px;
|
|
28
|
-
transform: rotate(-45deg);
|
|
29
|
-
width: 12px;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.x-form-field input[type="checkbox"] {
|
|
33
|
-
visibility: hidden;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.x-form-field input[type="checkbox"]:checked + label {
|
|
37
|
-
background-color: #66bb6a;
|
|
38
|
-
border-color: #66bb6a;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.x-form-field input[type="checkbox"]:checked + label:after {
|
|
42
|
-
opacity: 1;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.x-form-item-body, .x-form-cb-wrap-inner {
|
|
46
|
-
margin: 0 auto;
|
|
47
|
-
}
|
|
48
|
-
}
|
package/src/nav/MenuLoader.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
Ext.define('Coon.nav.MenuLoader', {
|
|
2
|
-
singleton: true,
|
|
3
|
-
|
|
4
|
-
isLoaded: false,
|
|
5
|
-
|
|
6
|
-
load() {
|
|
7
|
-
return Coon.util.promisifyCmd('command.GetDynamicReportDataCommand', 'MENU_ALLITEMS')
|
|
8
|
-
.then((data) => {
|
|
9
|
-
if (Array.isArray(data.list)) {
|
|
10
|
-
this.uiElementMap = data.list.reduce();
|
|
11
|
-
}
|
|
12
|
-
this.isLoaded = true;
|
|
13
|
-
});
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
get() {
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
isValidMenuItem(uiEmentId) {
|
|
21
|
-
return this.uiElementMap.has(uiEmentId);
|
|
22
|
-
},
|
|
23
|
-
});
|