diff --git a/js/components/ascribe_forms/form_submit_to_prize.js b/js/components/ascribe_forms/form_submit_to_prize.js
deleted file mode 100644
index 43f28e2a..00000000
--- a/js/components/ascribe_forms/form_submit_to_prize.js
+++ /dev/null
@@ -1,89 +0,0 @@
-'use strict';
-
-import React from 'react';
-
-import Form from './form';
-import Property from './property';
-import InputTextAreaToggable from './input_textarea_toggable';
-import InputCheckbox from './input_checkbox';
-
-import Alert from 'react-bootstrap/lib/Alert';
-
-import AscribeSpinner from '../ascribe_spinner';
-import ApiUrls from '../../constants/api_urls';
-
-import { getLangText } from '../../utils/lang_utils.js';
-
-import requests from '../../utils/requests';
-
-let PieceSubmitToPrizeForm = React.createClass({
- propTypes: {
- piece: React.PropTypes.object,
- handleSuccess: React.PropTypes.func
- },
-
- render() {
- return (
-
- );
- }
-});
-
-
-export default PieceSubmitToPrizeForm;
diff --git a/js/components/whitelabel/prize/constants/prize_api_urls.js b/js/components/whitelabel/prize/constants/prize_api_urls.js
deleted file mode 100644
index cb4e2e44..00000000
--- a/js/components/whitelabel/prize/constants/prize_api_urls.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict';
-
-import AppPrizeConstants from './prize_application_constants';
-
-
-function getPrizeApiUrls(subdomain) {
- return {
- 'users_login': AppPrizeConstants.prizeApiEndpoint + subdomain + '/users/login/',
- 'users_signup': AppPrizeConstants.prizeApiEndpoint + subdomain + '/users/',
- 'user': AppPrizeConstants.prizeApiEndpoint + subdomain + '/users/',
- 'piece_submit_to_prize': AppPrizeConstants.prizeApiEndpoint + subdomain + '/pieces/${piece_id}/submit/',
- 'pieces_list': AppPrizeConstants.prizeApiEndpoint + subdomain + '/pieces/',
- 'piece': AppPrizeConstants.prizeApiEndpoint + subdomain + '/pieces/${piece_id}/',
- 'prize': AppPrizeConstants.prizeApiEndpoint + subdomain + '/',
- 'jurys': AppPrizeConstants.prizeApiEndpoint + subdomain + '/jury/',
- 'jury': AppPrizeConstants.prizeApiEndpoint + subdomain + '/jury/${email}/',
- 'jury_activate': AppPrizeConstants.prizeApiEndpoint + subdomain + '/jury/${email}/activate/',
- 'jury_resend': AppPrizeConstants.prizeApiEndpoint + subdomain + '/jury/${email}/resend/',
- 'ratings': AppPrizeConstants.prizeApiEndpoint + subdomain + '/ratings/',
- 'rating': AppPrizeConstants.prizeApiEndpoint + subdomain + '/ratings/${piece_id}/',
- 'rating_average': AppPrizeConstants.prizeApiEndpoint + subdomain + '/ratings/${piece_id}/average/',
- 'select_piece': AppPrizeConstants.prizeApiEndpoint + subdomain + '/ratings/${piece_id}/select/',
- 'notes': AppPrizeConstants.prizeApiEndpoint + subdomain + '/notes/',
- 'note': AppPrizeConstants.prizeApiEndpoint + subdomain + '/notes/${piece_id}/'
- };
-}
-
-export default getPrizeApiUrls;
diff --git a/js/components/whitelabel/prize/constants/prize_application_constants.js b/js/components/whitelabel/prize/constants/prize_application_constants.js
deleted file mode 100644
index 9ba87a37..00000000
--- a/js/components/whitelabel/prize/constants/prize_application_constants.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-import AppConstants from '../../../../constants/application_constants';
-
-let prizeConstants = {
- prizeApiEndpoint: AppConstants.apiEndpoint + 'prizes/'
-};
-
-export default prizeConstants;
\ No newline at end of file
diff --git a/js/components/whitelabel/prize/portfolioreview/components/pr_forms/pr_register_piece_form.js b/js/components/whitelabel/prize/portfolioreview/components/pr_forms/pr_register_piece_form.js
deleted file mode 100644
index 205a5634..00000000
--- a/js/components/whitelabel/prize/portfolioreview/components/pr_forms/pr_register_piece_form.js
+++ /dev/null
@@ -1,417 +0,0 @@
-'use strict';
-
-import React from 'react';
-import { History } from 'react-router';
-
-import GlobalNotificationModel from '../../../../../../models/global_notification_model';
-import GlobalNotificationActions from '../../../../../../actions/global_notification_actions';
-
-import Form from '../../../../../ascribe_forms/form';
-import Property from '../../../../../ascribe_forms/property';
-import InputTextAreaToggable from '../../../../../ascribe_forms/input_textarea_toggable';
-
-import InputFineuploader from '../../../../../ascribe_forms/input_fineuploader';
-import UploadButton from '../../../../../ascribe_uploader/ascribe_upload_button/upload_button';
-
-import AscribeSpinner from '../../../../../ascribe_spinner';
-
-import ApiUrls from '../../../../../../constants/api_urls';
-import AppConstants from '../../../../../../constants/application_constants';
-import { validationParts, validationTypes } from '../../../../../../constants/uploader_constants';
-
-import requests from '../../../../../../utils/requests';
-
-import { getErrorNotificationMessage } from '../../../../../../utils/error_utils';
-import { setCookie } from '../../../../../../utils/fetch_api_utils';
-import { validateForms } from '../../../../../../utils/form_utils';
-import { getLangText } from '../../../../../../utils/lang_utils';
-import { formSubmissionValidation } from '../../../../../ascribe_uploader/react_s3_fine_uploader_utils';
-
-
-const { object } = React.PropTypes;
-
-const PRRegisterPieceForm = React.createClass({
- propTypes: {
- currentUser: object.isRequired,
- location: object
- },
-
- mixins: [History],
-
- getInitialState() {
- return {
- digitalWorkKeyReady: true,
- thumbnailKeyReady: true,
-
- // we set this to true, as it is not required
- supportingMaterialsReady: true,
- proofOfPaymentReady: true,
- piece: null,
- submitted: false
- };
- },
-
- /**
- * In this method, we're composing all fields on the page
- * in two steps, first submitting the registration of the piece and
- * second adding all the additional details
- */
- submit() {
- if (!this.validateForms()) {
- return;
- }
-
- // disable the submission button right after the user
- // clicks on it to avoid double submission
- this.setState({
- submitted: true
- });
-
- const { currentUser } = this.props;
- const { registerPieceForm,
- additionalDataForm,
- uploadersForm } = this.refs;
- const { digitalWorkKey,
- thumbnailKey,
- supportingMaterials,
- proofOfPayment } = uploadersForm.refs;
- const additionalDataFormData = additionalDataForm.getFormData();
-
- // composing data for piece registration
- const registerPieceFormData = registerPieceForm.getFormData();
- registerPieceFormData.digital_work_key = digitalWorkKey.state.value;
- registerPieceFormData.thumbnail_file = thumbnailKey.state.value;
- registerPieceFormData.terms = true;
-
- // submitting the piece
- requests
- .post(ApiUrls.pieces_list, { body: registerPieceFormData })
- .then(({ piece, notification }) => {
- this.setState({piece}, () => {
- supportingMaterials.refs.input.createBlobRoutine();
- proofOfPayment.refs.input.createBlobRoutine();
- });
-
- setCookie(currentUser.email, piece.id);
-
- return requests
- .post(ApiUrls.piece_extradata, {
- body: {
- extradata: additionalDataFormData,
- piece_id: piece.id
- },
- piece_id: piece.id
- })
- .then(() => {
- const notificationMessage = new GlobalNotificationModel(notification || getLangText('You have successfully submitted "%s" to Portfolio Review 2015', piece.title), 'success', 5000);
- GlobalNotificationActions.appendGlobalNotification(notificationMessage);
- });
- })
- .then(() => this.history.push(`/pieces/${this.state.piece.id}`))
- .catch((err) => {
- const errMessage = (getErrorNotificationMessage(err) || getLangText("Oops! We weren't able to send your submission.")) +
- getLangText(' Please contact support@ascribe.io');
-
- const notificationMessage = new GlobalNotificationModel(errMessage, 'danger', 10000);
- GlobalNotificationActions.appendGlobalNotification(notificationMessage);
-
- console.logGlobal(new Error('Portfolio Review piece registration failed'), err);
-
- // Reset the submit button
- this.setState({
- submitted: false
- });
- });
- },
-
- validateForms() {
- const { registerPieceForm,
- additionalDataForm,
- uploadersForm } = this.refs;
-
- return validateForms([registerPieceForm, additionalDataForm, uploadersForm], true);
- },
-
- getCreateBlobRoutine() {
- const { piece } = this.state;
-
- if(piece && piece.id) {
- return {
- url: ApiUrls.blob_otherdatas,
- pieceId: piece.id
- };
- } else {
- return null;
- }
- },
-
- /**
- * These two methods are overloaded so that we can track the ready-state
- * of each uploader in the component
- * @param {string} uploaderKey Name of the uploader's key to track
- */
- setIsUploadReady(uploaderKey) {
- return (isUploadReady) => {
- this.setState({
- [uploaderKey]: isUploadReady
- });
- };
- },
-
- handleOptionalFileValidationFailed(uploaderKey) {
- return () => {
- this.setState({
- [uploaderKey]: true
- });
- };
- },
-
- getSubmitButton() {
- const { digitalWorkKeyReady,
- thumbnailKeyReady,
- supportingMaterialsReady,
- proofOfPaymentReady,
- submitted } = this.state;
-
- if(submitted) {
- return (
-
-
-
- );
- } else {
- return (
-
- {getLangText('Submit to Portfolio Review')}
-
- );
- }
- },
-
- render() {
- const { location } = this.props;
- const maxThumbnailSize = validationTypes.workThumbnail.sizeLimit / 1000000;
-
- return (
-
-
-
-
-
- {this.getSubmitButton()}
-
- );
- }
-});
-
-export default PRRegisterPieceForm;
diff --git a/js/components/whitelabel/prize/portfolioreview/components/pr_hero.js b/js/components/whitelabel/prize/portfolioreview/components/pr_hero.js
deleted file mode 100644
index e5ec57db..00000000
--- a/js/components/whitelabel/prize/portfolioreview/components/pr_hero.js
+++ /dev/null
@@ -1,33 +0,0 @@
-'use strict';
-
-import React from 'react';
-import { Link } from 'react-router';
-
-import Glyphicon from 'react-bootstrap/lib/Glyphicon';
-
-import { getLangText } from '../../../../../utils/lang_utils';
-
-
-const PRHero = React.createClass({
- propTypes: {
- currentUser: React.PropTypes.shape({
- email: React.PropTypes.object
- }).isRequired
- },
-
- render() {
- const { currentUser } = this.props;
-
- return (
-
-
- {getLangText('Congratulations') + (currentUser.email ? ` ${currentUser.email}!` : '!')}
-
-
{getLangText('You have successfully submitted to Portfolio Review 2016.')}
-
Not you? {getLangText('Change account.')}
-
- );
- }
-});
-
-export default PRHero;
diff --git a/js/components/whitelabel/prize/portfolioreview/components/pr_landing.js b/js/components/whitelabel/prize/portfolioreview/components/pr_landing.js
deleted file mode 100644
index 4cb925a8..00000000
--- a/js/components/whitelabel/prize/portfolioreview/components/pr_landing.js
+++ /dev/null
@@ -1,124 +0,0 @@
-'use strict';
-
-import React from 'react';
-import { History } from 'react-router';
-
-import Button from 'react-bootstrap/lib/Button';
-import ButtonGroup from 'react-bootstrap/lib/ButtonGroup';
-
-import LinkContainer from 'react-router-bootstrap/lib/LinkContainer';
-
-import PrizeActions from '../../simple_prize/actions/prize_actions';
-import PrizeStore from '../../simple_prize/stores/prize_store';
-
-import { omitFromObject } from '../../../../../utils/general_utils';
-import { getLangText } from '../../../../../utils/lang_utils';
-
-
-const PRLanding = React.createClass({
- propTypes: {
- // Provided from PrizeApp
- currentUser: React.PropTypes.object,
- whitelabel: React.PropTypes.object,
-
- // Provided from router
- location: React.PropTypes.object
- },
-
- mixins: [History],
-
- getInitialState() {
- return PrizeStore.getState();
- },
-
- componentDidMount() {
- const { location } = this.props;
-
- PrizeStore.listen(this.onChange);
- PrizeActions.fetchPrize();
-
- if (location.query.redirect) {
- window.setTimeout(() => this.history.replace({
- pathname: `/${location.query.redirect}`,
- query: omitFromObject(location.query, ['redirect'])
- }));
- }
- },
-
- componentWillUnmount() {
- PrizeStore.unlisten(this.onChange);
- },
-
- onChange(state) {
- this.setState(state);
- },
-
- getButtons() {
- if (this.state.prize && this.state.prize.active) {
- return (
-
-
-
- {getLangText('Sign up to submit')}
-
-
-
-
- {getLangText('or, already an ascribe user?')}
-
-
-
- {getLangText('Log in to submit')}
-
-
-
- );
- } else {
- return (
-
-
- {getLangText('Sign up to ascribe')}
-
-
-
- {getLangText('or, already an ascribe user?')}
-
-
-
- {getLangText('Log in')}
-
-
-
- );
- }
- },
-
- getTitle() {
- const { prize } = this.state;
-
- return (
-
- {getLangText(prize && prize.active ? 'This is the submission page for Portfolio Review 2016.'
- : 'Submissions for Portfolio Review 2016 are now closed.')}
-
- );
- },
-
- render() {
- return (
-
-
-
-
- {getLangText('Welcome to Portfolio Review 2016')}
-
- {this.getTitle()}
- {this.getButtons()}
-
-
-
- );
- }
-});
-
-export default PRLanding;
diff --git a/js/components/whitelabel/prize/portfolioreview/components/pr_register_piece.js b/js/components/whitelabel/prize/portfolioreview/components/pr_register_piece.js
deleted file mode 100644
index 5f459ecd..00000000
--- a/js/components/whitelabel/prize/portfolioreview/components/pr_register_piece.js
+++ /dev/null
@@ -1,72 +0,0 @@
-'use strict';
-
-import React from 'react';
-import { Link, History } from 'react-router';
-
-import Col from 'react-bootstrap/lib/Col';
-import Row from 'react-bootstrap/lib/Row';
-
-import PRRegisterPieceForm from './pr_forms/pr_register_piece_form';
-
-import { getLangText } from '../../../../../utils/lang_utils';
-import { setDocumentTitle } from '../../../../../utils/dom_utils';
-import { getCookie } from '../../../../../utils/fetch_api_utils';
-
-
-const { object } = React.PropTypes;
-
-const PRRegisterPiece = React.createClass({
- propTypes: {
- // Provided from PrizeApp
- currentUser: React.PropTypes.object.isRequired,
- whitelabel: React.PropTypes.object,
-
- // Provided from router
- location: object
- },
-
- mixins: [History],
-
- componentDidUpdate() {
- const { currentUser } = this.props;
- if (currentUser.email) {
- const submittedPieceId = getCookie(currentUser.email);
- if (submittedPieceId) {
- this.history.push(`/pieces/${submittedPieceId}`);
- }
- }
- },
-
- render() {
- const { currentUser, location } = this.props;
-
- setDocumentTitle(getLangText('Submit to Portfolio Review'));
-
- return (
-
-
-
-
Portfolio Review
-
{getLangText('Submission closing on %s', ' 27 Dec 2015')}
-
For more information, visit:
-
- portfolio-review.de
-
-
-
- {getLangText("You're submitting as %s. ", currentUser.email)}
- {getLangText('Change account?')}
-
-
-
-
-
-
-
- );
- }
-});
-
-export default PRRegisterPiece;
diff --git a/js/components/whitelabel/prize/portfolioreview/components/pr_routes/pr_proxy_handler.js b/js/components/whitelabel/prize/portfolioreview/components/pr_routes/pr_proxy_handler.js
deleted file mode 100644
index f81c4539..00000000
--- a/js/components/whitelabel/prize/portfolioreview/components/pr_routes/pr_proxy_handler.js
+++ /dev/null
@@ -1,26 +0,0 @@
-'use strict';
-
-import history from '../../../../../../history';
-
-
-export function AuthPrizeRoleRedirect({ to, when }) {
- if (when.constructor !== Array || !when.length) {
- throw new Error('`when` of AuthPrizeRoleRedirect must be an array containing values');
- }
- if (!to || to.indexOf('/') === -1) {
- throw new Error('`to` of AuthPrizeRoleRedirect must be defined and contain a valid route');
- }
-
- return function(currentUser, query) {
- const exprToValidate = when
- .map(role => currentUser[role])
- .reduce((a, b) => a || b);
-
- if (exprToValidate) {
- window.setTimeout(() => history.replace({ query, pathname: to }));
- return true;
- } else {
- return false;
- }
- };
-}
diff --git a/js/components/whitelabel/prize/portfolioreview/pr_app.js b/js/components/whitelabel/prize/portfolioreview/pr_app.js
deleted file mode 100644
index 2d097c75..00000000
--- a/js/components/whitelabel/prize/portfolioreview/pr_app.js
+++ /dev/null
@@ -1,73 +0,0 @@
-'use strict';
-
-import React from 'react';
-import classNames from 'classnames';
-
-import EventActions from '../../../../actions/event_actions';
-
-import UserStore from '../../../../stores/user_store';
-import UserActions from '../../../../actions/user_actions';
-
-import Hero from './components/pr_hero';
-
-import AppBase from '../../../app_base';
-import AppRouteWrapper from '../../../app_route_wrapper';
-import Header from '../../../header';
-
-import { getSubdomain } from '../../../../utils/general_utils';
-import { getCookie } from '../../../../utils/fetch_api_utils';
-
-
-let PRApp = React.createClass({
- propTypes: {
- activeRoute: React.PropTypes.object.isRequired,
- children: React.PropTypes.element.isRequired,
- history: React.PropTypes.object.isRequired,
- routes: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
-
- // Provided from AppBase
- currentUser: React.PropTypes.object,
- whitelabel: React.PropTypes.object
- },
-
- render() {
- const { activeRoute, children, currentUser, history, routes, whitelabel } = this.props;
- const subdomain = getSubdomain();
- const path = activeRoute && activeRoute.path;
- const Footer = activeRoute && activeRoute.footer;
-
- let style = {};
- let header;
- if (currentUser && currentUser.email && history.isActive(`/pieces/${getCookie(currentUser.email)}`)) {
- header = ( );
- style = { paddingTop: '0 !important' };
- } else if (currentUser && (currentUser.is_admin || currentUser.is_jury || currentUser.is_judge)) {
- header = (
-
- );
- } else {
- style = { paddingTop: '0 !important' };
- }
-
- return (
-
- {header}
-
- {/* Routes are injected here */}
- {children}
-
- {Footer ?
: null}
-
- );
- }
-});
-
-export default AppBase(PRApp);
diff --git a/js/components/whitelabel/prize/prize_routes.js b/js/components/whitelabel/prize/prize_routes.js
deleted file mode 100644
index f1f32772..00000000
--- a/js/components/whitelabel/prize/prize_routes.js
+++ /dev/null
@@ -1,137 +0,0 @@
-'use strict';
-
-import React from 'react';
-import { Route, IndexRoute } from 'react-router';
-
-import { ProxyHandler, AuthRedirect } from '../../../components/ascribe_routes/proxy_handler';
-import { AuthPrizeRoleRedirect } from './portfolioreview/components/pr_routes/pr_proxy_handler';
-
-// General components
-import EditionContainer from '../../ascribe_detail/edition_container';
-import LogoutContainer from '../../logout_container';
-import PasswordResetContainer from '../../password_reset_container';
-import CoaVerifyContainer from '../../coa_verify_container';
-import ErrorNotFoundPage from '../../error_not_found_page';
-
-import SPApp from './simple_prize/prize_app';
-import SPLanding from './simple_prize/components/prize_landing';
-import SPLoginContainer from './simple_prize/components/prize_login_container';
-import SPSignupContainer from './simple_prize/components/prize_signup_container';
-import SPRegisterPiece from './simple_prize/components/prize_register_piece';
-import SPPieceList from './simple_prize/components/prize_piece_list';
-import SPPieceContainer from './simple_prize/components/ascribe_detail/prize_piece_container';
-import SPSettingsContainer from './simple_prize/components/prize_settings_container';
-
-import SluicePieceContainer from './sluice/components/sluice_detail/sluice_piece_container';
-
-import PRApp from './portfolioreview/pr_app';
-import PRLanding from './portfolioreview/components/pr_landing';
-import PRRegisterPiece from './portfolioreview/components/pr_register_piece';
-
-import { getLangText } from '../../../utils/lang_utils';
-
-
-const ROUTES = {
- sluice: (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ),
- portfolioreview: (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- )
-};
-
-
-function getRoutes(commonRoutes, subdomain) {
- if(subdomain in ROUTES) {
- return ROUTES[subdomain];
- } else {
- throw new Error('Subdomain wasn\'t specified in the wallet app.');
- }
-}
-
-
-export default getRoutes;
diff --git a/js/components/whitelabel/prize/simple_prize/actions/prize_actions.js b/js/components/whitelabel/prize/simple_prize/actions/prize_actions.js
deleted file mode 100644
index 242bb846..00000000
--- a/js/components/whitelabel/prize/simple_prize/actions/prize_actions.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict';
-
-import { alt } from '../../../../../alt';
-
-import PrizeFetcher from '../fetchers/prize_fetcher';
-
-class PrizeActions {
- constructor() {
- this.generateActions(
- 'updatePrize'
- );
- }
-
- fetchPrize() {
- PrizeFetcher
- .fetch()
- .then((res) => {
- this.actions.updatePrize({
- prize: res
- });
- })
- .catch((err) => {
- console.logGlobal(err);
- });
- }
-}
-
-export default alt.createActions(PrizeActions);
\ No newline at end of file
diff --git a/js/components/whitelabel/prize/simple_prize/actions/prize_jury_actions.js b/js/components/whitelabel/prize/simple_prize/actions/prize_jury_actions.js
deleted file mode 100644
index 24cf08e8..00000000
--- a/js/components/whitelabel/prize/simple_prize/actions/prize_jury_actions.js
+++ /dev/null
@@ -1,76 +0,0 @@
-'use strict';
-
-import { alt } from '../../../../../alt';
-import Q from 'q';
-
-import PrizeJuryFetcher from '../fetchers/prize_jury_fetcher';
-
-class PrizeJuryActions {
- constructor() {
- this.generateActions(
- 'updatePrizeJury',
- 'removePrizeJury',
- 'activatePrizeJury'
- );
- }
-
- fetchJury() {
- return Q.Promise((resolve, reject) => {
- PrizeJuryFetcher
- .fetch()
- .then((res) => {
- this.actions.updatePrizeJury(res.members);
- resolve(res);
- })
- .catch((err) => {
- console.logGlobal(err);
- reject(err);
- });
- });
- }
-
- activateJury(email) {
- return Q.Promise((resolve, reject) => {
- PrizeJuryFetcher
- .activate(email)
- .then((res) => {
- resolve(res);
- })
- .catch((err) => {
- console.logGlobal(err);
- reject(err);
- });
- });
- }
-
- revokeJury(email) {
- return Q.Promise((resolve, reject) => {
- PrizeJuryFetcher
- .delete(email)
- .then((res) => {
- this.actions.removePrizeJury(email);
- resolve(res);
- })
- .catch((err) => {
- console.logGlobal(err);
- reject(err);
- });
- });
- }
-
- resendJuryInvitation(email) {
- return Q.Promise((resolve, reject) => {
- PrizeJuryFetcher
- .resend(email)
- .then((res) => {
- resolve(res);
- })
- .catch((err) => {
- console.logGlobal(err);
- reject(err);
- });
- });
- }
-}
-
-export default alt.createActions(PrizeJuryActions);
\ No newline at end of file
diff --git a/js/components/whitelabel/prize/simple_prize/actions/prize_rating_actions.js b/js/components/whitelabel/prize/simple_prize/actions/prize_rating_actions.js
deleted file mode 100644
index 91852704..00000000
--- a/js/components/whitelabel/prize/simple_prize/actions/prize_rating_actions.js
+++ /dev/null
@@ -1,76 +0,0 @@
-'use strict';
-
-import { alt } from '../../../../../alt';
-import Q from 'q';
-
-import PrizeRatingFetcher from '../fetchers/prize_rating_fetcher';
-
-class PrizeRatingActions {
- constructor() {
- this.generateActions(
- 'updatePrizeRatings',
- 'updatePrizeRatingAverage',
- 'updatePrizeRating',
- 'resetPrizeRatings'
- );
- }
-
- fetchAverage(pieceId, round) {
- return Q.Promise((resolve, reject) => {
- PrizeRatingFetcher
- .fetchAverage(pieceId, round)
- .then((res) => {
- this.actions.updatePrizeRatingAverage(res.data);
- resolve(res);
- })
- .catch((err) => {
- console.logGlobal(err);
- reject(err);
- });
- });
- }
-
- fetchOne(pieceId, round) {
- return Q.Promise((resolve, reject) => {
- PrizeRatingFetcher
- .fetchOne(pieceId, round)
- .then((res) => {
- this.actions.updatePrizeRating(res.rating.rating);
- resolve(res);
- })
- .catch((err) => {
- reject(err);
- });
- });
- }
-
- createRating(pieceId, rating, round) {
- return Q.Promise((resolve, reject) => {
- PrizeRatingFetcher
- .rate(pieceId, rating, round)
- .then((res) => {
- this.actions.updatePrizeRating(res.rating.rating);
- resolve(res);
- })
- .catch((err) => {
- reject(err);
- });
- });
- }
-
- toggleShortlist(pieceId) {
- return Q.Promise((resolve, reject) => {
- PrizeRatingFetcher
- .select(pieceId)
- .then((res) => {
- this.actions.updatePrizeRatings(res.data.ratings);
- resolve(res);
- })
- .catch((err) => {
- reject(err);
- });
- });
- }
-}
-
-export default alt.createActions(PrizeRatingActions);
diff --git a/js/components/whitelabel/prize/simple_prize/components/ascribe_accordion_list/accordion_list_item_prize.js b/js/components/whitelabel/prize/simple_prize/components/ascribe_accordion_list/accordion_list_item_prize.js
deleted file mode 100644
index 938f654f..00000000
--- a/js/components/whitelabel/prize/simple_prize/components/ascribe_accordion_list/accordion_list_item_prize.js
+++ /dev/null
@@ -1,191 +0,0 @@
-'use strict';
-
-import React from 'react';
-import { Link } from 'react-router';
-import StarRating from 'react-star-rating';
-import Moment from 'moment';
-
-import PieceListActions from '../../../../../../actions/piece_list_actions';
-import PieceListStore from '../../../../../../stores/piece_list_store';
-
-import PrizeRatingActions from '../../actions/prize_rating_actions';
-
-import InputCheckbox from '../../../../../ascribe_forms/input_checkbox';
-
-import AccordionListItemPiece from '../../../../../ascribe_accordion_list/accordion_list_item_piece';
-
-import GlobalNotificationModel from '../../../../../../models/global_notification_model';
-import GlobalNotificationActions from '../../../../../../actions/global_notification_actions';
-
-import AclProxy from '../../../../../acl_proxy';
-import SubmitToPrizeButton from './../ascribe_buttons/submit_to_prize_button';
-
-import { getLangText } from '../../../../../../utils/lang_utils';
-
-
-let AccordionListItemPrize = React.createClass({
- propTypes: {
- content: React.PropTypes.object.isRequired,
- currentUser: React.PropTypes.object.isRequired,
-
- children: React.PropTypes.oneOfType([
- React.PropTypes.arrayOf(React.PropTypes.element),
- React.PropTypes.element
- ]),
- className: React.PropTypes.string
- },
-
- getInitialState() {
- return PieceListStore.getState();
- },
-
- componentDidMount() {
- PieceListStore.listen(this.onChange);
- },
-
- componentWillUnmount() {
- PieceListStore.unlisten(this.onChange);
- },
-
- onChange(state) {
- this.setState(state);
- },
-
- handleSubmitPrizeSuccess(response) {
- const { filterBy, orderAsc, orderBy, page, pageSize, search } = this.state;
-
- PieceListActions.fetchPieceList({ page, pageSize, search, orderBy, orderAsc, filterBy });
-
- const notification = new GlobalNotificationModel(response.notification, 'success', 10000);
- GlobalNotificationActions.appendGlobalNotification(notification);
- },
-
- getPrizeButtons() {
- const { currentUser, content: { id, ratings } } = this.props;
-
- if (currentUser && (currentUser.is_jury || currentUser.is_judge)) {
- if (ratings && (ratings.rating || ratings.average)) {
- // jury and rating available
- let rating = null;
- let caption = null;
-
- if (ratings.rating) {
- rating = parseInt(ratings.rating, 10);
- caption = getLangText('Your rating');
- } else if (ratings.average) {
- rating = ratings.average;
- caption = getLangText('Average of ' + ratings.num_ratings + ' rating(s)');
- }
-
- return (
-
-
-
-
-
- );
- } else {
- if (currentUser.is_judge) {
- return (
-
- {getLangText('Not rated')}
-
- );
- } else {
- // jury and no rating yet
- return (
-
-
- {getLangText('Submit your rating')}
-
-
- );
- }
- }
- } else {
- return this.getPrizeButtonsParticipant();
- }
- },
-
- getPrizeButtonsParticipant() {
- return (
-
-
-
- );
- },
-
- handleShortlistSuccess(message) {
- const notification = new GlobalNotificationModel(message, 'success', 2000);
- GlobalNotificationActions.appendGlobalNotification(notification);
- },
-
- refreshPieceData() {
- const { filterBy, orderAsc, orderBy, page, pageSize, search } = this.state;
-
- PieceListActions.fetchPieceList({ page, pageSize, search, orderBy, orderAsc, filterBy });
- },
-
- onSelectChange() {
- PrizeRatingActions.toggleShortlist(this.props.content.id)
- .then((res) => {
- this.refreshPieceData();
- this.handleShortlistSuccess(res.notification);
- });
-
- },
-
- getPrizeBadge() {
- const { currentUser } = this.props;
-
- if (currentUser && currentUser.is_judge) {
- return (
-
-
-
- );
- } else {
- return null;
- }
- },
-
- render() {
- const { children, className, content, currentUser } = this.props;
-
- // Only show the artist name if you are the participant or if you are a judge and the piece is shortlisted
- const artistName = ((currentUser.is_jury && !currentUser.is_judge) || (currentUser.is_judge && !content.selected )) ?
- : content.artist_name;
-
- return (
-
- {Moment(content.date_created, 'YYYY-MM-DD').year()}
-
- }
- buttons={this.getPrizeButtons()}
- badge={this.getPrizeBadge()}>
- {children}
-
- );
- }
-});
-
-export default AccordionListItemPrize;
diff --git a/js/components/whitelabel/prize/simple_prize/components/ascribe_buttons/submit_to_prize_button.js b/js/components/whitelabel/prize/simple_prize/components/ascribe_buttons/submit_to_prize_button.js
deleted file mode 100644
index b10b8da6..00000000
--- a/js/components/whitelabel/prize/simple_prize/components/ascribe_buttons/submit_to_prize_button.js
+++ /dev/null
@@ -1,55 +0,0 @@
-'use strict';
-
-import React from 'react';
-import classNames from 'classnames';
-
-import ModalWrapper from '../../../../../ascribe_modal/modal_wrapper';
-import PieceSubmitToPrizeForm from '../../../../../ascribe_forms/form_submit_to_prize';
-
-import { getLangText } from '../../../../../../utils/lang_utils';
-
-
-let SubmitToPrizeButton = React.createClass({
- propTypes: {
- className: React.PropTypes.string,
- handleSuccess: React.PropTypes.func,
- piece: React.PropTypes.object.isRequired
- },
-
- getSubmitButton() {
- if (this.props.piece.prize) {
- return (
-
- {getLangText('Submitted to prize') + ' '}
-
-
- );
- }
- else {
- return (
-
- {getLangText('Submit to prize')}
-
- );
- }
- },
-
- render() {
- return (
-
-
-
-
- );
- }
-});
-
-export default SubmitToPrizeButton;
\ No newline at end of file
diff --git a/js/components/whitelabel/prize/simple_prize/components/ascribe_detail/prize_piece_container.js b/js/components/whitelabel/prize/simple_prize/components/ascribe_detail/prize_piece_container.js
deleted file mode 100644
index 6434661d..00000000
--- a/js/components/whitelabel/prize/simple_prize/components/ascribe_detail/prize_piece_container.js
+++ /dev/null
@@ -1,495 +0,0 @@
-'use strict';
-
-import React from 'react';
-import { Link } from 'react-router';
-import Moment from 'moment';
-
-import StarRating from 'react-star-rating';
-
-import ReactError from '../../../../../../mixins/react_error';
-import { ResourceNotFoundError } from '../../../../../../models/errors';
-
-import PrizeActions from '../../actions/prize_actions';
-import PrizeStore from '../../stores/prize_store';
-import PrizeRatingActions from '../../actions/prize_rating_actions';
-import PrizeRatingStore from '../../stores/prize_rating_store';
-
-import PieceListStore from '../../../../../../stores/piece_list_store';
-import PieceListActions from '../../../../../../actions/piece_list_actions';
-import PieceActions from '../../../../../../actions/piece_actions';
-import PieceStore from '../../../../../../stores/piece_store';
-
-import Piece from '../../../../../../components/ascribe_detail/piece';
-import Note from '../../../../../../components/ascribe_detail/note';
-
-import AscribeSpinner from '../../../../../ascribe_spinner';
-
-import Form from '../../../../../../components/ascribe_forms/form';
-import Property from '../../../../../../components/ascribe_forms/property';
-import InputTextAreaToggable from '../../../../../../components/ascribe_forms/input_textarea_toggable';
-import CollapsibleParagraph from '../../../../../../components/ascribe_collapsible/collapsible_paragraph';
-
-import FurtherDetailsFileuploader from '../../../../../ascribe_detail/further_details_fileuploader';
-
-import InputCheckbox from '../../../../../ascribe_forms/input_checkbox';
-import ListRequestActions from '../../../../../ascribe_forms/list_form_request_actions';
-
-import GlobalNotificationModel from '../../../../../../models/global_notification_model';
-import GlobalNotificationActions from '../../../../../../actions/global_notification_actions';
-
-import DetailProperty from '../../../../../ascribe_detail/detail_property';
-
-import ApiUrls from '../../../../../../constants/api_urls';
-import { mergeOptions } from '../../../../../../utils/general_utils';
-import { getLangText } from '../../../../../../utils/lang_utils';
-import { setDocumentTitle } from '../../../../../../utils/dom_utils';
-
-
-/**
- * This is the component that implements resource/data specific functionality
- */
-let PrizePieceContainer = React.createClass({
- propTypes: {
- selectedPrizeActionButton: React.PropTypes.func,
-
- // Provided from PrizeApp
- currentUser: React.PropTypes.object.isRequired,
- whitelabel: React.PropTypes.object,
-
- // Provided from router
- location: React.PropTypes.object,
- params: React.PropTypes.object
- },
-
- mixins: [ReactError],
-
- getInitialState() {
- return PieceStore.getInitialState();
- },
-
- componentDidMount() {
- PieceStore.listen(this.onChange);
-
- this.loadPiece();
- },
-
- // This is done to update the container when the user clicks on the prev or next
- // button to update the URL parameter (and therefore to switch pieces) or
- // when the user clicks on a notification while being in another piece view
- componentWillReceiveProps(nextProps) {
- if (this.props.params.pieceId !== nextProps.params.pieceId) {
- PieceActions.flushPiece();
- this.loadPiece(nextProps.params.pieceId);
- }
- },
-
- componentDidUpdate() {
- const { pieceMeta: { err: pieceErr } } = this.state;
-
- if (pieceErr && pieceErr.status === 404) {
- this.throws(new ResourceNotFoundError(getLangText("Oops, the piece you're looking for doesn't exist.")));
- }
- },
-
- componentWillUnmount() {
- PieceStore.unlisten(this.onChange);
- },
-
- onChange(state) {
- this.setState(state);
- },
-
- getActions() {
- const { currentUser } = this.props;
- const { piece } = this.state;
-
- if (piece.notifications && piece.notifications.length > 0) {
- return (
- );
- }
- },
-
- loadPiece(pieceId = this.props.params.pieceId) {
- PieceActions.fetchPiece(pieceId);
- },
-
- render() {
- const { currentUser, selectedPrizeActionButton } = this.props;
- const { piece } = this.state;
-
- if (piece.id) {
- /*
-
- This really needs a refactor!
-
- - Tim
-
- */
- // Only show the artist name if you are the participant or if you are a judge and the piece is shortlisted
- let artistName;
- if ((currentUser.is_jury && !currentUser.is_judge) || (currentUser.is_judge && !piece.selected )) {
- artistName = ;
- setDocumentTitle(piece.title);
- } else {
- artistName = piece.artist_name;
- setDocumentTitle(`${artistName}, ${piece.title}`);
- }
-
- // Only show the artist email if you are a judge and the piece is shortlisted
- const artistEmail = currentUser.is_judge && piece.selected ? (
-
- ) : null;
-
- return (
-
-
-
- {piece.title}
-
-
- {artistEmail}
- {this.getActions()}
-
-
- }
- subheader={
-
- }>
-
-
- );
- } else {
- return (
-
- );
- }
- }
-});
-
-let NavigationHeader = React.createClass({
- propTypes: {
- currentUser: React.PropTypes.object.isRequired,
- piece: React.PropTypes.object.isRequired
- },
-
- render() {
- const { currentUser, piece } = this.props;
-
- if (currentUser.email && currentUser.is_judge && currentUser.is_jury && !currentUser.is_admin && piece.navigation) {
- const nav = piece.navigation;
-
- return (
-
-
-
-
- {getLangText('Previous')}
-
-
-
-
- {getLangText('Next')}
-
-
-
-
-
-
- );
- } else {
- return null;
- }
- }
-});
-
-
-let PrizePieceRatings = React.createClass({
- propTypes: {
- currentUser: React.PropTypes.object.isRequired,
- loadPiece: React.PropTypes.func.isRequired,
- piece: React.PropTypes.object.isRequired,
-
- selectedPrizeActionButton: React.PropTypes.func
- },
-
- getInitialState() {
- return mergeOptions(
- PieceListStore.getState(),
- PrizeStore.getState(),
- PrizeRatingStore.getInitialState()
- );
- },
-
- componentDidMount() {
- PrizeRatingStore.listen(this.onChange);
- PrizeStore.listen(this.onChange);
- PieceListStore.listen(this.onChange);
-
- PrizeActions.fetchPrize();
- this.fetchRatingsIfAuthorized();
- },
-
- componentWillReceiveProps(nextProps) {
- if (nextProps.currentUser.email !== this.props.currentUser.email) {
- this.fetchRatingsIfAuthorized();
- }
- },
-
- componentWillUnmount() {
- PieceListStore.unlisten(this.onChange);
- PrizeStore.unlisten(this.onChange);
- PrizeRatingStore.unlisten(this.onChange);
- },
-
- // The StarRating component does not have a property that lets us set
- // a default value at initialization. Since the ratingCache would otherwise on
- // every mouseover be overridden, we need to set it ourselves initially to deal
- // with the problem.
- onChange(state) {
- if (state.prize && state.prize.active_round != this.state.prize.active_round) {
- this.fetchRatingsIfAuthorized(state);
- }
-
- this.setState(state);
-
- if (this.refs.rating) {
- this.refs.rating.state.ratingCache = {
- pos: this.refs.rating.state.pos,
- rating: this.state.currentRating,
- caption: this.refs.rating.props.caption,
- name: this.refs.rating.props.name
- };
- }
- },
-
- fetchRatingsIfAuthorized(state = this.state) {
- const { currentUser: {
- is_admin: isAdmin,
- is_judge: isJudge,
- is_jury: isJury
- },
- piece: { id: pieceId } } = this.props;
-
- if (state.prize && 'active_round' in state.prize && (isAdmin || isJudge || isJury)) {
- PrizeRatingActions.fetchOne(pieceId, state.prize.active_round);
- PrizeRatingActions.fetchAverage(pieceId, state.prize.active_round);
- }
- },
-
- onRatingClick(event, args) {
- event.preventDefault();
- PrizeRatingActions
- .createRating(this.props.piece.id, args.rating, this.state.prize.active_round)
- .then(this.refreshPieceData);
- },
-
- getSelectedActionButton() {
- const { currentUser, piece, selectedPrizeActionButton: SelectedPrizeActionButton } = this.props;
-
- if (piece.selected && SelectedPrizeActionButton) {
- return (
-
-
-
- );
- }
- },
-
- refreshPieceData() {
- const { filterBy, orderAsc, orderBy, page, pageSize, search } = this.state;
-
- this.props.loadPiece();
- PieceListActions.fetchPieceList({ page, pageSize, search, orderBy, orderAsc, filterBy });
- },
-
- onSelectChange() {
- PrizeRatingActions
- .toggleShortlist(this.props.piece.id)
- .then((res) => {
- this.refreshPieceData();
-
- if (res && res.notification) {
- const notification = new GlobalNotificationModel(res.notification, 'success', 2000);
- GlobalNotificationActions.appendGlobalNotification(notification);
- }
- });
- },
-
- render() {
- if (this.props.piece.id && this.props.currentUser.is_judge && this.state.average) {
- // Judge sees shortlisting, average and per-jury notes
- return (
-
-
-
-
-
-
- {getLangText('Select for the prize')}
-
-
-
- {this.getSelectedActionButton()}
-
-
-
-
-
-
-
-
- {this.state.ratings.map((item, i) => {
- let note = item.note ? (
-
- note: {item.note}
-
- ) : null;
-
- return (
-
-
-
-
-
- {item.user}
- {note}
-
-
- );
- })}
-
-
-
);
- } else if (this.props.currentUser.is_jury) {
- // Jury can set rating and note
- return (
-
-
-
-
- ({ 'piece_id': this.props.piece.id })}
- label={getLangText('Jury note')}
- defaultValue={this.props.piece.note_from_user || null}
- placeholder={getLangText('Enter your comments ...')}
- editable={true}
- successMessage={getLangText('Jury note saved')}
- url={ApiUrls.notes}
- currentUser={this.props.currentUser} />
- );
- } else {
- return null;
- }
- }
-});
-
-
-let PrizePieceDetails = React.createClass({
- propTypes: {
- piece: React.PropTypes.object.isRequired
- },
-
- render() {
- const { piece } = this.props;
-
- if (piece.prize && piece.prize.name && Object.keys(piece.extra_data).length) {
- return (
-
-
-
- );
- } else {
- return null;
- }
- }
-});
-
-export default PrizePieceContainer;
diff --git a/js/components/whitelabel/prize/simple_prize/components/prize_hero.js b/js/components/whitelabel/prize/simple_prize/components/prize_hero.js
deleted file mode 100644
index 8842acf9..00000000
--- a/js/components/whitelabel/prize/simple_prize/components/prize_hero.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-import React from 'react';
-import constants from '../../../../../constants/application_constants';
-
-
-let Hero = React.createClass({
- render() {
- return (
-
-
-
- );
- }
-});
-
-export default Hero;
diff --git a/js/components/whitelabel/prize/simple_prize/components/prize_landing.js b/js/components/whitelabel/prize/simple_prize/components/prize_landing.js
deleted file mode 100644
index a0dc4726..00000000
--- a/js/components/whitelabel/prize/simple_prize/components/prize_landing.js
+++ /dev/null
@@ -1,111 +0,0 @@
-'use strict';
-
-import React from 'react';
-
-import Button from 'react-bootstrap/lib/Button';
-import ButtonGroup from 'react-bootstrap/lib/ButtonGroup';
-
-import LinkContainer from 'react-router-bootstrap/lib/LinkContainer';
-
-import PrizeActions from '../actions/prize_actions';
-import PrizeStore from '../stores/prize_store';
-
-import { getLangText } from '../../../../../utils/lang_utils';
-
-
-let Landing = React.createClass({
- propTypes: {
- // Provided from PrizeApp
- currentUser: React.PropTypes.object,
- whitelabel: React.PropTypes.object,
-
- // Provided from router
- location: React.PropTypes.object
- },
-
- getInitialState() {
- return PrizeStore.getState();
- },
-
- componentDidMount() {
- PrizeStore.listen(this.onChange);
- PrizeActions.fetchPrize();
- },
-
- componentWillUnmount() {
- PrizeStore.unlisten(this.onChange);
- },
-
- onChange(state) {
- this.setState(state);
- },
-
- getButtons() {
- if (this.state.prize && this.state.prize.active) {
- return (
-
-
-
- {getLangText('Sign up to submit')}
-
-
-
-
- {getLangText('or, already an ascribe user?')}
-
-
-
- {getLangText('Log in to submit')}
-
-
-
- );
- } else {
- return (
-
-
- {getLangText('Sign up to ascribe')}
-
-
-
- {getLangText('or, already an ascribe user?')}
-
-
-
- {getLangText('Log in')}
-
-
-
- );
- }
- },
-
- getTitle() {
- const { prize } = this.state;
-
- return (
-
- {getLangText(prize && prize.active ? 'This is the submission page for Sluice_screens ↄc Prize 2015.'
- : 'Submissions for Sluice_screens ↄc Prize 2015 are now closed.')}
-
- );
- },
-
- render() {
- return (
-
-
-
-
- {getLangText('Sluice_screens ↄc Prize 2015')}
-
- {this.getTitle()}
- {this.getButtons()}
-
-
-
- );
- }
-});
-
-export default Landing;
diff --git a/js/components/whitelabel/prize/simple_prize/components/prize_login_container.js b/js/components/whitelabel/prize/simple_prize/components/prize_login_container.js
deleted file mode 100644
index 62ef5adb..00000000
--- a/js/components/whitelabel/prize/simple_prize/components/prize_login_container.js
+++ /dev/null
@@ -1,45 +0,0 @@
-'use strict';
-
-import React from 'react';
-import { Link } from 'react-router';
-
-import LoginForm from '../../../../ascribe_forms/form_login';
-
-import { getLangText } from '../../../../../utils/lang_utils';
-import { setDocumentTitle } from '../../../../../utils/dom_utils';
-
-
-let LoginContainer = React.createClass({
- propTypes: {
- // Provided from PrizeApp
- currentUser: React.PropTypes.object,
- whitelabel: React.PropTypes.object,
-
- // Provided from router
- location: React.PropTypes.object
- },
-
- render() {
- setDocumentTitle(getLangText('Log in'));
-
- return (
-
-
-
- {getLangText('I\'m not a user') + ' '}
- {getLangText('Sign up...')}
-
-
- {getLangText('I forgot my password') + ' '}
- {getLangText('Rescue me...')}
-
-
- );
- }
-});
-
-
-
-export default LoginContainer;
diff --git a/js/components/whitelabel/prize/simple_prize/components/prize_piece_list.js b/js/components/whitelabel/prize/simple_prize/components/prize_piece_list.js
deleted file mode 100644
index c20ee27d..00000000
--- a/js/components/whitelabel/prize/simple_prize/components/prize_piece_list.js
+++ /dev/null
@@ -1,94 +0,0 @@
-'use strict';
-
-import React from 'react';
-
-import Button from 'react-bootstrap/lib/Button';
-import LinkContainer from 'react-router-bootstrap/lib/LinkContainer';
-
-import PrizeActions from '../actions/prize_actions';
-import PrizeStore from '../stores/prize_store';
-
-import AccordionListItemPrize from './ascribe_accordion_list/accordion_list_item_prize';
-import PieceList from '../../../../piece_list';
-
-import { mergeOptions } from '../../../../../utils/general_utils';
-import { getLangText } from '../../../../../utils/lang_utils';
-import { setDocumentTitle } from '../../../../../utils/dom_utils';
-
-let PrizePieceList = React.createClass({
- propTypes: {
- // Provided from PrizeApp
- currentUser: React.PropTypes.object.isRequired,
- whitelabel: React.PropTypes.object,
-
- // Provided from router
- location: React.PropTypes.object
- },
-
- getInitialState() {
- return PrizeStore.getState();
- },
-
- componentDidMount() {
- PrizeStore.listen(this.onChange);
- PrizeActions.fetchPrize();
- },
-
- componentWillUnmount() {
- PrizeStore.unlisten(this.onChange);
- },
-
- onChange(state) {
- this.setState(state);
- },
-
- getButtonSubmit() {
- const { currentUser } = this.props;
- const { prize } = this.state;
- if (prize && prize.active && !currentUser.is_jury && !currentUser.is_admin && !currentUser.is_judge) {
- return (
-
-
- {getLangText('Submit to prize')}
-
-
- );
- } else {
- return null;
- }
- },
-
- shouldRedirect(pieceCount) {
- const { currentUser } = this.props;
-
- return !currentUser.is_admin && !currentUser.is_jury && !currentUser.is_judge && !pieceCount;
- },
-
- render() {
- const { currentUser, location } = this.props;
-
- setDocumentTitle(getLangText('Collection'));
-
- let orderParams = ['artist_name', 'title'];
- if (currentUser.is_jury) {
- orderParams = ['rating', 'title'];
- }
- if (currentUser.is_judge) {
- orderParams = ['rating', 'title', 'selected'];
- }
-
- return (
-
- );
- }
-});
-
-export default PrizePieceList;
diff --git a/js/components/whitelabel/prize/simple_prize/components/prize_register_piece.js b/js/components/whitelabel/prize/simple_prize/components/prize_register_piece.js
deleted file mode 100644
index 12e6af27..00000000
--- a/js/components/whitelabel/prize/simple_prize/components/prize_register_piece.js
+++ /dev/null
@@ -1,102 +0,0 @@
-'use strict';
-
-import React from 'react';
-
-import PrizeActions from '../actions/prize_actions';
-import PrizeStore from '../stores/prize_store';
-
-import RegisterPiece from '../../../../register_piece';
-import Property from '../../../../ascribe_forms/property';
-import InputTextAreaToggable from '../../../../ascribe_forms/input_textarea_toggable';
-import InputCheckbox from '../../../../ascribe_forms/input_checkbox';
-
-import { getLangText } from '../../../../../utils/lang_utils';
-import { setDocumentTitle } from '../../../../../utils/dom_utils';
-
-
-let PrizeRegisterPiece = React.createClass({
- propTypes: {
- // Provided from PrizeApp
- currentUser: React.PropTypes.object,
- whitelabel: React.PropTypes.object,
-
- // Provided from router
- location: React.PropTypes.object
- },
-
- getInitialState() {
- return PrizeStore.getState();
- },
-
- componentDidMount() {
- PrizeStore.listen(this.onChange);
- PrizeActions.fetchPrize();
- },
-
- componentWillUnmount() {
- PrizeStore.unlisten(this.onChange);
- },
-
- onChange(state) {
- this.setState(state);
- },
-
- render() {
- const { prize } = this.state;
-
- setDocumentTitle(getLangText('Submit to the prize'));
-
- if (prize && prize.active) {
- return (
-
-
-
-
-
-
-
-
-
-
- {' ' + getLangText('I agree to the Terms of Service the art price') + ' '}
- (
- {getLangText('read')}
- )
-
-
-
-
- );
- } else {
- return (
-
-
- {getLangText('The prize is no longer active')}
-
-
- );
- }
- }
-});
-
-export default PrizeRegisterPiece;
diff --git a/js/components/whitelabel/prize/simple_prize/components/prize_settings_container.js b/js/components/whitelabel/prize/simple_prize/components/prize_settings_container.js
deleted file mode 100644
index d12979ef..00000000
--- a/js/components/whitelabel/prize/simple_prize/components/prize_settings_container.js
+++ /dev/null
@@ -1,302 +0,0 @@
-'use strict';
-
-import React from 'react';
-
-import PrizeActions from '../actions/prize_actions';
-import PrizeStore from '../stores/prize_store';
-import PrizeJuryActions from '../actions/prize_jury_actions';
-import PrizeJuryStore from '../stores/prize_jury_store';
-
-import SettingsContainer from '../../../../ascribe_settings/settings_container';
-import CollapsibleParagraph from '../../../../ascribe_collapsible/collapsible_paragraph';
-
-import Form from '../../../../ascribe_forms/form';
-import Property from '../../../../ascribe_forms/property';
-
-import ActionPanel from '../../../../ascribe_panel/action_panel';
-
-import GlobalNotificationModel from '../../../../../models/global_notification_model';
-import GlobalNotificationActions from '../../../../../actions/global_notification_actions';
-
-import AscribeSpinner from '../../../../ascribe_spinner';
-import ApiUrls from '../../../../../constants/api_urls';
-
-import { getLangText } from '../../../../../utils/lang_utils';
-import { setDocumentTitle } from '../../../../../utils/dom_utils';
-
-
-let Settings = React.createClass({
- propTypes: {
- // Provided from PrizeApp
- currentUser: React.PropTypes.object.isRequired,
- whitelabel: React.PropTypes.object,
-
- // Provided from router
- location: React.PropTypes.object
- },
-
- render() {
- setDocumentTitle(getLangText('Account settings'));
-
- return (
-
- {this.props.currentUser.is_admin ? : null}
-
- );
- }
-});
-
-let PrizeSettings = React.createClass({
- getInitialState() {
- return PrizeStore.getState();
- },
-
- componentDidMount() {
- PrizeStore.listen(this.onChange);
- PrizeActions.fetchPrize();
- },
-
- componentWillUnmount() {
- PrizeStore.unlisten(this.onChange);
- },
-
- onChange(state) {
- this.setState(state);
- },
- render() {
- return (
-
-
-
-
- );
- }
-});
-
-let PrizeJurySettings = React.createClass({
- propTypes: {
- prize: React.PropTypes.object
- },
-
- getInitialState() {
- return PrizeJuryStore.getState();
- },
-
- componentDidMount() {
- PrizeJuryStore.listen(this.onChange);
- PrizeJuryActions.fetchJury();
- },
-
- componentWillUnmount() {
- PrizeJuryStore.unlisten(this.onChange);
- },
-
- onChange(state) {
- this.setState(state);
- },
-
- handleCreateSuccess(response) {
- PrizeJuryActions.fetchJury();
- this.displayNotification(response);
- this.refs.form.refs.email.refs.input.getDOMNode().value = null;
- },
-
- handleActivate(event) {
- let email = event.target.getAttribute('data-id');
- PrizeJuryActions
- .activateJury(email)
- .then((response) => {
- PrizeJuryActions.fetchJury();
- this.displayNotification(response);
- });
- },
-
- handleRevoke(event) {
- let email = event.target.getAttribute('data-id');
- PrizeJuryActions
- .revokeJury(email)
- .then(this.displayNotification);
- },
-
- handleResend(event) {
- let email = event.target.getAttribute('data-id');
- PrizeJuryActions
- .resendJuryInvitation(email)
- .then(this.displayNotification);
- },
-
- displayNotification(response) {
- let notification = new GlobalNotificationModel(response.notification, 'success', 5000);
- GlobalNotificationActions.appendGlobalNotification(notification);
- },
-
- getMembersPending() {
- return this.state.membersPending.map(function(member, i) {
- return (
-
-
- {member.email}
-
-
- {member.status}
-
-
- }
- buttons={
-
-
- {getLangText('RESEND')}
-
-
- {getLangText('REVOKE')}
-
-
- }/>
- );
- }, this);
- },
- getMembersActive() {
- return this.state.membersActive.map(function(member, i) {
- return (
-
-
- {member.email}
-
-
- {member.status}
-
-
- }
- buttons={
-
- {getLangText('REVOKE')}
-
- }/>
- );
-
- }, this);
- },
- getMembersInactive() {
- return this.state.membersInactive.map(function(member, i) {
- return (
-
-
- {member.email}
-
-
- {member.status}
-
-
- }
- buttons={
-
- {getLangText('ACTIVATE')}
-
- }/>
- );
-
- }, this);
- },
-
- getMembers() {
- let content = ;
- if (this.state.members.length > -1) {
- content = (
-
-
- {this.getMembersActive()}
-
-
- {this.getMembersPending()}
-
-
- {this.getMembersInactive()}
-
-
);
- }
- return content;
- },
- render() {
- return (
-
-
- {this.getMembers()}
-
- );
- }
-});
-
-
-export default Settings;
diff --git a/js/components/whitelabel/prize/simple_prize/components/prize_signup_container.js b/js/components/whitelabel/prize/simple_prize/components/prize_signup_container.js
deleted file mode 100644
index 1f8ba91a..00000000
--- a/js/components/whitelabel/prize/simple_prize/components/prize_signup_container.js
+++ /dev/null
@@ -1,61 +0,0 @@
-'use strict';
-
-import React from 'react';
-import SignupForm from '../../../../ascribe_forms/form_signup';
-
-import { getLangText } from '../../../../../utils/lang_utils';
-import { setDocumentTitle } from '../../../../../utils/dom_utils';
-
-let SignupContainer = React.createClass({
- propTypes: {
- // Provided from PrizeApp
- currentUser: React.PropTypes.object,
- whitelabel: React.PropTypes.object,
-
- // Provided from router
- location: React.PropTypes.object
- },
-
- getInitialState() {
- return {
- submitted: false,
- message: null
- };
- },
-
- handleSuccess(message) {
- this.setState({
- submitted: true,
- message: message
- });
- },
-
- render() {
- const { location } = this.props;
- const { message, submitted } = this.state;
- setDocumentTitle(getLangText('Sign up'));
-
- if (submitted) {
- return (
-
- );
- } else {
- return (
-
-
-
- );
- }
- }
-});
-
-
-export default SignupContainer;
diff --git a/js/components/whitelabel/prize/simple_prize/fetchers/prize_fetcher.js b/js/components/whitelabel/prize/simple_prize/fetchers/prize_fetcher.js
deleted file mode 100644
index 410d63a2..00000000
--- a/js/components/whitelabel/prize/simple_prize/fetchers/prize_fetcher.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-import requests from '../../../../../utils/requests';
-
-
-let PrizeFetcher = {
- fetch() {
- return requests.get('prize');
- }
-};
-
-export default PrizeFetcher;
diff --git a/js/components/whitelabel/prize/simple_prize/fetchers/prize_jury_fetcher.js b/js/components/whitelabel/prize/simple_prize/fetchers/prize_jury_fetcher.js
deleted file mode 100644
index 973107b4..00000000
--- a/js/components/whitelabel/prize/simple_prize/fetchers/prize_jury_fetcher.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-import requests from '../../../../../utils/requests';
-
-
-let PrizeJuryFetcher = {
- fetch() {
- return requests.get('jurys');
- },
-
- activate(email) {
- return requests.post('jury_activate', {'email': email});
- },
-
- delete(email) {
- return requests.delete('jury', {'email': email});
- },
-
- resend(email) {
- return requests.post('jury_resend', {'email': email});
- }
-};
-
-export default PrizeJuryFetcher;
diff --git a/js/components/whitelabel/prize/simple_prize/fetchers/prize_rating_fetcher.js b/js/components/whitelabel/prize/simple_prize/fetchers/prize_rating_fetcher.js
deleted file mode 100644
index e2f20d93..00000000
--- a/js/components/whitelabel/prize/simple_prize/fetchers/prize_rating_fetcher.js
+++ /dev/null
@@ -1,49 +0,0 @@
-'use strict';
-
-import requests from '../../../../../utils/requests';
-
-
-let PrizeRatingFetcher = {
- fetchAverage(pieceId, round) {
- const params = {
- 'piece_id': pieceId
- };
-
- if (typeof round === 'number') {
- params['prize_round'] = round;
- }
-
- return requests.get('rating_average', params);
- },
-
- fetchOne(pieceId, round) {
- const params = {
- 'piece_id': pieceId
- };
-
- if (typeof round === 'number') {
- params['prize_round'] = round;
- }
-
- return requests.get('rating', params);
- },
-
- rate(pieceId, rating, round) {
- const body = {
- 'piece_id': pieceId,
- 'note': rating
- };
-
- if (typeof round === 'number') {
- body['prize_round'] = round;
- }
-
- return requests.post('ratings', { body });
- },
-
- select(pieceId) {
- return requests.post('select_piece', {'piece_id': pieceId});
- }
-};
-
-export default PrizeRatingFetcher;
diff --git a/js/components/whitelabel/prize/simple_prize/prize_app.js b/js/components/whitelabel/prize/simple_prize/prize_app.js
deleted file mode 100644
index 43d7ebc9..00000000
--- a/js/components/whitelabel/prize/simple_prize/prize_app.js
+++ /dev/null
@@ -1,61 +0,0 @@
-'use strict';
-
-import React from 'react';
-import classNames from 'classnames';
-
-import Hero from './components/prize_hero';
-
-import AppBase from '../../../app_base';
-import AppRouteWrapper from '../../../app_route_wrapper';
-import Header from '../../../header';
-
-import { getSubdomain } from '../../../../utils/general_utils';
-
-
-let PrizeApp = React.createClass({
- propTypes: {
- activeRoute: React.PropTypes.object.isRequired,
- children: React.PropTypes.element.isRequired,
- history: React.PropTypes.object.isRequired,
- routes: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
-
- // Provided from AppBase
- currentUser: React.PropTypes.object,
- whitelabel: React.PropTypes.object
- },
-
- render() {
- const { activeRoute, children, currentUser, history, routes, whitelabel } = this.props;
- const subdomain = getSubdomain();
- const path = activeRoute && activeRoute.path;
- const Footer = activeRoute && activeRoute.footer;
-
- let header = null;
- // if the path of the current activeRoute is not defined, then this is the IndexRoute
- if (!path || history.isActive('/login') || history.isActive('/signup')) {
- header = ( );
- } else {
- header = (
-
- );
- }
-
- return (
-
- {header}
-
- {/* Routes are injected here */}
- {children}
-
- {Footer ?
: null}
-
- );
- }
-});
-
-export default AppBase(PrizeApp);
diff --git a/js/components/whitelabel/prize/simple_prize/stores/prize_jury_store.js b/js/components/whitelabel/prize/simple_prize/stores/prize_jury_store.js
deleted file mode 100644
index 536b8633..00000000
--- a/js/components/whitelabel/prize/simple_prize/stores/prize_jury_store.js
+++ /dev/null
@@ -1,35 +0,0 @@
-'use strict';
-
-import { alt } from '../../../../../alt';
-
-import PrizeJuryActions from '../actions/prize_jury_actions';
-
-class PrizeJuryStore {
- constructor() {
- this.members = [];
- this.membersActive = [];
- this.membersPending = [];
- this.membersInactive = [];
- this.bindActions(PrizeJuryActions);
- }
-
- onUpdatePrizeJury( members ) {
- this.members = members;
- this.splitJuryMembers();
- }
-
- onRemovePrizeJury( email ) {
- let memberInactive = this.members.filter((item)=> item.email === email );
- this.membersActive = this.membersActive.filter((item)=> item.email !== email );
- this.membersPending = this.membersPending.filter((item)=> item.email !== email );
- this.membersInactive = this.membersInactive.concat(memberInactive);
- }
-
- splitJuryMembers(){
- this.membersActive = this.members.filter((item)=> item.status === 'Invitation accepted' );
- this.membersPending = this.members.filter((item)=> item.status === 'Invitation pending' );
- this.membersInactive = this.members.filter((item)=> item.status === 'Deactivated' );
- }
-}
-
-export default alt.createStore(PrizeJuryStore, 'PrizeJuryStore');
\ No newline at end of file
diff --git a/js/components/whitelabel/prize/simple_prize/stores/prize_rating_store.js b/js/components/whitelabel/prize/simple_prize/stores/prize_rating_store.js
deleted file mode 100644
index d3544f71..00000000
--- a/js/components/whitelabel/prize/simple_prize/stores/prize_rating_store.js
+++ /dev/null
@@ -1,47 +0,0 @@
-'use strict';
-
-import { alt } from '../../../../../alt';
-
-import PrizeRatingActions from '../actions/prize_rating_actions';
-
-class PrizeRatingStore {
- constructor() {
- this.getInitialState();
-
- this.bindActions(PrizeRatingActions);
- this.exportPublicMethods({
- getInitialState: this.getInitialState.bind(this)
- });
- }
-
- getInitialState() {
- this.ratings = [];
- this.currentRating = null;
- this.average = null;
-
- return {
- ratings: this.ratings,
- currentRating: this.currentRating,
- average: this.average
- };
- }
-
- onUpdatePrizeRatings(ratings) {
- this.ratings = ratings;
- }
-
- onUpdatePrizeRating(rating) {
- this.currentRating = parseInt(rating, 10);
- }
-
- onUpdatePrizeRatingAverage(data) {
- this.average = data.average;
- this.ratings = data.ratings;
- }
-
- onResetPrizeRatings() {
- this.getInitialState();
- }
-}
-
-export default alt.createStore(PrizeRatingStore, 'PrizeRatingStore');
diff --git a/js/components/whitelabel/prize/simple_prize/stores/prize_store.js b/js/components/whitelabel/prize/simple_prize/stores/prize_store.js
deleted file mode 100644
index d54ab549..00000000
--- a/js/components/whitelabel/prize/simple_prize/stores/prize_store.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-import { alt } from '../../../../../alt';
-
-import PrizeActions from '../actions/prize_actions';
-
-class PrizeStore {
- constructor() {
- this.prize = {};
- this.bindActions(PrizeActions);
- }
-
- onUpdatePrize({ prize }) {
- this.prize = prize;
- }
-}
-
-export default alt.createStore(PrizeStore, 'PrizeStore');
diff --git a/js/components/whitelabel/prize/sluice/components/sluice_buttons/sluice_selected_prize_action_button.js b/js/components/whitelabel/prize/sluice/components/sluice_buttons/sluice_selected_prize_action_button.js
deleted file mode 100644
index 59cf0832..00000000
--- a/js/components/whitelabel/prize/sluice/components/sluice_buttons/sluice_selected_prize_action_button.js
+++ /dev/null
@@ -1,71 +0,0 @@
-'use strict';
-
-import React from 'react';
-import Moment from 'moment';
-
-import ModalWrapper from '../../../../../ascribe_modal/modal_wrapper';
-
-import LoanForm from '../../../../../ascribe_forms/form_loan';
-
-import GlobalNotificationModel from '../../../../../../models/global_notification_model';
-import GlobalNotificationActions from '../../../../../../actions/global_notification_actions';
-
-import ApiUrls from '../../../../../../constants/api_urls';
-
-import { getLangText } from '../../../../../../utils/lang_utils';
-
-const SluiceSelectedPrizeActionButton = React.createClass({
- propTypes: {
- currentUser: React.PropTypes.object.isRequired,
- piece: React.PropTypes.object.isRequired,
-
- startLoanDate: React.PropTypes.object,
- endLoanDate: React.PropTypes.object,
- className: React.PropTypes.string,
- handleSuccess: React.PropTypes.func
- },
-
- handleSuccess(res) {
- const notification = new GlobalNotificationModel(res && res.notification || getLangText('You have successfully requested the loan, pending their confirmation.'), 'success', 4000);
- GlobalNotificationActions.appendGlobalNotification(notification);
-
- if (typeof this.props.handleSuccess === 'function') {
- this.props.handleSuccess(res);
- }
- },
-
- render() {
- const { currentUser, piece } = this.props;
-
- // Can't use default props since those are only created once
- const startLoanDate = this.props.startLoanDate || new Moment();
- const endLoanDate = this.props.endLoanDate || new Moment().add(6, 'months');
-
- return (
-
- {getLangText('SEND LOAN REQUEST')}
-
- }
- handleSuccess={this.handleSuccess}
- title={getLangText('REQUEST LOAN')}>
-
-
- );
- }
-});
-
-export default SluiceSelectedPrizeActionButton;
-
diff --git a/js/components/whitelabel/prize/sluice/components/sluice_detail/sluice_piece_container.js b/js/components/whitelabel/prize/sluice/components/sluice_detail/sluice_piece_container.js
deleted file mode 100644
index c4e75df1..00000000
--- a/js/components/whitelabel/prize/sluice/components/sluice_detail/sluice_piece_container.js
+++ /dev/null
@@ -1,29 +0,0 @@
-'use strict';
-
-import React from 'react';
-
-import SluiceSelectedPrizeActionButton from '../sluice_buttons/sluice_selected_prize_action_button';
-
-import PrizePieceContainer from '../../../simple_prize/components/ascribe_detail/prize_piece_container';
-
-const SluicePieceContainer = React.createClass({
- propTypes: {
- // Provided from PrizeApp
- currentUser: React.PropTypes.object,
- whitelabel: React.PropTypes.object,
-
- // Provided from router
- location: React.PropTypes.object,
- params: React.PropTypes.object
- },
-
- render() {
- return (
-
- );
- }
-});
-
-export default SluicePieceContainer;
diff --git a/js/components/whitelabel/wallet/components/23vivi/23vivi_piece_list.js b/js/components/whitelabel/wallet/components/23vivi/23vivi_piece_list.js
index e8bcabfc..9226c71d 100644
--- a/js/components/whitelabel/wallet/components/23vivi/23vivi_piece_list.js
+++ b/js/components/whitelabel/wallet/components/23vivi/23vivi_piece_list.js
@@ -8,7 +8,7 @@ import MarketPieceList from '../market/market_piece_list';
let Vivi23PieceList = React.createClass({
propTypes: {
- // Provided from PrizeApp
+ // Provided from WalletApp
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
diff --git a/js/components/whitelabel/wallet/components/artcity/artcity_landing.js b/js/components/whitelabel/wallet/components/artcity/artcity_landing.js
index 45f885d5..f00d4732 100644
--- a/js/components/whitelabel/wallet/components/artcity/artcity_landing.js
+++ b/js/components/whitelabel/wallet/components/artcity/artcity_landing.js
@@ -11,7 +11,7 @@ import { setDocumentTitle } from '../../../../../utils/dom_utils';
let ArtcityLanding = React.createClass({
propTypes: {
- // Provided from PrizeApp
+ // Provided from WalletApp
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object.isRequired
},
diff --git a/js/components/whitelabel/wallet/components/cyland/cyland_detail/cyland_piece_container.js b/js/components/whitelabel/wallet/components/cyland/cyland_detail/cyland_piece_container.js
index f8b2de97..bd7f2cec 100644
--- a/js/components/whitelabel/wallet/components/cyland/cyland_detail/cyland_piece_container.js
+++ b/js/components/whitelabel/wallet/components/cyland/cyland_detail/cyland_piece_container.js
@@ -31,7 +31,7 @@ import { mergeOptions } from '../../../../../../utils/general_utils';
let CylandPieceContainer = React.createClass({
propTypes: {
- // Provided from PrizeApp
+ // Provided from WalletApp
currentUser: React.PropTypes.object.isRequired,
whitelabel: React.PropTypes.object,
diff --git a/js/components/whitelabel/wallet/components/cyland/cyland_landing.js b/js/components/whitelabel/wallet/components/cyland/cyland_landing.js
index bebc1816..ca064544 100644
--- a/js/components/whitelabel/wallet/components/cyland/cyland_landing.js
+++ b/js/components/whitelabel/wallet/components/cyland/cyland_landing.js
@@ -14,7 +14,7 @@ import { setDocumentTitle } from '../../../../../utils/dom_utils';
let CylandLanding = React.createClass({
propTypes: {
- // Provided from PrizeApp
+ // Provided from WalletApp
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object.isRequired,
diff --git a/js/components/whitelabel/wallet/components/cyland/cyland_piece_list.js b/js/components/whitelabel/wallet/components/cyland/cyland_piece_list.js
index e441b492..329976bf 100644
--- a/js/components/whitelabel/wallet/components/cyland/cyland_piece_list.js
+++ b/js/components/whitelabel/wallet/components/cyland/cyland_piece_list.js
@@ -10,7 +10,7 @@ import { setDocumentTitle } from '../../../../../utils/dom_utils';
let CylandPieceList = React.createClass({
propTypes: {
- // Provided from PrizeApp
+ // Provided from WalletApp
currentUser: React.PropTypes.object.isRequired,
whitelabel: React.PropTypes.object.isRequired,
diff --git a/js/components/whitelabel/wallet/components/cyland/cyland_register_piece.js b/js/components/whitelabel/wallet/components/cyland/cyland_register_piece.js
index a04ad691..67d15fb6 100644
--- a/js/components/whitelabel/wallet/components/cyland/cyland_register_piece.js
+++ b/js/components/whitelabel/wallet/components/cyland/cyland_register_piece.js
@@ -36,7 +36,7 @@ import { getAclFormMessage } from '../../../../../utils/form_utils';
let CylandRegisterPiece = React.createClass({
propTypes: {
- // Provided from PrizeApp
+ // Provided from WalletApp
currentUser: React.PropTypes.object.isRequired,
whitelabel: React.PropTypes.object.isRequired,
diff --git a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_contract_notifications.js b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_contract_notifications.js
index a08c56e4..388cf283 100644
--- a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_contract_notifications.js
+++ b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_contract_notifications.js
@@ -25,7 +25,7 @@ import { setDocumentTitle } from '../../../../../utils/dom_utils';
let IkonotvContractNotifications = React.createClass({
propTypes: {
- // Provided from PrizeApp
+ // Provided from WalletApp
currentUser: React.PropTypes.object.isRequired,
whitelabel: React.PropTypes.object.isRequired,
diff --git a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_detail/ikonotv_piece_container.js b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_detail/ikonotv_piece_container.js
index f6157c53..a1f7bab4 100644
--- a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_detail/ikonotv_piece_container.js
+++ b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_detail/ikonotv_piece_container.js
@@ -32,7 +32,7 @@ import { mergeOptions } from '../../../../../../utils/general_utils';
let IkonotvPieceContainer = React.createClass({
propTypes: {
- // Provided from PrizeApp
+ // Provided from WalletApp
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
diff --git a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_landing.js b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_landing.js
index e1e07dd5..df535710 100644
--- a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_landing.js
+++ b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_landing.js
@@ -12,7 +12,7 @@ import { setDocumentTitle } from '../../../../../utils/dom_utils';
let IkonotvLanding = React.createClass({
propTypes: {
- // Provided from PrizeApp
+ // Provided from WalletApp
currentUser: React.PropTypes.object.isRequired,
whitelabel: React.PropTypes.object,
diff --git a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_piece_list.js b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_piece_list.js
index defabec2..c7c7e804 100644
--- a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_piece_list.js
+++ b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_piece_list.js
@@ -14,7 +14,7 @@ import { getLangText } from '../../../../../utils/lang_utils';
let IkonotvPieceList = React.createClass({
propTypes: {
- // Provided from PrizeApp
+ // Provided from WalletApp
currentUser: React.PropTypes.object.isRequired,
whitelabel: React.PropTypes.object.isRequired,
diff --git a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js
index bb46d76d..e7864f7b 100644
--- a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js
+++ b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js
@@ -34,7 +34,7 @@ let IkonotvRegisterPiece = React.createClass({
propTypes: {
handleSuccess: React.PropTypes.func,
- // Provided from PrizeApp
+ // Provided from WalletApp
currentUser: React.PropTypes.object.isRequired,
whitelabel: React.PropTypes.object.isRequired,
diff --git a/js/components/whitelabel/wallet/components/lumenus/lumenus_landing.js b/js/components/whitelabel/wallet/components/lumenus/lumenus_landing.js
index 093b0ad1..f7d70f4c 100644
--- a/js/components/whitelabel/wallet/components/lumenus/lumenus_landing.js
+++ b/js/components/whitelabel/wallet/components/lumenus/lumenus_landing.js
@@ -11,7 +11,7 @@ import { setDocumentTitle } from '../../../../../utils/dom_utils';
let LumenusLanding = React.createClass({
propTypes: {
- // Provided from PrizeApp
+ // Provided from WalletApp
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object.isRequired,
diff --git a/js/components/whitelabel/wallet/components/market/market_piece_list.js b/js/components/whitelabel/wallet/components/market/market_piece_list.js
index 16466e37..188e4d8b 100644
--- a/js/components/whitelabel/wallet/components/market/market_piece_list.js
+++ b/js/components/whitelabel/wallet/components/market/market_piece_list.js
@@ -14,7 +14,7 @@ let MarketPieceList = React.createClass({
propTypes: {
customThumbnailPlaceholder: React.PropTypes.func,
- // Provided from PrizeApp
+ // Provided from WalletApp
currentUser: React.PropTypes.object.isRequired,
whitelabel: React.PropTypes.object.isRequired,
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 ef685270..b3d467f4 100644
--- a/js/components/whitelabel/wallet/components/market/market_register_piece.js
+++ b/js/components/whitelabel/wallet/components/market/market_register_piece.js
@@ -25,7 +25,7 @@ import { mergeOptions } from '../../../../../utils/general_utils';
let MarketRegisterPiece = React.createClass({
propTypes: {
- // Provided from PrizeApp
+ // Provided from WalletApp
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object.isRequired,
diff --git a/js/constants/api_urls.js b/js/constants/api_urls.js
index e9f47369..1690f431 100644
--- a/js/constants/api_urls.js
+++ b/js/constants/api_urls.js
@@ -2,7 +2,6 @@
import AppConstants from './application_constants';
-import getPrizeApiUrls from '../components/whitelabel/prize/constants/prize_api_urls';
import getWalletApiUrls from '../components/whitelabel/wallet/constants/wallet_api_urls';
import { update } from '../utils/general_utils';
@@ -81,14 +80,9 @@ let ApiUrls = {
export function updateApiUrls(type, subdomain) {
- let newUrls = {};
-
- if (type === 'prize') {
- newUrls = getPrizeApiUrls(subdomain);
- } else if(type === 'wallet') {
- newUrls = getWalletApiUrls(subdomain);
+ if (type === 'wallet') {
+ update(getWalletApiUrls(subdomain));
}
- update(ApiUrls, newUrls);
}
export default ApiUrls;
diff --git a/js/constants/application_constants.js b/js/constants/application_constants.js
index d32d9603..fd73e568 100644
--- a/js/constants/application_constants.js
+++ b/js/constants/application_constants.js
@@ -27,12 +27,6 @@ const constants = {
'type': 'wallet',
'ga': 'UA-60614729-4'
},
- {
- 'subdomain': 'sluice',
- 'name': 'Sluice Art Fair',
- 'type': 'prize',
- 'ga': 'UA-60614729-5'
- },
{
'subdomain': 'cyland',
'name': 'Cyland media art lab',
@@ -72,11 +66,6 @@ const constants = {
'subdomain': 'liquidgallery',
'name': 'Liquid Gallery',
'type': 'wallet'
- },
- {
- 'subdomain': 'portfolioreview',
- 'name': 'Portfolio Review',
- 'type': 'prize'
}
],
'defaultDomain': {
diff --git a/js/routes.js b/js/routes.js
index 6baba4de..3c7e1228 100644
--- a/js/routes.js
+++ b/js/routes.js
@@ -3,7 +3,6 @@
import React from 'react';
import { Route } from 'react-router';
-import getPrizeRoutes from './components/whitelabel/prize/prize_routes';
import getWalletRoutes from './components/whitelabel/wallet/wallet_routes';
import AscribeApp from './components/ascribe_app';
@@ -82,9 +81,7 @@ const COMMON_ROUTES = (
function getRoutes(type, subdomain) {
- if (type === 'prize') {
- return getPrizeRoutes(COMMON_ROUTES, subdomain);
- } else if(type === 'wallet') {
+ if (type === 'wallet') {
return getWalletRoutes(COMMON_ROUTES, subdomain);
} else {
return COMMON_ROUTES;