From de3a9fe001d34b09a8fce12d956bc816583b974a Mon Sep 17 00:00:00 2001 From: shanshuirenjia <978987373@qq.com> Date: Mon, 17 Dec 2018 11:54:25 +0800 Subject: [PATCH 1/2] adjust new dialog style --- .../components/dialog/create-file-dialog.js | 31 +++++++++---------- .../components/dialog/create-folder-dialog.js | 23 +++++++------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/frontend/src/components/dialog/create-file-dialog.js b/frontend/src/components/dialog/create-file-dialog.js index 0d7796fbd6..8df41dcedb 100644 --- a/frontend/src/components/dialog/create-file-dialog.js +++ b/frontend/src/components/dialog/create-file-dialog.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Button, Modal, ModalHeader, Input, ModalBody, ModalFooter, Form, FormGroup, Label, Col, FormText } from 'reactstrap'; +import { Button, Modal, ModalHeader, Input, ModalBody, ModalFooter, Form, FormGroup, Label } from 'reactstrap'; import { gettext } from '../../utils/constants'; const propTypes = { @@ -109,28 +109,27 @@ class CreateFile extends React.Component { {gettext('New File')}
- - - {this.state.parentPath} + + + {this.newInput = input;}} + id="fileName" + placeholder={gettext('new name')} + value={this.state.childName} + onChange={this.handleChange} + /> - - - - {this.newInput = input;}} id="fileName" placeholder={gettext('newName')} value={this.state.childName} onChange={this.handleChange}/> - - - -
- + ); diff --git a/frontend/src/components/dialog/create-folder-dialog.js b/frontend/src/components/dialog/create-folder-dialog.js index 843d6866f0..7176035425 100644 --- a/frontend/src/components/dialog/create-folder-dialog.js +++ b/frontend/src/components/dialog/create-folder-dialog.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Button, Modal, ModalHeader, Input, ModalBody, ModalFooter, Form, FormGroup, Label, Col, FormText } from 'reactstrap'; +import { Button, Modal, ModalHeader, Input, ModalBody, ModalFooter, Form, FormGroup, Label } from 'reactstrap'; import { gettext } from '../../utils/constants'; const propTypes = { @@ -58,21 +58,22 @@ class CreateForder extends React.Component { {gettext('New Folder')}
- - - {this.state.parentPath} - - - - - {this.newInput = input;}} id="fileName" placeholder={gettext('newName')} value={this.state.childName} onChange={this.handleChange}/> - + + + {this.newInput = input;}} + onKeyPress={this.handleKeyPress} + onChange={this.handleChange} + />
- + ); From 1631100aff1e326ae5d7ae01a8fb1f8c3ad95dc0 Mon Sep 17 00:00:00 2001 From: shanshuirenjia <978987373@qq.com> Date: Mon, 17 Dec 2018 13:16:13 +0800 Subject: [PATCH 2/2] delete placeholder --- frontend/src/components/dialog/create-file-dialog.js | 3 +-- frontend/src/components/dialog/create-folder-dialog.js | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/src/components/dialog/create-file-dialog.js b/frontend/src/components/dialog/create-file-dialog.js index 8df41dcedb..7432c8afb1 100644 --- a/frontend/src/components/dialog/create-file-dialog.js +++ b/frontend/src/components/dialog/create-file-dialog.js @@ -112,10 +112,9 @@ class CreateFile extends React.Component { {this.newInput = input;}} - id="fileName" - placeholder={gettext('new name')} value={this.state.childName} onChange={this.handleChange} /> diff --git a/frontend/src/components/dialog/create-folder-dialog.js b/frontend/src/components/dialog/create-folder-dialog.js index 7176035425..85c609d761 100644 --- a/frontend/src/components/dialog/create-folder-dialog.js +++ b/frontend/src/components/dialog/create-folder-dialog.js @@ -62,7 +62,6 @@ class CreateForder extends React.Component { {this.newInput = input;}} onKeyPress={this.handleKeyPress}