From 8b3060d6133e72765b1c07c3b1c9a0cc3b88e10d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Wed, 2 Dec 2015 12:25:11 +0100 Subject: [PATCH] Fix simple comments in pr --- .../ascribe_detail/further_details_fileuploader.js | 4 +++- .../market/market_buttons/market_submit_button.js | 4 ++-- .../market_forms/market_additional_data_form.js | 6 ++++-- .../wallet/components/market/market_register_piece.js | 11 +---------- js/components/whitelabel/wallet/wallet_routes.js | 11 ----------- 5 files changed, 10 insertions(+), 26 deletions(-) diff --git a/js/components/ascribe_detail/further_details_fileuploader.js b/js/components/ascribe_detail/further_details_fileuploader.js index c8e17036..dc638816 100644 --- a/js/components/ascribe_detail/further_details_fileuploader.js +++ b/js/components/ascribe_detail/further_details_fileuploader.js @@ -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 }; }, diff --git a/js/components/whitelabel/wallet/components/market/market_buttons/market_submit_button.js b/js/components/whitelabel/wallet/components/market/market_buttons/market_submit_button.js index 6a617bfb..d75282af 100644 --- a/js/components/whitelabel/wallet/components/market/market_buttons/market_submit_button.js +++ b/js/components/whitelabel/wallet/components/market/market_buttons/market_submit_button.js @@ -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; } } diff --git a/js/components/whitelabel/wallet/components/market/market_forms/market_additional_data_form.js b/js/components/whitelabel/wallet/components/market/market_forms/market_additional_data_form.js index a2318b99..90baebb0 100644 --- a/js/components/whitelabel/wallet/components/market/market_forms/market_additional_data_form.js +++ b/js/components/whitelabel/wallet/components/market/market_forms/market_additional_data_form.js @@ -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 (
- +
); } diff --git a/js/components/whitelabel/wallet/components/market/market_register_piece.js b/js/components/whitelabel/wallet/components/market/market_register_piece.js index a59ce5fa..9a919561 100644 --- a/js/components/whitelabel/wallet/components/market/market_register_piece.js +++ b/js/components/whitelabel/wallet/components/market/market_register_piece.js @@ -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}> diff --git a/js/components/whitelabel/wallet/wallet_routes.js b/js/components/whitelabel/wallet/wallet_routes.js index 08adec44..92b53dc6 100644 --- a/js/components/whitelabel/wallet/wallet_routes.js +++ b/js/components/whitelabel/wallet/wallet_routes.js @@ -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;