1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 01:25:17 +01:00

Fix simple comments in pr

This commit is contained in:
Tim Daubenschütz 2015-12-02 12:25:11 +01:00
parent 85340a9126
commit 8b3060d613
5 changed files with 10 additions and 26 deletions

View File

@ -10,6 +10,8 @@ import ApiUrls from '../../constants/api_urls';
import AppConstants from '../../constants/application_constants';
import { getCookie } from '../../utils/fetch_api_utils';
import { getLangText } from '../../utils/lang_utils';
let FurtherDetailsFileuploader = React.createClass({
propTypes: {
@ -26,7 +28,7 @@ let FurtherDetailsFileuploader = React.createClass({
getDefaultProps() {
return {
label: 'Additional files',
label: getLangText('Additional files'),
multiple: false
};
},

View File

@ -53,8 +53,8 @@ let MarketSubmitButton = React.createClass({
const { extra_data, other_data } = edition;
if (extra_data.artist_bio && extra_data.work_description &&
extra_data.technology_details && extra_data.display_instructions &&
other_data.length > 0) {
extra_data.technology_details && extra_data.display_instructions &&
other_data.length > 0) {
return true;
}
}

View File

@ -8,6 +8,7 @@ import Property from '../../../../../ascribe_forms/property';
import InputTextAreaToggable from '../../../../../ascribe_forms/input_textarea_toggable';
import FurtherDetailsFileuploader from '../../../../../ascribe_detail/further_details_fileuploader';
import AscribeSpinner from '../../../../../ascribe_spinner';
import GlobalNotificationModel from '../../../../../../models/global_notification_model';
import GlobalNotificationActions from '../../../../../../actions/global_notification_actions';
@ -24,6 +25,7 @@ import requests from '../../../../../../utils/requests';
import { mergeOptions } from '../../../../../../utils/general_utils';
import { getLangText } from '../../../../../../utils/lang_utils';
let MarketAdditionalDataForm = React.createClass({
propTypes: {
pieceId: React.PropTypes.oneOfType([
@ -96,7 +98,7 @@ let MarketAdditionalDataForm = React.createClass({
},
isUploadReadyOnChange(piece) {
return piece && piece.other_data && piece.other_data.length > 0 ? true : false;
return piece && piece.other_data && piece.other_data.length > 0;
},
handleSuccessWithNotification() {
@ -211,7 +213,7 @@ let MarketAdditionalDataForm = React.createClass({
} else {
return (
<div className="ascribe-loading-position">
<img src={AppConstants.baseUrl + 'static/img/ascribe_animated_medium.gif'} />
<AscribeSpinner color='dark-blue' size='lg' />
</div>
);
}

View File

@ -35,8 +35,6 @@ let MarketRegisterPiece = React.createClass({
UserStore.getState(),
PieceListStore.getState(),
{
selectedLicense: 0,
isFineUploaderActive: false,
step: 0
});
},
@ -58,13 +56,6 @@ let MarketRegisterPiece = React.createClass({
onChange(state) {
this.setState(state);
if (this.state.currentUser && this.state.currentUser.email) {
// we should also make the fineuploader component editable again
this.setState({
isFineUploaderActive: true
});
}
},
handleRegisterSuccess(response) {
@ -140,7 +131,7 @@ let MarketRegisterPiece = React.createClass({
enableLocalHashing={false}
headerMessage={getLangText('Consign to Market')}
submitMessage={getLangText('Proceed to additional details')}
isFineUploaderActive={this.state.isFineUploaderActive}
isFineUploaderActive={true}
handleSuccess={this.handleRegisterSuccess}
onLoggedOut={this.onLoggedOut}
location={this.props.location}>

View File

@ -228,16 +228,6 @@ let ROUTES = {
)
};
function getRoutes(commonRoutes, subdomain) {
if(subdomain in ROUTES) {
return ROUTES[subdomain];
} else {
throw new Error('Subdomain wasn\'t specified in the wallet app.');
}
};
function getRoutes(commonRoutes, subdomain) {
if(subdomain in ROUTES) {
return ROUTES[subdomain];
@ -246,5 +236,4 @@ function getRoutes(commonRoutes, subdomain) {
}
}
export default getRoutes;