1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +01:00

git removed s3-fineuploader

This commit is contained in:
ddejongh 2015-06-23 10:27:19 +02:00
parent c8cb456709
commit 3f3e9a273f
4 changed files with 54 additions and 6 deletions

1
.gitignore vendored
View File

@ -12,7 +12,6 @@ logs
results
node_modules/*
!node_modules/react-s3-fineuploader
build

View File

@ -15,7 +15,7 @@ import Property from './ascribe_forms/property';
import apiUrls from '../constants/api_urls';
import ReactS3FineUploader from 'ReactS3FineUploader';
import ReactS3FineUploader from './ascribe_uploader/react_s3_fine_uploader';
import DatePicker from 'react-datepicker/dist/react-datepicker';
@ -26,6 +26,7 @@ let RegisterPiece = React.createClass( {
<div className="row ascribe-row">
<div className="col-md-6">
<FileUploader />
<br />
</div>
<div className="col-md-6">
<RegisterPieceForm />
@ -114,11 +115,11 @@ let RegisterPieceForm = React.createClass({
render() {
return (
<Form
url={apiUrls.users_login}
url={apiUrls.pieces_list}
handleSuccess={this.handleSuccess}
buttons={
<button type="submit" className="btn ascribe-btn ascribe-btn-login">
Log in to ascribe
Register your artwork
</button>}
spinner={
<button className="btn ascribe-btn ascribe-btn-login ascribe-btn-login-spinner">
@ -141,9 +142,56 @@ let RegisterPieceForm = React.createClass({
placeholder="The title of the artwork"
required/>
</Property>
<Property
name='date_created'
label="Year Created">
<InputDate
placeholderText="Year Created (e.g. 2015)" />
</Property>
<Property
name='num_editions'
label="Number of editions">
<input
type="number"
placeholder="Specify the number of unique editions for this artwork"
min={1}
required/>
</Property>
<hr />
</Form>
);
}
});
let InputDate = React.createClass({
propTypes: {
placeholderText: React.PropTypes.string
},
getInitialState() {
return {
value: null,
value_formatted: null
};
},
handleChange(date) {
this.setState({
value: date,
value_formatted: date.format('YYYY')});
},
render: function () {
return (
<DatePicker
key="example2"
dateFormat="YYYY"
selected={this.state.value}
onChange={this.handleChange}
onBlur={this.props.onBlur}
placeholderText={this.props.placeholderText}/>
);
}
});
export default RegisterPiece;

View File

@ -13,8 +13,7 @@
"start": "node server.js"
},
"browser": {
"fineUploader": "./node_modules/react-s3-fineuploader/vendor/s3.fine-uploader.js",
"ReactS3FineUploader": "./node_modules/react-s3-fineuploader/react_s3_fine_uploader.js"
"fineUploader": "./js/components/ascribe_uploader/vendor/s3.fine-uploader.js"
},
"browserify-shim": {
"fineUploader": "qq"
@ -71,6 +70,7 @@
"react": "^0.13.2",
"react-bootstrap": "~0.22.6",
"react-datepicker": "~0.8.0",
"react-progressbar": "^1.1.0",
"react-router": "^0.13.3",
"react-textarea-autosize": "^2.2.3",
"reactify": "^1.1.0",

View File

@ -17,6 +17,7 @@ $BASE_URL: '<%= BASE_URL %>';
@import 'ascribe_edition';
@import 'ascribe_textarea';
@import 'ascribe_media_player';
@import 'ascribe_uploader';
@import 'ascribe-global-notification';
@import 'ascribe_piece_register';
@import 'offset_right';