Przeglądaj źródła

Merge branch 'master' of github.com:tracim/tracim_front

AlexiCauvin 7 lat temu
rodzic
commit
85d154d309

+ 2 - 2
dist/index.html Wyświetl plik

44
       */
44
       */
45
       GLOBAL_renderApp = app => {
45
       GLOBAL_renderApp = app => {
46
         const selectedApp = (() => {
46
         const selectedApp = (() => {
47
-          switch (app.appConfig.name) {
47
+          switch (app.config.name) {
48
             case 'PageHtml':
48
             case 'PageHtml':
49
               return appPageHtml
49
               return appPageHtml
50
             case 'Thread':
50
             case 'Thread':
55
         if (selectedApp.isRendered) {
55
         if (selectedApp.isRendered) {
56
           GLOBAL_dispatchEvent(`${app.appConfig.name}_showApp`, app)
56
           GLOBAL_dispatchEvent(`${app.appConfig.name}_showApp`, app)
57
         } else {
57
         } else {
58
-          selectedApp.renderApp('appContainer', app)
58
+          selectedApp.renderApp(app)
59
           selectedApp.isRendered = true
59
           selectedApp.isRendered = true
60
           prevSelectedApp.isRendered = false
60
           prevSelectedApp.isRendered = false
61
           prevSelectedApp = selectedApp
61
           prevSelectedApp = selectedApp

+ 18 - 7
jsonserver/static_db.json Wyświetl plik

35
     "componentRight": "Timeline",
35
     "componentRight": "Timeline",
36
     "customClass": "wsContentPageHtml",
36
     "customClass": "wsContentPageHtml",
37
     "icon": "fa fa-fw fa-file-word-o",
37
     "icon": "fa fa-fw fa-file-word-o",
38
-    "color": "#65c7f2"
38
+    "color": "#65c7f2",
39
+    "domContainer": "appContainer"
39
   }, {
40
   }, {
40
     "name": "PageMarkdown",
41
     "name": "PageMarkdown",
41
     "label": {
42
     "label": {
46
     "componentRight": "undefined",
47
     "componentRight": "undefined",
47
     "customClass": "wsContentPageMarkdown",
48
     "customClass": "wsContentPageMarkdown",
48
     "icon": "fa fa-fw fa-file-code-o",
49
     "icon": "fa fa-fw fa-file-code-o",
49
-    "color": "#e0082b"
50
+    "color": "#e0082b",
51
+    "domContainer": "appContainer"
50
   }, {
52
   }, {
51
     "name": "File",
53
     "name": "File",
52
     "label": {
54
     "label": {
57
     "componentRight": "undefined",
59
     "componentRight": "undefined",
58
     "customClass": "wsContentFile",
60
     "customClass": "wsContentFile",
59
     "icon": "fa fa-fw fa-file-text-o",
61
     "icon": "fa fa-fw fa-file-text-o",
60
-    "color": "#263462"
62
+    "color": "#263462",
63
+    "domContainer": "appContainer"
61
   }, {
64
   }, {
62
     "name": "Thread",
65
     "name": "Thread",
63
     "label": {
66
     "label": {
68
     "componentRight": "undefined",
71
     "componentRight": "undefined",
69
     "customClass": "wsContentThread",
72
     "customClass": "wsContentThread",
70
     "icon": "fa fa-fw fa-comments-o",
73
     "icon": "fa fa-fw fa-comments-o",
71
-    "color": "#2674d3"
74
+    "color": "#2674d3",
75
+    "domContainer": "appContainer"
72
   }, {
76
   }, {
73
     "name": "Task",
77
     "name": "Task",
74
     "label": {
78
     "label": {
79
     "componentRight": "undefined",
83
     "componentRight": "undefined",
80
     "customClass": "wsContentTask",
84
     "customClass": "wsContentTask",
81
     "icon": "fa fa-fw fa-list-ul",
85
     "icon": "fa fa-fw fa-list-ul",
82
-    "color": "#2d5a88"
86
+    "color": "#2d5a88",
87
+    "domContainer": "appContainer"
83
   }, {
88
   }, {
84
     "name": "Issue",
89
     "name": "Issue",
85
     "label": {
90
     "label": {
90
     "componentRight": "undefined",
95
     "componentRight": "undefined",
91
     "customClass": "wsContentIssue",
96
     "customClass": "wsContentIssue",
92
     "icon": "fa fa-fw fa-ticket",
97
     "icon": "fa fa-fw fa-ticket",
93
-    "color": "#a4835e"
98
+    "color": "#a4835e",
99
+    "domContainer": "appContainer"
94
   }],
100
   }],
95
   "workspace_detail": {
101
   "workspace_detail": {
96
     "id": 1,
102
     "id": 1,
257
     "title": "La programmation fonctionnelle",
263
     "title": "La programmation fonctionnelle",
258
     "status": "validated",
264
     "status": "validated",
259
     "version": "3",
265
     "version": "3",
260
-    "text": "<h1>Mon titre nul</h1>Je suis le contenu de cette fameuse <b>page HTML</b><br /> sur la programmation fonctionnelle"
266
+    "text": "<h1>Mon titre nul</h1>Je suis le contenu de cette fameuse <b>page HTML</b><br /> sur la programmation fonctionnelle",
267
+    "workspace": {
268
+      "id": 1,
269
+      "title": "Mission interne - développement",
270
+      "owner_id": 5
271
+    }
261
   },
272
   },
262
   "content_data_thread": {
273
   "content_data_thread": {
263
     "id": 2,
274
     "id": 2,

+ 3 - 7
src/appFactory.js Wyświetl plik

3
 
3
 
4
 export function appFactory (WrappedComponent) {
4
 export function appFactory (WrappedComponent) {
5
   return class AppFactory extends React.Component {
5
   return class AppFactory extends React.Component {
6
-    renderApp = (user, workspace, app, content) => GLOBAL_renderApp({
6
+    renderApp = (appConfig, user, content) => GLOBAL_renderApp({
7
       loggedUser: user.isLoggedIn ? user : {},
7
       loggedUser: user.isLoggedIn ? user : {},
8
-      workspace: {
9
-        id: workspace.id,
10
-        title: workspace.title
11
-      },
12
-      appConfig: {
13
-        ...app[content.type],
8
+      config: {
9
+        ...appConfig,
14
         apiUrl: FETCH_CONFIG.apiUrl
10
         apiUrl: FETCH_CONFIG.apiUrl
15
       },
11
       },
16
       content
12
       content

+ 2 - 5
src/component/Account/PersonalData.jsx Wyświetl plik

13
 
13
 
14
       <div className='personaldata__form'>
14
       <div className='personaldata__form'>
15
         <div className='personaldata__form__title'>
15
         <div className='personaldata__form__title'>
16
-          Changer le mot de passe :
16
+          Mot de passe :
17
         </div>
17
         </div>
18
         <input className='personaldata__form__txtinput form-control' type='password' placeholder='Ancien mot de passe' />
18
         <input className='personaldata__form__txtinput form-control' type='password' placeholder='Ancien mot de passe' />
19
         <input className='personaldata__form__txtinput form-control' type='password' placeholder='Nouveau mot de passe' />
19
         <input className='personaldata__form__txtinput form-control' type='password' placeholder='Nouveau mot de passe' />
20
-        <div className='personaldata__form__button btn btn-primary'>
21
-          Envoyer
22
-        </div>
23
       </div>
20
       </div>
24
 
21
 
25
       <div className='personaldata__form'>
22
       <div className='personaldata__form'>
26
         <div className='personaldata__form__title'>
23
         <div className='personaldata__form__title'>
27
-          Changer d'adresse mail :
24
+          Adresse mail :
28
         </div>
25
         </div>
29
         <input className='personaldata__form__txtinput form-control' type='email' placeholder='Ancienne adresse mail' />
26
         <input className='personaldata__form__txtinput form-control' type='email' placeholder='Ancienne adresse mail' />
30
         <input className='personaldata__form__txtinput form-control' type='email' placeholder='Nouvelle adresse mail' />
27
         <input className='personaldata__form__txtinput form-control' type='email' placeholder='Nouvelle adresse mail' />

+ 0 - 2
src/component/Workspace/Folder.jsx Wyświetl plik

4
 import classnames from 'classnames'
4
 import classnames from 'classnames'
5
 import FileItem from './FileItem.jsx'
5
 import FileItem from './FileItem.jsx'
6
 
6
 
7
-// @TODO set Folder as a component, state open will come from parent container (which will come from redux) // update: or not ?
8
-
9
 class Folder extends React.Component {
7
 class Folder extends React.Component {
10
   constructor (props) {
8
   constructor (props) {
11
     super(props)
9
     super(props)

+ 1 - 1
src/container/WorkspaceContent.jsx Wyświetl plik

38
   }
38
   }
39
 
39
 
40
   handleClickContentItem = content => {
40
   handleClickContentItem = content => {
41
-    this.props.renderApp(this.props.user, this.props.workspace, this.props.app, content)
41
+    this.props.renderApp(this.props.app[content.type], this.props.user, {...content, workspace: this.props.workspace})
42
     // Côme - 2018/03/08 - line bellow is useless because we cannot call the reducer again when hiding app since the call comes from the app
42
     // Côme - 2018/03/08 - line bellow is useless because we cannot call the reducer again when hiding app since the call comes from the app
43
     // dispatch(setActiveFileContentActive(content))
43
     // dispatch(setActiveFileContentActive(content))
44
   }
44
   }

+ 3 - 3
src/css/Sidebar.styl Wyświetl plik

38
       border-bottom-right-radius 0
38
       border-bottom-right-radius 0
39
   &__expand
39
   &__expand
40
     position absolute
40
     position absolute
41
-    top -1px
42
-    right -39px
41
+    top 1px
42
+    right -44px
43
     padding 5px 8px
43
     padding 5px 8px
44
-    border 1px solid white
44
+    border 3px solid transparent
45
     border-bottom-right-radius 15px
45
     border-bottom-right-radius 15px
46
     cursor pointer
46
     cursor pointer
47
     background-color blue
47
     background-color blue

+ 0 - 2
src/css/index.styl Wyświetl plik

18
 @import 'FileItemHeader.styl'
18
 @import 'FileItemHeader.styl'
19
 @import 'Folder.styl'
19
 @import 'Folder.styl'
20
 
20
 
21
-// @import 'Timeline.styl'
22
 @import 'File.styl'
21
 @import 'File.styl'
23
 
22
 
24
 @import 'Dashboard.styl'
23
 @import 'Dashboard.styl'
25
 @import 'AccountPage.styl'
24
 @import 'AccountPage.styl'
26
-@import 'btnSwtich.styl'
27
 
25
 
28
 @import 'UploadPopup'
26
 @import 'UploadPopup'
29
 @import 'ProgressBar'
27
 @import 'ProgressBar'