|
@@ -12,7 +12,7 @@ class pageHtml extends React.Component {
|
12
|
12
|
constructor (props) {
|
13
|
13
|
super(props)
|
14
|
14
|
this.state = {
|
15
|
|
- pluginName: 'PageHtml',
|
|
15
|
+ appName: 'PageHtml',
|
16
|
16
|
data: props.data
|
17
|
17
|
? props.data
|
18
|
18
|
: { // for debugg purpose
|
|
@@ -20,7 +20,7 @@ class pageHtml extends React.Component {
|
20
|
20
|
version: '3',
|
21
|
21
|
text: 'Bonjour ?'
|
22
|
22
|
},
|
23
|
|
- pluginData: {
|
|
23
|
+ appData: {
|
24
|
24
|
name: 'PageHtml',
|
25
|
25
|
componentLeft: 'PageHtml',
|
26
|
26
|
componentRight: 'Timeline',
|
|
@@ -30,7 +30,7 @@ class pageHtml extends React.Component {
|
30
|
30
|
}
|
31
|
31
|
}
|
32
|
32
|
|
33
|
|
- document.addEventListener('pluginCustomEvent', this.customEventReducer, false)
|
|
33
|
+ document.addEventListener('appCustomEvent', this.customEventReducer, false)
|
34
|
34
|
}
|
35
|
35
|
|
36
|
36
|
customEventReducer = ({detail}) => {
|
|
@@ -41,25 +41,25 @@ class pageHtml extends React.Component {
|
41
|
41
|
}
|
42
|
42
|
}
|
43
|
43
|
|
44
|
|
- handleClickBtnClosePlugin = () => {
|
45
|
|
- GLOBAL_unmountPlugin(this.state.pluginName)
|
|
44
|
+ handleClickBtnCloseApp = () => {
|
|
45
|
+ GLOBAL_unmountApp(this.state.appName)
|
46
|
46
|
}
|
47
|
47
|
|
48
|
48
|
render () {
|
49
|
|
- const { file, pluginData } = this.state.data
|
|
49
|
+ const { file, appData } = this.state.data
|
50
|
50
|
|
51
|
51
|
return (
|
52
|
|
- <PopinFixed customClass={`${pluginData.customClass}`}>
|
|
52
|
+ <PopinFixed customClass={`${appData.customClass}`}>
|
53
|
53
|
<PopinFixedHeader
|
54
|
|
- customClass={`${pluginData.customClass}`}
|
55
|
|
- icon={pluginData.icon}
|
|
54
|
+ customClass={`${appData.customClass}`}
|
|
55
|
+ icon={appData.icon}
|
56
|
56
|
name={file.title}
|
57
|
|
- onClickCloseBtn={this.handleClickBtnClosePlugin}
|
|
57
|
+ onClickCloseBtn={this.handleClickBtnCloseApp}
|
58
|
58
|
/>
|
59
|
59
|
|
60
|
|
- <PopinFixedOption customClass={`${pluginData.customClass}`} />
|
|
60
|
+ <PopinFixedOption customClass={`${appData.customClass}`} />
|
61
|
61
|
|
62
|
|
- <PopinFixedContent customClass={`${pluginData.customClass}__contentpage`}>
|
|
62
|
+ <PopinFixedContent customClass={`${appData.customClass}__contentpage`}>
|
63
|
63
|
<PageHtmlComponent
|
64
|
64
|
version={file.version}
|
65
|
65
|
text={file.text}
|
|
@@ -67,7 +67,7 @@ class pageHtml extends React.Component {
|
67
|
67
|
/>
|
68
|
68
|
|
69
|
69
|
<Timeline
|
70
|
|
- customClass={`${pluginData.customClass}__contentpage`}
|
|
70
|
+ customClass={`${appData.customClass}__contentpage`}
|
71
|
71
|
key={'pageHtml__timeline'}
|
72
|
72
|
/>
|
73
|
73
|
</PopinFixedContent>
|