Browse Source

removed code moved to tracim_lib

Skylsmoi 7 years ago
parent
commit
b598eafa89

+ 0 - 20
src/component/common/Input/BtnSwitch.jsx View File

@@ -1,20 +0,0 @@
1
-import React, { Component } from 'react'
2
-
3
-// Côme - 2018/03/01 - DEPRECATED - this component has been added to tracim_lib
4
-class BtnSwitch extends Component {
5
-  render () {
6
-    return (
7
-      <div className='btnswitch'>
8
-        <label className='switch nomarginlabel'>
9
-          <input type='checkbox' />
10
-          <span className='slider round' />
11
-        </label>
12
-        <div className='btnswitch__text'>
13
-          On
14
-        </div>
15
-      </div>
16
-    )
17
-  }
18
-}
19
-
20
-export default BtnSwitch

+ 0 - 42
src/component/common/PopinFixed/PopinFixed.jsx View File

@@ -1,42 +0,0 @@
1
-import React from 'react'
2
-import classnames from 'classnames'
3
-import PropTypes from 'prop-types'
4
-import PopinFixedHeader from './PopinFixedHeader.jsx'
5
-import PopinFixedOption from './PopinFixedOption.jsx'
6
-import PopinFixedContent from './PopinFixedContent.jsx'
7
-
8
-const PopinFixed = props => {
9
-  return (
10
-    <div className={classnames('wsFileGeneric', props.customClass, {'visible': props.visible})}>
11
-      {props.children}
12
-    </div>
13
-  )
14
-}
15
-
16
-export default PopinFixed
17
-
18
-PopinFixed.propTypes = {
19
-  customClass: PropTypes.string,
20
-  visible: PropTypes.bool
21
-}
22
-
23
-PopinFixed.propTypes = {
24
-  // from http://www.mattzabriskie.com/blog/react-validating-children
25
-  children: PropTypes.arrayOf((children, key, componentName /* , location, propFullName */) => {
26
-    if (
27
-      children.length > 3 ||
28
-      children[0].type !== PopinFixedHeader ||
29
-      children[1].type !== PopinFixedOption ||
30
-      children[2].type !== PopinFixedContent
31
-    ) {
32
-      return new Error(`PropType Error: childrens of ${componentName} must be: 1 PopinFixedHeader, 1 PopinFixedOption and 1 PopinFixedContent.`)
33
-    }
34
-  }).isRequired,
35
-  customClass: PropTypes.string,
36
-  visible: PropTypes.bool
37
-}
38
-
39
-PopinFixed.defaultProps = {
40
-  customClass: '',
41
-  visible: true
42
-}

+ 0 - 32
src/component/common/PopinFixed/PopinFixedContent.jsx View File

@@ -1,32 +0,0 @@
1
-import React from 'react'
2
-import classnames from 'classnames'
3
-import PropTypes from 'prop-types'
4
-
5
-const PopinFixedContent = props => {
6
-  return props.children.length === 2
7
-    ? (
8
-      <div className={classnames('wsFileGeneric__content', `${props.customClass}__content`)}>
9
-        <div className={classnames('wsFileGeneric__content__left', `${props.customClass}__content__left`)}>
10
-          {props.children[0]}
11
-        </div>
12
-
13
-        <div className={classnames('wsFileGeneric__content__right', `${props.customClass}__content__right`)}>
14
-          {props.children[1]}
15
-        </div>
16
-      </div>
17
-    )
18
-    : (
19
-      <div className={classnames('wsFileGeneric__content', `${props.customClass}__content`)}>
20
-        { props.children }
21
-      </div>
22
-    )
23
-}
24
-
25
-export default PopinFixedContent
26
-
27
-PopinFixedContent.propTypes = {
28
-  customClass: PropTypes.string,
29
-  children: PropTypes.arrayOf((children, key, componentName /* , location, propFullName */) =>
30
-    children.length !== 2 && new Error(`PropType Error: ${componentName} must have 2 children.`)
31
-  ).isRequired
32
-}

+ 0 - 46
src/component/common/PopinFixed/PopinFixedHeader.jsx View File

@@ -1,46 +0,0 @@
1
-import React from 'react'
2
-import classnames from 'classnames'
3
-import PropTypes from 'prop-types'
4
-
5
-const PopinFixedHeader = props => {
6
-  return (
7
-    <div className={classnames('wsFileGeneric__header', `${props.customClass}__header`)}>
8
-      <div className={classnames('wsFileGeneric__header__icon', `${props.customClass}__header__icon`)}>
9
-        <i className={props.icon} />
10
-      </div>
11
-
12
-      <div className={classnames('wsFileGeneric__header__title mr-auto', `${props.customClass}__header__title`)}>
13
-        {props.name}
14
-      </div>
15
-
16
-      <div className={classnames('editiontitle mr-auto', `${props.customClass}__header__editionmode`)}>
17
-        <input className='editiontitle__input form-control' placeholder='Titre du fichier' />
18
-      </div>
19
-
20
-      <div className={classnames('wsFileGeneric__header__edittitle', `${props.customClass}__header__changetitle`)}>
21
-        <i className='fa fa-pencil' />
22
-      </div>
23
-
24
-      <div
25
-        className={classnames('wsFileGeneric__header__close', `${props.customClass}__header__close`)}
26
-        onClick={props.onClickCloseBtn}
27
-      >
28
-        <i className='fa fa-times' />
29
-      </div>
30
-    </div>
31
-  )
32
-}
33
-
34
-export default PopinFixedHeader
35
-
36
-PopinFixedHeader.propTypes = {
37
-  icon: PropTypes.string.isRequired,
38
-  onClickCloseBtn: PropTypes.func.isRequired,
39
-  customClass: PropTypes.string,
40
-  name: PropTypes.string
41
-}
42
-
43
-PopinFixedHeader.defaultProps = {
44
-  customClass: '',
45
-  name: ''
46
-}

+ 0 - 67
src/component/common/PopinFixed/PopinFixedOption.jsx View File

@@ -1,67 +0,0 @@
1
-import React from 'react'
2
-// import classnames from 'classnames'
3
-// import PropTypes from 'prop-types'
4
-
5
-const PopinFixedOption = props => {
6
-  return (
7
-    <div className='wsFileGeneric__option'>
8
-      <div className='wsFileGeneric__option__menu'>
9
-
10
-        <div className='wsFileFile__option__menu__addversion btn mr-auto'>
11
-          Nouvelle version
12
-          <i className='fa fa-plus-circle' />
13
-        </div>
14
-
15
-        <div className='wsFileGeneric__option__menu__status dropdown'>
16
-          <button className='wsFileGeneric__option__menu__status__dropdownbtn check btn dropdown-toggle' type='button' id='dropdownMenu2' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>
17
-            Validé
18
-            <div className='wsFileGeneric__option__menu__status__dropdownbtn__icon'>
19
-              <i className='fa fa-check' />
20
-            </div>
21
-          </button>
22
-
23
-          <div className='wsFileGeneric__option__menu__status__submenu dropdown-menu' aria-labelledby='dropdownMenu2'>
24
-            <h6 className='dropdown-header'>Statut du fichier</h6>
25
-            <div className='dropdown-divider' />
26
-            <button className='wsFileGeneric__option__menu__status__submenu__item current  dropdown-item' type='button'>
27
-              En cours
28
-              <div className='wsFileGeneric__option__menu__status__submenu__item__icon'>
29
-                <i className='fa fa-gears' />
30
-              </div>
31
-            </button>
32
-            <button className='wsFileGeneric__option__menu__status__submenu__item check dropdown-item' type='button'>
33
-              Validé
34
-              <div className='wsFileGeneric__option__menu__status__submenu__item__icon'>
35
-                <i className='fa fa-check' />
36
-              </div>
37
-            </button>
38
-            <button className='wsFileGeneric__option__menu__status__submenu__item invalid dropdown-item' type='button'>
39
-              Invalidé
40
-              <div className='wsFileGeneric__option__menu__status__submenu__item__icon'>
41
-                <i className='fa fa-times' />
42
-              </div>
43
-            </button>
44
-            <button className='wsFileGeneric__option__menu__status__submenu__item ban dropdown-item' type='button'>
45
-              Obsolète
46
-              <div className='wsFileGeneric__option__menu__status__submenu__item__icon'>
47
-                <i className='fa fa-ban' />
48
-              </div>
49
-            </button>
50
-          </div>
51
-        </div>
52
-        <div className='wsFileGeneric__option__menu__action'>
53
-          <i className='fa fa-archive' />
54
-        </div>
55
-        <div className='wsFileGeneric__option__menu__action'>
56
-          <i className='fa fa-trash' />
57
-        </div>
58
-      </div>
59
-    </div>
60
-  )
61
-}
62
-
63
-export default PopinFixedOption
64
-
65
-PopinFixedOption.propTypes = {
66
-
67
-}