Browse Source

added comment for custom event

Skylsmoi 6 years ago
parent
commit
2dc1d72dce
2 changed files with 3 additions and 3 deletions
  1. 1 1
      src/container/HtmlDocument.jsx
  2. 2 2
      src/container/PopupCreateHtmlDocument.jsx

+ 1 - 1
src/container/HtmlDocument.jsx View File

122
 
122
 
123
   handleClickBtnCloseApp = () => {
123
   handleClickBtnCloseApp = () => {
124
     this.setState({ isVisible: false })
124
     this.setState({ isVisible: false })
125
-    GLOBAL_dispatchEvent({type: 'appClosed', data: {}})
125
+    GLOBAL_dispatchEvent({type: 'appClosed', data: {}}) // handled by tracim_front::src/container/WorkspaceContent.jsx
126
   }
126
   }
127
 
127
 
128
   handleSaveEditTitle = async newTitle => {
128
   handleSaveEditTitle = async newTitle => {

+ 2 - 2
src/container/PopupCreateHtmlDocument.jsx View File

49
   handleChangeNewContentName = e => this.setState({newContentName: e.target.value})
49
   handleChangeNewContentName = e => this.setState({newContentName: e.target.value})
50
 
50
 
51
   handleClose = () => GLOBAL_dispatchEvent({
51
   handleClose = () => GLOBAL_dispatchEvent({
52
-    type: 'hide_popupCreateContent',
52
+    type: 'hide_popupCreateContent', // handled by tracim_front:dist/index.html
53
     data: {
53
     data: {
54
       name: this.state.appName
54
       name: this.state.appName
55
     }
55
     }
74
       this.handleClose()
74
       this.handleClose()
75
 
75
 
76
       GLOBAL_dispatchEvent({
76
       GLOBAL_dispatchEvent({
77
-        type: 'openContentUrl',
77
+        type: 'openContentUrl', // handled by tracim_front:src/container/WorkspaceContent.jsx
78
         data: {
78
         data: {
79
           idWorkspace: jsonSaveNewHtmlDoc.workspace_id,
79
           idWorkspace: jsonSaveNewHtmlDoc.workspace_id,
80
           contentType: this.state.appName,
80
           contentType: this.state.appName,