ru.coon 2.7.76 → 2.8.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 +18 -0
- package/package.json +1 -1
- package/src/app/Application.js +224 -0
- package/src/app/Application.scss +9 -0
- package/src/app/Router.js +52 -17
- package/src/app/{component → viewPort}/CenterView.js +1 -1
- package/src/app/{component → viewPort}/CenterViewController.js +1 -1
- package/src/app/viewPort/Main.js +3 -6
- package/src/common/plugin/form/RequiredFlagPlugin.js +3 -0
- package/src/nav/AppNavigationMenuController.js +9 -3
- package/src/report/component/settings/AddVersioningTab.js +1 -6
- package/src/uielement/component/settings/AddVersioningTab.js +7 -13
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
# Version 2.8.1, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/88c146ad577ce2a14d194c245e3d5151081af6af)
|
|
2
|
+
* add unconditional versioning ([187668], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/187668ff86c8e91b440ce9b8a1052a191a7989d6))
|
|
3
|
+
* update: CHANGELOG.md ([8386a7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8386a79fae89b882f1a3baf81849bb08ffd7a298))
|
|
4
|
+
|
|
5
|
+
# Version 2.8.0, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/74558cb55135099e1cc4ba5ec585ac75e12cbd83)
|
|
6
|
+
* update: CHANGELOG.md ([46e9bc], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/46e9bc47a9ddb94057c101cc12e5061ba7cf22ce))
|
|
7
|
+
|
|
8
|
+
# Version 2.7.77, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ed565df4038dd160f1166e689d81d359feb3003c)
|
|
9
|
+
* update: CHANGELOG.md ([ae6b28], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ae6b28704a00eeaf40f433bba41ae4a6eaaa99f8))
|
|
10
|
+
|
|
1
11
|
# Version 2.7.76, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/aba7291e49ef3d047503bdb2b8dae078d617a8f2)
|
|
2
12
|
* ## Fixes
|
|
3
13
|
* <span style='color:red'>fix precision in CopyRowsFromGrid, HT-9263</span> ([a02eb9], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a02eb9443ebf6794e35abdc924c45763c815b245))
|
|
@@ -345,16 +355,24 @@ fix: restore version of custom panel in editor</span> ([53a300], [link](http://g
|
|
|
345
355
|
|
|
346
356
|
# Version 2.7.30, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a72ce199d2d79b7a5dcb52cc81cd68e46f34829a)
|
|
347
357
|
* ## Features
|
|
358
|
+
* <span style='color:green'>feat: TR-68867: fix undefined elems in main view</span> ([3e38e7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/3e38e74f415961b3aa87b86e646bdc5e253c0398))
|
|
348
359
|
* <span style='color:green'>feat: HT-6760 компонент для управления правами кастомных панелей</span> ([97cda5], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/97cda502cccce84bd63fd23a9f4b82fb42caa65b))
|
|
360
|
+
* <span style='color:green'>feat: TR-68867: create coon application for all projects</span> ([1206ec], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1206ecc140735a0ddc99120be3283e5e1dfc0bf5))
|
|
361
|
+
* <span style='color:green'>feat: TR-68867: create coon application for all projects</span> ([85563b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/85563b717f0cd6a5a79fd4f78262b6a4375dc8c9))
|
|
349
362
|
|
|
350
363
|
* ## Fixes
|
|
351
364
|
* <span style='color:red'> HT-8422: set filter panel height on afterlayout</span> ([d65a92], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d65a9277c2fcedaba912ff40ba7a912049bdd7f7))
|
|
365
|
+
* <span style='color:red'> TR-68867 fix for label fields on filterPanel</span> ([740ac7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/740ac7bbb89794e46b5bca99bd6d279350e2672f))
|
|
352
366
|
* <span style='color:red'> HT-8131 add universal button for collapse/expand report lines in a hierarchy</span> ([0a7edf], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0a7edf4357213fd7872ecb361ce47261b3102b4c))
|
|
353
367
|
* <span style='color:red'> HT-8131 refactoring</span> ([f2b72a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f2b72a804d99b23988f0e25d2f5e0ec831c694bb))
|
|
354
368
|
|
|
355
369
|
* update: CHANGELOG.md ([880435], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/88043579448bda38f9c2b2ec4d159a2d502dba5a))
|
|
356
370
|
|
|
357
371
|
# Version 2.7.29, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/567513e38f7c7e6b90e1873785d5fb69e9fb9f4b)
|
|
372
|
+
* ## Features
|
|
373
|
+
* <span style='color:green'>feat: TR-68867: create coon application for all projects</span> ([e815bf], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e815bf50e927dfa8ee863f0c51243ef51d034818))
|
|
374
|
+
* <span style='color:green'>feat: TR-68867: create coon application for all projects</span> ([795acd], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/795acd7893676751680af5a74a6a3b4467abc215))
|
|
375
|
+
|
|
358
376
|
* ## Fixes
|
|
359
377
|
* <span style='color:red'> HT-8131 set new menu</span> ([19b735], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/19b73537c87c685cdf11156c4cc95e120b7eb89e))
|
|
360
378
|
* <span style='color:red'> HT-8131 renaming</span> ([6a84ad], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6a84ad2ca12ee556278e9f2bb25a9fe94b8ae38e))
|
package/package.json
CHANGED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
Ext.define('Coon.app.Application', {
|
|
2
|
+
extend: 'Ext.app.Application',
|
|
3
|
+
name: 'CoonApplication',
|
|
4
|
+
requires: ['Iconpack.*', 'Coon.*', 'Ext.*'],
|
|
5
|
+
config: {
|
|
6
|
+
applicationMainView: null,
|
|
7
|
+
},
|
|
8
|
+
|
|
9
|
+
appRouter: Coon.app.Router,
|
|
10
|
+
|
|
11
|
+
onLogout: function() {
|
|
12
|
+
Ext.Msg.show({
|
|
13
|
+
title: 'Сообщение системы',
|
|
14
|
+
msg: 'Вы действительно хотите выйти?',
|
|
15
|
+
buttons: Ext.Msg.YESNO,
|
|
16
|
+
fn: function(btn) {
|
|
17
|
+
if (btn === 'yes') {
|
|
18
|
+
Ext.getBody().mask();
|
|
19
|
+
this.setUserData();
|
|
20
|
+
sessionStorage.clear();
|
|
21
|
+
window.location.href = '/logout';
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
scope: this,
|
|
25
|
+
});
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
isAuthenticated() {
|
|
29
|
+
const userData = this.getUserData();
|
|
30
|
+
return userData && userData.authenticated === true;
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
getUserData() {
|
|
34
|
+
return localStorage.getJson('userData') || {};
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
setUserData(data) {
|
|
38
|
+
localStorage.setItem('userData', data || null);
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
clearUserData() {
|
|
42
|
+
this.processNotAuthorizedAction();
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
processNotAuthorizedAction() {
|
|
46
|
+
sessionStorage.clear();
|
|
47
|
+
this.setUserData();
|
|
48
|
+
window.location.reload();
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
createFxAnim(view, showFlag, callback) {
|
|
52
|
+
const cfg = showFlag ?
|
|
53
|
+
{
|
|
54
|
+
from: {hidden: false, style: {background: 'transparent'}, opacity: 0},
|
|
55
|
+
to: {opacity: 1},
|
|
56
|
+
} :
|
|
57
|
+
{
|
|
58
|
+
from: {hidden: false, opacity: 1},
|
|
59
|
+
to: {opacity: 0, hidden: true},
|
|
60
|
+
|
|
61
|
+
};
|
|
62
|
+
const cmp = Ext.create('Ext.fx.Anim', Ext.apply(cfg, {
|
|
63
|
+
target: view,
|
|
64
|
+
duration: 1000,
|
|
65
|
+
}));
|
|
66
|
+
if (callback) {
|
|
67
|
+
cmp.on('afteranimate', callback, this, {single: true});
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
onLoginSuccessful() {
|
|
72
|
+
this.createFxAnim(this.getApplicationMainView(), false, async function() {
|
|
73
|
+
this.getApplicationMainView().destroy();
|
|
74
|
+
this.setApplicationMainView(Ext.create({
|
|
75
|
+
xtype: 'mainview',
|
|
76
|
+
plugins: 'viewport',
|
|
77
|
+
hidden: true,
|
|
78
|
+
}));
|
|
79
|
+
this.createFxAnim(this.getApplicationMainView(), true);
|
|
80
|
+
this.getApplicationMainView().show();
|
|
81
|
+
this.afterAuthorized();
|
|
82
|
+
});
|
|
83
|
+
this.getApplicationMainView().show();
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
afterLoad: async function() {
|
|
87
|
+
this.appRouter.onBeforeRouteEnterFailedFn = this.processNotAuthorizedAction;
|
|
88
|
+
Ext.on('auth:loginSuccessful', this.onLoginSuccessful, this);
|
|
89
|
+
|
|
90
|
+
const {authenticated, requireTwoFactorAuthentication} = this.getUserData();
|
|
91
|
+
if (authenticated && requireTwoFactorAuthentication) {
|
|
92
|
+
this.setUserData();
|
|
93
|
+
}
|
|
94
|
+
const isAuthValid = authenticated === true && !requireTwoFactorAuthentication;
|
|
95
|
+
let view = isAuthValid ? 'mainview' : 'loginview';
|
|
96
|
+
|
|
97
|
+
if (window.location.href.indexOf('customForm') > -1) {
|
|
98
|
+
view = 'frameview';
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
this.setApplicationMainView(Ext.create({
|
|
102
|
+
xtype: view,
|
|
103
|
+
plugins: 'viewport',
|
|
104
|
+
hidden: true,
|
|
105
|
+
workspace: null,
|
|
106
|
+
}));
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
Ext.get('splash').destroy();
|
|
110
|
+
|
|
111
|
+
this.createFxAnim(this.getApplicationMainView(), true, () => {
|
|
112
|
+
Ext.getBody().removeCls('launching');
|
|
113
|
+
});
|
|
114
|
+
this.getApplicationMainView().show();
|
|
115
|
+
|
|
116
|
+
if (isAuthValid) {
|
|
117
|
+
this.afterAuthorized();
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
getErrorMessage(response) {
|
|
121
|
+
if (response.responseType === 'json') {
|
|
122
|
+
return response.responseJson;
|
|
123
|
+
}
|
|
124
|
+
const responseText = this.getResponseText(response);
|
|
125
|
+
try {
|
|
126
|
+
return Ext.decode(responseText);
|
|
127
|
+
} catch (ex) {
|
|
128
|
+
return responseText;
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
getResponseText: function(response) {
|
|
133
|
+
if (typeof response.responseText !== 'undefined') {
|
|
134
|
+
return response.responseText;
|
|
135
|
+
}
|
|
136
|
+
if (typeof response.responseBytes !== 'undefined') {
|
|
137
|
+
return new TextDecoder().decode(response.responseBytes);
|
|
138
|
+
}
|
|
139
|
+
return Ext.encode({
|
|
140
|
+
message: 'Неизвестная ошибка',
|
|
141
|
+
});
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @method resendModifiedRequest
|
|
146
|
+
* resend request with additional parameters
|
|
147
|
+
*
|
|
148
|
+
* @param {Ext.data.Connection} conn
|
|
149
|
+
* @param {Object} responseData
|
|
150
|
+
* @param {Object} options
|
|
151
|
+
* @param {number} messageCategory
|
|
152
|
+
* @param {number} messageCode
|
|
153
|
+
*/
|
|
154
|
+
resendModifiedRequest(conn, responseData, options, messageCategory, messageCode) {
|
|
155
|
+
const billingIgnoredValidation = responseData.billingIgnoredValidation || '';
|
|
156
|
+
|
|
157
|
+
// modify options with category and code
|
|
158
|
+
options.params.billingIgnoredValidation =
|
|
159
|
+
`${billingIgnoredValidation}${messageCategory},${messageCode};`,
|
|
160
|
+
|
|
161
|
+
conn.request(options);
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
onAppUpdate: function() {
|
|
165
|
+
Ext.Msg.show({
|
|
166
|
+
title: 'Сообщение системы',
|
|
167
|
+
closable: false,
|
|
168
|
+
message: 'Доступна новая версия, приложение будет обновлено',
|
|
169
|
+
cls: 'simplestInfoMsg',
|
|
170
|
+
buttons: Ext.Msg.OK,
|
|
171
|
+
left: 0,
|
|
172
|
+
icon: Ext.Msg.INFO,
|
|
173
|
+
fn: function(btn) {
|
|
174
|
+
if (btn === 'ok') {
|
|
175
|
+
Ext.fireEvent('application:onAppUpdate');
|
|
176
|
+
window.location.reload();
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
});
|
|
180
|
+
},
|
|
181
|
+
|
|
182
|
+
checkAuth() {
|
|
183
|
+
return Ext.Ajax.request({
|
|
184
|
+
url: '/info',
|
|
185
|
+
headers: {'X-CSRF-Token': localStorage.getItem('CSRFToken')},
|
|
186
|
+
method: 'GET',
|
|
187
|
+
}).then((res) => {
|
|
188
|
+
if (Ext.isString(res.responseText)) {
|
|
189
|
+
this.setUserData(res.responseText);
|
|
190
|
+
}
|
|
191
|
+
}).catch((res) => {
|
|
192
|
+
if (res.status === 401) {
|
|
193
|
+
this.processNotAuthorizedAction();
|
|
194
|
+
}
|
|
195
|
+
Ext.Msg.alert('ошибка', res.responseText, this.getErrorMessage(res));
|
|
196
|
+
});
|
|
197
|
+
},
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
launch: function() {
|
|
201
|
+
this.appRouter.onBeforeRouteEnterFn = this.isAuthenticated.bind(this);
|
|
202
|
+
Ext.on('auth:logout', this.onLogout, this);
|
|
203
|
+
this.checkAuth().then(() => {
|
|
204
|
+
Ext.get('splash').fadeOut({
|
|
205
|
+
duration: 1000,
|
|
206
|
+
listeners: {
|
|
207
|
+
afteranimate: {
|
|
208
|
+
fn: this.afterLoad,
|
|
209
|
+
single: true,
|
|
210
|
+
scope: this,
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
});
|
|
214
|
+
this.afterCheckAuth();
|
|
215
|
+
});
|
|
216
|
+
this.afterLaunch();
|
|
217
|
+
},
|
|
218
|
+
afterAuthorized() {},
|
|
219
|
+
|
|
220
|
+
afterLaunch() {},
|
|
221
|
+
|
|
222
|
+
afterCheckAuth() {},
|
|
223
|
+
|
|
224
|
+
});
|
package/src/app/Router.js
CHANGED
|
@@ -1,27 +1,61 @@
|
|
|
1
1
|
Ext.define('Coon.app.Router', {
|
|
2
2
|
mixins: ['Ext.route.Mixin'],
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
'
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
singleton: true,
|
|
4
|
+
constructor() {
|
|
5
|
+
this.setRoutes({
|
|
6
|
+
':{type}/:{id}': {
|
|
7
|
+
action: 'onRouteEnter',
|
|
8
|
+
},
|
|
9
|
+
':{id}': {
|
|
10
|
+
action: 'onRouteEnter',
|
|
11
|
+
},
|
|
12
|
+
':{type}/:{id}/:{params...}': {
|
|
13
|
+
action: 'onRouteEnter',
|
|
14
|
+
types: {
|
|
15
|
+
'...': {
|
|
16
|
+
re: '(.+)?',
|
|
17
|
+
split: '/',
|
|
18
|
+
parse: (value) => value,
|
|
19
|
+
},
|
|
17
20
|
},
|
|
18
21
|
},
|
|
19
|
-
}
|
|
22
|
+
});
|
|
23
|
+
Ext.on('router:goToLastRoute', () => {
|
|
24
|
+
this.onRouteEnter(this.lastRoute);
|
|
25
|
+
}, this);
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
lastRoute: null,
|
|
29
|
+
|
|
30
|
+
onBeforeRouteEnterFn: null,
|
|
31
|
+
|
|
32
|
+
onBeforeRouteEnter() {
|
|
33
|
+
if (typeof this.onBeforeRouteEnterFn === 'function') {
|
|
34
|
+
return this.onBeforeRouteEnterFn();
|
|
35
|
+
}
|
|
36
|
+
return true;
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
onBeforeRouteEnterFailedFn: null,
|
|
40
|
+
|
|
41
|
+
onBeforeRouteEnterFailed() {
|
|
42
|
+
if (typeof this.onBeforeRouteEnterFailedFn === 'function') {
|
|
43
|
+
return this.onBeforeRouteEnterFailedFn();
|
|
44
|
+
}
|
|
45
|
+
return true;
|
|
20
46
|
},
|
|
21
|
-
|
|
22
|
-
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
getLastRoute() {
|
|
50
|
+
return this.lastRoute;
|
|
23
51
|
},
|
|
52
|
+
|
|
24
53
|
onRouteEnter(route) {
|
|
54
|
+
this.lastRoute = route;
|
|
55
|
+
if (!this.onBeforeRouteEnter()) {
|
|
56
|
+
this.onBeforeRouteEnterFailed();
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
25
59
|
const app = Ext.getApplication();
|
|
26
60
|
if (!app.initialRoute) {
|
|
27
61
|
app.initialRoute = route;
|
|
@@ -41,4 +75,5 @@ Ext.define('Coon.app.Router', {
|
|
|
41
75
|
const routerView = this.getRouterView();
|
|
42
76
|
return routerView && routerView.getLayout().getActiveItem();
|
|
43
77
|
},
|
|
78
|
+
|
|
44
79
|
});
|
package/src/app/viewPort/Main.js
CHANGED
|
@@ -18,7 +18,7 @@ Ext.define('Coon.app.viewPort.Main', {
|
|
|
18
18
|
},
|
|
19
19
|
items: [
|
|
20
20
|
{
|
|
21
|
-
xtype: '
|
|
21
|
+
xtype: 'panel',
|
|
22
22
|
height: 48,
|
|
23
23
|
},
|
|
24
24
|
{
|
|
@@ -28,7 +28,7 @@ Ext.define('Coon.app.viewPort.Main', {
|
|
|
28
28
|
dockedItems: [
|
|
29
29
|
{
|
|
30
30
|
dock: 'bottom',
|
|
31
|
-
xtype: '
|
|
31
|
+
xtype: 'panel',
|
|
32
32
|
}
|
|
33
33
|
],
|
|
34
34
|
}
|
|
@@ -52,13 +52,10 @@ Ext.define('Coon.app.viewPort.Main', {
|
|
|
52
52
|
{
|
|
53
53
|
xtype: 'AppNavigationBar',
|
|
54
54
|
flex: 1,
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
xtype: 'CoonAppHeaderUserBlock',
|
|
58
55
|
}
|
|
59
56
|
],
|
|
60
57
|
},
|
|
61
|
-
{xtype: '
|
|
58
|
+
{xtype: 'panel', reference: 'footerview', region: 'south', docked: 'bottom', weight: -2},
|
|
62
59
|
{xtype: 'centerview', reference: 'centerview', region: 'center', weight: -1},
|
|
63
60
|
{
|
|
64
61
|
xtype: 'panel',
|
|
@@ -24,6 +24,9 @@ Ext.define('Coon.common.plugin.form.RequiredFlagPlugin', {
|
|
|
24
24
|
},
|
|
25
25
|
|
|
26
26
|
init: function(field) {
|
|
27
|
+
if (typeof field.getValue !== 'function' || typeof field.isValid !== 'function') {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
27
30
|
this.field = field;
|
|
28
31
|
this.field.setEnableHighlightingRequiredFields = this.setEnableHighlightingRequiredFields.bind(this);
|
|
29
32
|
this.field.getEnableHighlightingRequiredFields = this.getEnableHighlightingRequiredFields.bind(this);
|
|
@@ -10,6 +10,7 @@ Ext.define('Coon.nav.AppNavigationMenuController', {
|
|
|
10
10
|
selectThenMenuReady: undefined,
|
|
11
11
|
addWorkspaceToUrl: false,
|
|
12
12
|
menuUpdate: false,
|
|
13
|
+
lastRoute: false,
|
|
13
14
|
init: function(view) {
|
|
14
15
|
view.updateSelection = this.updateSelection.bind(this);
|
|
15
16
|
view.getMenuReady = this.getMenuReady.bind(this);
|
|
@@ -17,7 +18,8 @@ Ext.define('Coon.nav.AppNavigationMenuController', {
|
|
|
17
18
|
view.changeMicro = this.changeMicro.bind(this);
|
|
18
19
|
view.changeWorkspace = this.changeWorkspace.bind(this);
|
|
19
20
|
this.view.on('selectionchange', this.onSelectMenuItem, this);
|
|
20
|
-
this.
|
|
21
|
+
this.lastRoute = Ext.getApplication().appRouter.lastRoute || false;
|
|
22
|
+
this.loadMenu(false, !!this.lastRoute);
|
|
21
23
|
Ext.on('route:initial', (route) => {
|
|
22
24
|
this.selectThenMenuReady = route.id;
|
|
23
25
|
});
|
|
@@ -178,7 +180,7 @@ Ext.define('Coon.nav.AppNavigationMenuController', {
|
|
|
178
180
|
|
|
179
181
|
return node;
|
|
180
182
|
},
|
|
181
|
-
loadMenu(uiElementCd) {
|
|
183
|
+
loadMenu(uiElementCd, lastRoute) {
|
|
182
184
|
Coon.nav.MenuEntity.get().then((menu) => {
|
|
183
185
|
if (Array.isArray(menu)) {
|
|
184
186
|
const dataList = this.prepareMenuData(menu);
|
|
@@ -236,7 +238,11 @@ Ext.define('Coon.nav.AppNavigationMenuController', {
|
|
|
236
238
|
this.changeWorkspace(this.getViewModel().get('workspace'), false);
|
|
237
239
|
this.selectMenuItem(uiElementCd, true);
|
|
238
240
|
} else {
|
|
239
|
-
|
|
241
|
+
if (!lastRoute) {
|
|
242
|
+
this.onMenuReady();
|
|
243
|
+
} else {
|
|
244
|
+
Ext.fireEvent('router:goToLastRoute');
|
|
245
|
+
}
|
|
240
246
|
}
|
|
241
247
|
}
|
|
242
248
|
});
|
|
@@ -8,12 +8,7 @@ Ext.define('Coon.report.component.settings.AddVersioningTab', {
|
|
|
8
8
|
},
|
|
9
9
|
|
|
10
10
|
initAction: function() {
|
|
11
|
-
|
|
12
|
-
this.getView().add({xtype: 'ReportFormHistoryPanel'});
|
|
13
|
-
}
|
|
11
|
+
this.getView().add({xtype: 'ReportFormHistoryPanel'});
|
|
14
12
|
},
|
|
15
13
|
|
|
16
|
-
isEnabled: function() {
|
|
17
|
-
return Coon.setup.getOption('reportVersioning');
|
|
18
|
-
},
|
|
19
14
|
});
|
|
@@ -8,19 +8,13 @@ Ext.define('Coon.uielement.component.settings.AddVersioningTab', {
|
|
|
8
8
|
},
|
|
9
9
|
|
|
10
10
|
initAction: function() {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
isEnabled: function() {
|
|
23
|
-
return Coon.setup.getOption('customPanelVersioning');
|
|
11
|
+
this.getView().down('tabpanel').add({
|
|
12
|
+
xtype: 'UiCPVersionPanel',
|
|
13
|
+
title: 'версии',
|
|
14
|
+
bind: {
|
|
15
|
+
uiElement: '{uiElement}',
|
|
16
|
+
},
|
|
17
|
+
});
|
|
24
18
|
},
|
|
25
19
|
|
|
26
20
|
});
|
package/src/version.js
CHANGED