|
@@ -15,33 +15,36 @@
|
15
|
15
|
}
|
16
|
16
|
|
17
|
17
|
//@TODO make a file action.tracimCustomEvent.js that will contains all customEvent that tracim_frontend call
|
|
18
|
+ // => pb with that is that appInterface cant use import since it is not part of the build webpack
|
|
19
|
+ // use module.export and require
|
|
20
|
+ // doesn't work, cant resolve a file outside of the build dir
|
18
|
21
|
|
19
|
|
- GLOBAL_renderApp = app => { //@TODO renderAppFull
|
20
|
|
- console.log('%cGLOBAL_renderApp', 'color: #5cebeb', app)
|
|
22
|
+ GLOBAL_renderAppFull = app => {
|
|
23
|
+ console.log('%cGLOBAL_renderAppFull', 'color: #5cebeb', app)
|
21
|
24
|
|
22
|
25
|
const selectedApp = getSelectedApp(app.config.slug)
|
23
|
26
|
|
24
|
27
|
if (selectedApp.isRendered) {
|
25
|
28
|
GLOBAL_dispatchEvent({type: `${app.config.slug}_showApp`, data: app}) // handled by html-documents:src/container/HtmlDocument.jsx
|
26
|
29
|
} else {
|
27
|
|
- selectedApp.renderApp(app)
|
|
30
|
+ selectedApp.renderAppFull(app)
|
28
|
31
|
selectedApp.isRendered = true
|
29
|
32
|
prevSelectedApp.isRendered = false
|
30
|
33
|
prevSelectedApp = selectedApp
|
31
|
34
|
}
|
32
|
35
|
}
|
33
|
36
|
|
34
|
|
- GLOBAL_renderCreateContentApp = app => { //@TODO renderAppPopupCreation
|
35
|
|
- console.log('%cGLOBAL_renderCreateContentApp', 'color: #5cebeb', app)
|
|
37
|
+ GLOBAL_renderAppPopupCreation = app => {
|
|
38
|
+ console.log('%cGLOBAL_renderAppPopupCreation', 'color: #5cebeb', app)
|
36
|
39
|
|
37
|
40
|
const selectedApp = getSelectedApp(app.config.slug)
|
38
|
41
|
|
39
|
42
|
if (!selectedApp) {
|
40
|
|
- console.log('Error in GLOBAL_renderCreateContentApp, selectedApp is undefined', app)
|
|
43
|
+ console.log('Error in GLOBAL_renderAppPopupCreation, selectedApp is undefined', app)
|
41
|
44
|
return
|
42
|
45
|
}
|
43
|
46
|
|
44
|
|
- getSelectedApp(app.config.slug).renderPopupCreation(app)
|
|
47
|
+ getSelectedApp(app.config.slug).renderAppPopupCreation(app)
|
45
|
48
|
}
|
46
|
49
|
|
47
|
50
|
GLOBAL_dispatchEvent = ({type, data}) => {
|