Showing
2 changed files
with
16 additions
and
96 deletions
... | @@ -9,12 +9,12 @@ import { | ... | @@ -9,12 +9,12 @@ import { |
9 | FormGroup, | 9 | FormGroup, |
10 | Label, | 10 | Label, |
11 | } from 'reactstrap'; | 11 | } from 'reactstrap'; |
12 | -import s from './Subject.module.scss'; | ||
13 | 12 | ||
14 | class Subject extends PureComponent { | 13 | class Subject extends PureComponent { |
15 | constructor(props) { | 14 | constructor(props) { |
16 | super(props); | 15 | super(props); |
17 | this.onChangeInputImage = this.onChangeInputImage.bind(this); | 16 | this.onChangeInputImage = this.onChangeInputImage.bind(this); |
17 | + this.onClickSaveImage = this.onClickSaveImage.bind(this); | ||
18 | this.state = { | 18 | this.state = { |
19 | defaultSelectVal: 'Andromeda', | 19 | defaultSelectVal: 'Andromeda', |
20 | imageFiles: [], | 20 | imageFiles: [], |
... | @@ -35,32 +35,30 @@ class Subject extends PureComponent { | ... | @@ -35,32 +35,30 @@ class Subject extends PureComponent { |
35 | reader.readAsDataURL(e.target.files[0]); | 35 | reader.readAsDataURL(e.target.files[0]); |
36 | } | 36 | } |
37 | 37 | ||
38 | - async componentDidUpdate() { | 38 | + onClickSaveImage(e) { |
39 | - const isReceivingData = true; | 39 | + e.preventDefault(); |
40 | + console.log(this.state.imageFiles); | ||
41 | + console.log("save image"); | ||
42 | + this.setState({ | ||
43 | + imageFiles:[], | ||
44 | + }); | ||
40 | } | 45 | } |
41 | 46 | ||
42 | render() { | 47 | render() { |
43 | - const isReceivingData = true; | ||
44 | - const display = isReceivingData ? 'none' : 'block'; | ||
45 | - const style = { | ||
46 | - height: '1200px', | ||
47 | - display: display | ||
48 | - }; | ||
49 | - console.log(this.state.imageFiles) | ||
50 | return ( | 48 | return ( |
51 | - <div className={s.root}> | 49 | + <div> |
52 | <h1 className="page-title mb-xlg mt-lg">Photo <small>Upload</small></h1> | 50 | <h1 className="page-title mb-xlg mt-lg">Photo <small>Upload</small></h1> |
53 | <Row> | 51 | <Row> |
54 | <Col lg="6" md={12}> | 52 | <Col lg="6" md={12}> |
55 | <Widget | 53 | <Widget |
56 | > | 54 | > |
57 | <Form> | 55 | <Form> |
58 | - <blockquote className="blockquote blockquote-reverse"> | 56 | + <blockquote className="blockquote blockquote"> |
59 | <p>침입자로 분류하지 않을 방문자의 사진을 업로드 하세요.</p> | 57 | <p>침입자로 분류하지 않을 방문자의 사진을 업로드 하세요.</p> |
60 | </blockquote> | 58 | </blockquote> |
61 | 59 | ||
62 | <FormGroup row> | 60 | <FormGroup row> |
63 | - <Label md="2" className="text-md-right"> | 61 | + <Label md="3" className="text-md-right"> |
64 | Image upload | 62 | Image upload |
65 | </Label> | 63 | </Label> |
66 | <Col md="8"> | 64 | <Col md="8"> |
... | @@ -81,12 +79,8 @@ class Subject extends PureComponent { | ... | @@ -81,12 +79,8 @@ class Subject extends PureComponent { |
81 | </div> | 79 | </div> |
82 | </div> | 80 | </div> |
83 | <div> | 81 | <div> |
84 | - <Button type="button" color="default"><Label>Select image</Label></Button> | 82 | + <Button type="button" color="default" onClick={this.onClickSaveImage}>Select image</Button> |
85 | </div> | 83 | </div> |
86 | - {/* <div> | ||
87 | - <Button type="button" color="default"><Label for="fileupload2">Select | ||
88 | - image</Label></Button> | ||
89 | - </div> */} | ||
90 | </Col> | 84 | </Col> |
91 | </FormGroup> | 85 | </FormGroup> |
92 | </Form> | 86 | </Form> | ... | ... |
1 | @import '../../styles/app'; | 1 | @import '../../styles/app'; |
2 | 2 | ||
3 | -:global { | 3 | +// .autogrow { |
4 | -// @import '../../../../node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg'; | 4 | +// overflow: hidden; |
5 | -// @import '../../../../node_modules/react-select2-wrapper/css/select2'; | 5 | +// resize: none; |
6 | -// @import '../../../../node_modules/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox'; | 6 | +// } |
7 | -// @import '../../../../node_modules/react-datetime/css/react-datetime'; | ||
8 | -// @import '../../../../node_modules/rc-color-picker/dist/rc-color-picker'; | ||
9 | -// @import '../../../../node_modules/bootstrap-slider/dist/css/bootstrap-slider'; | ||
10 | -// @import '../../../../node_modules/jasny-bootstrap/dist/css/jasny-bootstrap'; | ||
11 | -// @import '../../../../node_modules/react-mde/lib/styles/scss/react-mde-all'; | ||
12 | -} | ||
13 | - | ||
14 | -.autogrow { | ||
15 | - overflow: hidden; | ||
16 | - resize: none; | ||
17 | -} | ||
18 | - | ||
19 | -.wysiwygWrapper { | ||
20 | - border: 1px solid #ccc !important; | ||
21 | - overflow: visible; | ||
22 | - height: 270px; | ||
23 | -} | ||
24 | - | ||
25 | -.wysiwygToolbar { | ||
26 | - color: $gray-800 !important; | ||
27 | - background-color: #ddd !important; | ||
28 | - border-color: transparent !important; | ||
29 | - | ||
30 | - :global { | ||
31 | - .rdw-option-wrapper { | ||
32 | - font-family: 'Open Sans', sans-serif; | ||
33 | - font-size: 14px; | ||
34 | - height: 30px; | ||
35 | - min-width: 30px; | ||
36 | - margin: 0; | ||
37 | - background: #f8f8f8; | ||
38 | - } | ||
39 | - | ||
40 | - .rdw-dropdown-wrapper { | ||
41 | - background: #f8f8f8; | ||
42 | - } | ||
43 | - } | ||
44 | -} | ||
45 | - | ||
46 | -.wysiwygEditor { | ||
47 | - position: relative !important; | ||
48 | - overflow: hidden !important; | ||
49 | - height: 150px; | ||
50 | - line-height: 0.1; | ||
51 | -} | ||
52 | - | ||
53 | -.select2 { | ||
54 | - :global { | ||
55 | - .select2-container { | ||
56 | - width: 100% !important; | ||
57 | - } | ||
58 | - | ||
59 | - .select2-selection--single { | ||
60 | - border-color: $input-border-color; | ||
61 | - | ||
62 | - &, | ||
63 | - & :global .select2-selection__arrow { | ||
64 | - height: $input-height; | ||
65 | - } | ||
66 | - | ||
67 | - & :global .select2-selection__rendered { | ||
68 | - line-height: $input-height; | ||
69 | - } | ||
70 | - } | ||
71 | - } | ||
72 | -} | ||
73 | 7 | ||
74 | .root { | 8 | .root { |
75 | :global { | 9 | :global { |
... | @@ -77,14 +11,6 @@ | ... | @@ -77,14 +11,6 @@ |
77 | * Switchery. | 11 | * Switchery. |
78 | */ | 12 | */ |
79 | 13 | ||
80 | - .abc-checkbox, | ||
81 | - .abc-radio { | ||
82 | - .form-check-input { | ||
83 | - position: relative; | ||
84 | - margin: 0; | ||
85 | - } | ||
86 | - } | ||
87 | - | ||
88 | .display-inline-block { | 14 | .display-inline-block { |
89 | display: inline-block; | 15 | display: inline-block; |
90 | } | 16 | } | ... | ... |
-
Please register or login to post a comment