From 000719e14d094d8c42c7d401a8b248c0e42927d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Tue, 6 Oct 2015 16:47:59 +0200 Subject: [PATCH 01/10] Move third party actions/stores to separate dispatcher --- js/actions/application_actions.js | 2 +- js/actions/coa_actions.js | 2 +- js/actions/contract_agreement_list_actions.js | 2 +- js/actions/contract_list_actions.js | 2 +- js/actions/edition_actions.js | 2 +- js/actions/edition_list_actions.js | 2 +- js/actions/event_actions.js | 4 ++-- js/actions/global_notification_actions.js | 2 +- js/actions/license_actions.js | 2 +- js/actions/notification_actions.js | 2 +- js/actions/ownership_actions.js | 2 +- js/actions/piece_actions.js | 2 +- js/actions/piece_list_actions.js | 2 +- js/actions/prize_list_actions.js | 2 +- js/actions/user_actions.js | 2 +- js/actions/wallet_settings_actions.js | 2 +- js/actions/whitelabel_actions.js | 2 +- js/alt.js | 3 ++- js/components/logout_container.js | 2 +- js/components/whitelabel/prize/actions/prize_actions.js | 2 +- js/components/whitelabel/prize/actions/prize_jury_actions.js | 2 +- .../whitelabel/prize/actions/prize_rating_actions.js | 2 +- js/components/whitelabel/prize/stores/prize_jury_store.js | 2 +- js/components/whitelabel/prize/stores/prize_rating_store.js | 2 +- js/components/whitelabel/prize/stores/prize_store.js | 2 +- js/stores/application_store.js | 2 +- js/stores/coa_store.js | 2 +- js/stores/contract_agreement_list_store.js | 2 +- js/stores/contract_list_store.js | 2 +- js/stores/edition_list_store.js | 2 +- js/stores/edition_store.js | 2 +- js/stores/global_notification_store.js | 2 +- js/stores/license_store.js | 2 +- js/stores/notification_store.js | 2 +- js/stores/ownership_store.js | 2 +- js/stores/piece_list_store.js | 2 +- js/stores/piece_store.js | 2 +- js/stores/prize_list_store.js | 2 +- js/stores/user_store.js | 2 +- js/stores/wallet_settings_store.js | 2 +- js/stores/whitelabel_store.js | 2 +- js/third_party/debug.js | 4 ++-- js/third_party/ga.js | 4 ++-- js/third_party/intercom.js | 4 ++-- js/third_party/notifications.js | 4 ++-- js/third_party/raven.js | 4 ++-- 46 files changed, 53 insertions(+), 52 deletions(-) diff --git a/js/actions/application_actions.js b/js/actions/application_actions.js index 733746cf..e7f96275 100644 --- a/js/actions/application_actions.js +++ b/js/actions/application_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import ApplicationFetcher from '../fetchers/application_fetcher'; diff --git a/js/actions/coa_actions.js b/js/actions/coa_actions.js index da279bc6..d3d13290 100644 --- a/js/actions/coa_actions.js +++ b/js/actions/coa_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import CoaFetcher from '../fetchers/coa_fetcher'; import Q from 'q'; diff --git a/js/actions/contract_agreement_list_actions.js b/js/actions/contract_agreement_list_actions.js index 589c1f51..4993b129 100644 --- a/js/actions/contract_agreement_list_actions.js +++ b/js/actions/contract_agreement_list_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import Q from 'q'; import OwnershipFetcher from '../fetchers/ownership_fetcher'; diff --git a/js/actions/contract_list_actions.js b/js/actions/contract_list_actions.js index 5b874caf..1c5c0913 100644 --- a/js/actions/contract_list_actions.js +++ b/js/actions/contract_list_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import OwnershipFetcher from '../fetchers/ownership_fetcher'; import Q from 'q'; diff --git a/js/actions/edition_actions.js b/js/actions/edition_actions.js index 473da0e4..4bdf093a 100644 --- a/js/actions/edition_actions.js +++ b/js/actions/edition_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import EditionFetcher from '../fetchers/edition_fetcher'; diff --git a/js/actions/edition_list_actions.js b/js/actions/edition_list_actions.js index fb0a2249..6f9881ee 100644 --- a/js/actions/edition_list_actions.js +++ b/js/actions/edition_list_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import Q from 'q'; import EditionListFetcher from '../fetchers/edition_list_fetcher.js'; diff --git a/js/actions/event_actions.js b/js/actions/event_actions.js index 8f1def9f..6d8ee12f 100644 --- a/js/actions/event_actions.js +++ b/js/actions/event_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { altThirdParty } from '../alt'; class EventActions { @@ -16,4 +16,4 @@ class EventActions { } } -export default alt.createActions(EventActions); +export default altThirdParty.createActions(EventActions); diff --git a/js/actions/global_notification_actions.js b/js/actions/global_notification_actions.js index b12f7906..2bb8d6e6 100644 --- a/js/actions/global_notification_actions.js +++ b/js/actions/global_notification_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; class GlobalNotificationActions { diff --git a/js/actions/license_actions.js b/js/actions/license_actions.js index bfeacd34..ad9a3d08 100644 --- a/js/actions/license_actions.js +++ b/js/actions/license_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import LicenseFetcher from '../fetchers/license_fetcher'; diff --git a/js/actions/notification_actions.js b/js/actions/notification_actions.js index 9318c922..c3a6db93 100644 --- a/js/actions/notification_actions.js +++ b/js/actions/notification_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import Q from 'q'; import NotificationFetcher from '../fetchers/notification_fetcher'; diff --git a/js/actions/ownership_actions.js b/js/actions/ownership_actions.js index 222309bb..deef2f2d 100644 --- a/js/actions/ownership_actions.js +++ b/js/actions/ownership_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import OwnershipFetcher from '../fetchers/ownership_fetcher'; diff --git a/js/actions/piece_actions.js b/js/actions/piece_actions.js index e3a41f93..7aed13fc 100644 --- a/js/actions/piece_actions.js +++ b/js/actions/piece_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import PieceFetcher from '../fetchers/piece_fetcher'; diff --git a/js/actions/piece_list_actions.js b/js/actions/piece_list_actions.js index ae5ac090..2a4464af 100644 --- a/js/actions/piece_list_actions.js +++ b/js/actions/piece_list_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import Q from 'q'; import PieceListFetcher from '../fetchers/piece_list_fetcher'; diff --git a/js/actions/prize_list_actions.js b/js/actions/prize_list_actions.js index fddf1a04..da2f97df 100644 --- a/js/actions/prize_list_actions.js +++ b/js/actions/prize_list_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import Q from 'q'; import PrizeListFetcher from '../fetchers/prize_list_fetcher'; diff --git a/js/actions/user_actions.js b/js/actions/user_actions.js index 2a2c3c05..9233244d 100644 --- a/js/actions/user_actions.js +++ b/js/actions/user_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import UserFetcher from '../fetchers/user_fetcher'; diff --git a/js/actions/wallet_settings_actions.js b/js/actions/wallet_settings_actions.js index 11a21631..1094c8e2 100644 --- a/js/actions/wallet_settings_actions.js +++ b/js/actions/wallet_settings_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import WalletSettingsFetcher from '../fetchers/wallet_settings_fetcher'; diff --git a/js/actions/whitelabel_actions.js b/js/actions/whitelabel_actions.js index 41ab1421..95d4fc27 100644 --- a/js/actions/whitelabel_actions.js +++ b/js/actions/whitelabel_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import WhitelabelFetcher from '../fetchers/whitelabel_fetcher'; diff --git a/js/alt.js b/js/alt.js index 94786185..5b0fa670 100644 --- a/js/alt.js +++ b/js/alt.js @@ -2,4 +2,5 @@ import Alt from 'alt'; -export default new Alt(); +export let alt = new Alt(); +export let altThirdParty = new Alt(); diff --git a/js/components/logout_container.js b/js/components/logout_container.js index c7769867..70a20034 100644 --- a/js/components/logout_container.js +++ b/js/components/logout_container.js @@ -4,7 +4,7 @@ import React from 'react'; import Router from 'react-router'; import UserActions from '../actions/user_actions'; -import Alt from '../alt'; +import { alt } from '../alt'; import AppConstants from '../constants/application_constants'; let baseUrl = AppConstants.baseUrl; diff --git a/js/components/whitelabel/prize/actions/prize_actions.js b/js/components/whitelabel/prize/actions/prize_actions.js index 5646e2d6..fcd9e91e 100644 --- a/js/components/whitelabel/prize/actions/prize_actions.js +++ b/js/components/whitelabel/prize/actions/prize_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../../../../alt'; +import { alt } from '../../../../alt'; import Q from 'q'; import PrizeFetcher from '../fetchers/prize_fetcher'; diff --git a/js/components/whitelabel/prize/actions/prize_jury_actions.js b/js/components/whitelabel/prize/actions/prize_jury_actions.js index bd0a25af..9bd03f59 100644 --- a/js/components/whitelabel/prize/actions/prize_jury_actions.js +++ b/js/components/whitelabel/prize/actions/prize_jury_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../../../../alt'; +import { alt } from '../../../../alt'; import Q from 'q'; import PrizeJuryFetcher from '../fetchers/prize_jury_fetcher'; diff --git a/js/components/whitelabel/prize/actions/prize_rating_actions.js b/js/components/whitelabel/prize/actions/prize_rating_actions.js index 1e42f8ba..184d84e7 100644 --- a/js/components/whitelabel/prize/actions/prize_rating_actions.js +++ b/js/components/whitelabel/prize/actions/prize_rating_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../../../../alt'; +import { alt } from '../../../../alt'; import Q from 'q'; import PrizeRatingFetcher from '../fetchers/prize_rating_fetcher'; diff --git a/js/components/whitelabel/prize/stores/prize_jury_store.js b/js/components/whitelabel/prize/stores/prize_jury_store.js index 88ed21ac..69d73e3a 100644 --- a/js/components/whitelabel/prize/stores/prize_jury_store.js +++ b/js/components/whitelabel/prize/stores/prize_jury_store.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../../../../alt'; +import { alt } from '../../../../alt'; import PrizeJuryActions from '../actions/prize_jury_actions'; diff --git a/js/components/whitelabel/prize/stores/prize_rating_store.js b/js/components/whitelabel/prize/stores/prize_rating_store.js index 9b7a2126..d67fa603 100644 --- a/js/components/whitelabel/prize/stores/prize_rating_store.js +++ b/js/components/whitelabel/prize/stores/prize_rating_store.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../../../../alt'; +import { alt } from '../../../../alt'; import PrizeRatingActions from '../actions/prize_rating_actions'; diff --git a/js/components/whitelabel/prize/stores/prize_store.js b/js/components/whitelabel/prize/stores/prize_store.js index f311e1fe..68cc9264 100644 --- a/js/components/whitelabel/prize/stores/prize_store.js +++ b/js/components/whitelabel/prize/stores/prize_store.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../../../../alt'; +import { alt } from '../../../../alt'; import PrizeActions from '../actions/prize_actions'; diff --git a/js/stores/application_store.js b/js/stores/application_store.js index 5eb89e24..6fefa573 100644 --- a/js/stores/application_store.js +++ b/js/stores/application_store.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import ApplicationActions from '../actions/application_actions'; diff --git a/js/stores/coa_store.js b/js/stores/coa_store.js index fa71771e..e76e480e 100644 --- a/js/stores/coa_store.js +++ b/js/stores/coa_store.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import CoaActions from '../actions/coa_actions'; diff --git a/js/stores/contract_agreement_list_store.js b/js/stores/contract_agreement_list_store.js index ca1d8e6b..aef13850 100644 --- a/js/stores/contract_agreement_list_store.js +++ b/js/stores/contract_agreement_list_store.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import ContractAgreementListActions from '../actions/contract_agreement_list_actions'; diff --git a/js/stores/contract_list_store.js b/js/stores/contract_list_store.js index 5bc30d3e..ba35978d 100644 --- a/js/stores/contract_list_store.js +++ b/js/stores/contract_list_store.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import ContractListActions from '../actions/contract_list_actions'; diff --git a/js/stores/edition_list_store.js b/js/stores/edition_list_store.js index b3b152d3..4ccada4e 100644 --- a/js/stores/edition_list_store.js +++ b/js/stores/edition_list_store.js @@ -2,7 +2,7 @@ import React from 'react'; -import alt from '../alt'; +import { alt } from '../alt'; import EditionsListActions from '../actions/edition_list_actions'; class EditionListStore { diff --git a/js/stores/edition_store.js b/js/stores/edition_store.js index 0fa0eb71..14ee4fee 100644 --- a/js/stores/edition_store.js +++ b/js/stores/edition_store.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import EditionActions from '../actions/edition_actions'; diff --git a/js/stores/global_notification_store.js b/js/stores/global_notification_store.js index bd1bedc6..5a23fe1b 100644 --- a/js/stores/global_notification_store.js +++ b/js/stores/global_notification_store.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import GlobalNotificationActions from '../actions/global_notification_actions'; diff --git a/js/stores/license_store.js b/js/stores/license_store.js index 42a6bfb5..29063a91 100644 --- a/js/stores/license_store.js +++ b/js/stores/license_store.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import LicenseActions from '../actions/license_actions'; diff --git a/js/stores/notification_store.js b/js/stores/notification_store.js index 9f6bdecf..ffb3b0af 100644 --- a/js/stores/notification_store.js +++ b/js/stores/notification_store.js @@ -1,7 +1,7 @@ 'use strict'; import React from 'react'; -import alt from '../alt'; +import { alt } from '../alt'; import NotificationActions from '../actions/notification_actions'; diff --git a/js/stores/ownership_store.js b/js/stores/ownership_store.js index eaba7111..6feb2a10 100644 --- a/js/stores/ownership_store.js +++ b/js/stores/ownership_store.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import OwnershipActions from '../actions/ownership_actions'; diff --git a/js/stores/piece_list_store.js b/js/stores/piece_list_store.js index 8b4254ac..2ba90770 100644 --- a/js/stores/piece_list_store.js +++ b/js/stores/piece_list_store.js @@ -1,7 +1,7 @@ 'use strict'; import React from 'react'; -import alt from '../alt'; +import { alt } from '../alt'; import PieceListActions from '../actions/piece_list_actions'; diff --git a/js/stores/piece_store.js b/js/stores/piece_store.js index 0bebab10..ccef50b1 100644 --- a/js/stores/piece_store.js +++ b/js/stores/piece_store.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import PieceActions from '../actions/piece_actions'; diff --git a/js/stores/prize_list_store.js b/js/stores/prize_list_store.js index 99ee5d14..87b94f01 100644 --- a/js/stores/prize_list_store.js +++ b/js/stores/prize_list_store.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import PrizeListActions from '../actions/prize_list_actions'; diff --git a/js/stores/user_store.js b/js/stores/user_store.js index 14eb1f90..da9eac93 100644 --- a/js/stores/user_store.js +++ b/js/stores/user_store.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import UserActions from '../actions/user_actions'; diff --git a/js/stores/wallet_settings_store.js b/js/stores/wallet_settings_store.js index df4cce99..6449bb24 100644 --- a/js/stores/wallet_settings_store.js +++ b/js/stores/wallet_settings_store.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import WalletSettingsActions from '../actions/wallet_settings_actions'; diff --git a/js/stores/whitelabel_store.js b/js/stores/whitelabel_store.js index 478b00a2..9db49d4e 100644 --- a/js/stores/whitelabel_store.js +++ b/js/stores/whitelabel_store.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { alt } from '../alt'; import WhitelabelActions from '../actions/whitelabel_actions'; diff --git a/js/third_party/debug.js b/js/third_party/debug.js index 76178266..23fe4d04 100644 --- a/js/third_party/debug.js +++ b/js/third_party/debug.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { altThirdParty } from '../alt'; import EventActions from '../actions/event_actions'; @@ -27,4 +27,4 @@ class DebugHandler { } } -export default alt.createStore(DebugHandler, 'DebugHandler'); +export default altThirdParty.createStore(DebugHandler, 'DebugHandler'); diff --git a/js/third_party/ga.js b/js/third_party/ga.js index f95450cb..e7929191 100644 --- a/js/third_party/ga.js +++ b/js/third_party/ga.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { altThirdParty } from '../alt'; import EventActions from '../actions/event_actions'; class GoogleAnalyticsHandler { @@ -23,4 +23,4 @@ class GoogleAnalyticsHandler { } -export default alt.createStore(GoogleAnalyticsHandler, 'GoogleAnalyticsHandler'); +export default altThirdParty.createStore(GoogleAnalyticsHandler, 'GoogleAnalyticsHandler'); diff --git a/js/third_party/intercom.js b/js/third_party/intercom.js index 42ecccf7..4ab2ff50 100644 --- a/js/third_party/intercom.js +++ b/js/third_party/intercom.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { altThirdParty } from '../alt'; import EventActions from '../actions/event_actions'; import { getSubdomain } from '../utils/general_utils'; @@ -33,4 +33,4 @@ class IntercomHandler { } -export default alt.createStore(IntercomHandler, 'IntercomHandler'); +export default altThirdParty.createStore(IntercomHandler, 'IntercomHandler'); diff --git a/js/third_party/notifications.js b/js/third_party/notifications.js index eeac1bff..90a613b8 100644 --- a/js/third_party/notifications.js +++ b/js/third_party/notifications.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { altThirdParty } from '../alt'; import EventActions from '../actions/event_actions'; import NotificationActions from '../actions/notification_actions'; @@ -35,4 +35,4 @@ class NotificationsHandler { } } -export default alt.createStore(NotificationsHandler, 'NotificationsHandler'); +export default altThirdParty.createStore(NotificationsHandler, 'NotificationsHandler'); diff --git a/js/third_party/raven.js b/js/third_party/raven.js index eeb5b390..3d6ff315 100644 --- a/js/third_party/raven.js +++ b/js/third_party/raven.js @@ -1,6 +1,6 @@ 'use strict'; -import alt from '../alt'; +import { altThirdParty } from '../alt'; import EventActions from '../actions/event_actions'; import Raven from 'raven-js'; @@ -25,4 +25,4 @@ class RavenHandler { } } -export default alt.createStore(RavenHandler, 'RavenHandler'); +export default altThirdParty.createStore(RavenHandler, 'RavenHandler'); From f5c06e070c85ca4d468c4b82e1d05e2a347a5e29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Wed, 7 Oct 2015 09:31:38 +0200 Subject: [PATCH 02/10] Separate dispatcher logic of whitelabel and user stores --- js/actions/user_actions.js | 4 ++-- js/actions/whitelabel_actions.js | 4 ++-- js/alt.js | 2 ++ js/components/logout_container.js | 7 +++++-- js/stores/user_store.js | 4 ++-- js/stores/whitelabel_store.js | 4 ++-- 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/js/actions/user_actions.js b/js/actions/user_actions.js index 9233244d..661890e9 100644 --- a/js/actions/user_actions.js +++ b/js/actions/user_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import { alt } from '../alt'; +import { altUser } from '../alt'; import UserFetcher from '../fetchers/user_fetcher'; @@ -34,4 +34,4 @@ class UserActions { } } -export default alt.createActions(UserActions); +export default altUser.createActions(UserActions); diff --git a/js/actions/whitelabel_actions.js b/js/actions/whitelabel_actions.js index 95d4fc27..a1460fb8 100644 --- a/js/actions/whitelabel_actions.js +++ b/js/actions/whitelabel_actions.js @@ -1,6 +1,6 @@ 'use strict'; -import { alt } from '../alt'; +import { altWhitelabel } from '../alt'; import WhitelabelFetcher from '../fetchers/whitelabel_fetcher'; @@ -26,4 +26,4 @@ class WhitelabelActions { } } -export default alt.createActions(WhitelabelActions); +export default altWhitelabel.createActions(WhitelabelActions); diff --git a/js/alt.js b/js/alt.js index 5b0fa670..141248c1 100644 --- a/js/alt.js +++ b/js/alt.js @@ -4,3 +4,5 @@ import Alt from 'alt'; export let alt = new Alt(); export let altThirdParty = new Alt(); +export let altUser = new Alt(); +export let altWhitelabel = new Alt(); diff --git a/js/components/logout_container.js b/js/components/logout_container.js index 70a20034..74c16439 100644 --- a/js/components/logout_container.js +++ b/js/components/logout_container.js @@ -4,7 +4,7 @@ import React from 'react'; import Router from 'react-router'; import UserActions from '../actions/user_actions'; -import { alt } from '../alt'; +import { alt, altWhitelabel, altUser, altThirdParty } from '../alt'; import AppConstants from '../constants/application_constants'; let baseUrl = AppConstants.baseUrl; @@ -16,7 +16,10 @@ let LogoutContainer = React.createClass({ componentDidMount() { UserActions.logoutCurrentUser() .then(() => { - Alt.flush(); + alt.flush(); + altWhitelabel.flush(); + altUser.flush(); + altThirdParty.flush(); // kill intercom (with fire) window.Intercom('shutdown'); this.replaceWith(baseUrl); diff --git a/js/stores/user_store.js b/js/stores/user_store.js index da9eac93..8ea18eea 100644 --- a/js/stores/user_store.js +++ b/js/stores/user_store.js @@ -1,6 +1,6 @@ 'use strict'; -import { alt } from '../alt'; +import { altUser } from '../alt'; import UserActions from '../actions/user_actions'; @@ -18,4 +18,4 @@ class UserStore { } } -export default alt.createStore(UserStore, 'UserStore'); +export default altUser.createStore(UserStore, 'UserStore'); diff --git a/js/stores/whitelabel_store.js b/js/stores/whitelabel_store.js index 9db49d4e..017fb98e 100644 --- a/js/stores/whitelabel_store.js +++ b/js/stores/whitelabel_store.js @@ -1,6 +1,6 @@ 'use strict'; -import { alt } from '../alt'; +import { altWhitelabel } from '../alt'; import WhitelabelActions from '../actions/whitelabel_actions'; @@ -15,4 +15,4 @@ class WhitelabelStore { } } -export default alt.createStore(WhitelabelStore, 'WhitelabelStore'); +export default altWhitelabel.createStore(WhitelabelStore, 'WhitelabelStore'); From f38ce126b746a57468301ade0dcd9cba4c3ca6bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Mon, 12 Oct 2015 10:37:08 +0200 Subject: [PATCH 03/10] Correct handleSuccess of AclButtonList --- .../wallet/components/ascribe_detail/wallet_action_panel.js | 3 +-- .../cyland/ascribe_detail/cyland_piece_container.js | 4 ++++ .../ikonotv/ascribe_buttons/ikonotv_submit_button.js | 1 - .../ikonotv/ascribe_detail/ikonotv_piece_container.js | 5 +++++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/js/components/whitelabel/wallet/components/ascribe_detail/wallet_action_panel.js b/js/components/whitelabel/wallet/components/ascribe_detail/wallet_action_panel.js index b00d10cc..3e60c653 100644 --- a/js/components/whitelabel/wallet/components/ascribe_detail/wallet_action_panel.js +++ b/js/components/whitelabel/wallet/components/ascribe_detail/wallet_action_panel.js @@ -49,7 +49,7 @@ let WalletActionPanel = React.createClass({ className="text-center ascribe-button-list" availableAcls={availableAcls} editions={this.props.piece} - handleSuccess={this.loadPiece}> + handleSuccess={this.props.loadPiece}> @@ -58,7 +58,6 @@ let WalletActionPanel = React.createClass({ aclName="acl_wallet_submit"> diff --git a/js/components/whitelabel/wallet/components/cyland/ascribe_detail/cyland_piece_container.js b/js/components/whitelabel/wallet/components/cyland/ascribe_detail/cyland_piece_container.js index 1be98cfc..047e8cb1 100644 --- a/js/components/whitelabel/wallet/components/cyland/ascribe_detail/cyland_piece_container.js +++ b/js/components/whitelabel/wallet/components/cyland/ascribe_detail/cyland_piece_container.js @@ -21,6 +21,10 @@ import { getLangText } from '../../../../../../utils/lang_utils'; import { mergeOptions } from '../../../../../../utils/general_utils'; let CylandPieceContainer = React.createClass({ + propTypes: { + params: React.PropTypes.object + }, + getInitialState() { return mergeOptions( PieceStore.getState(), diff --git a/js/components/whitelabel/wallet/components/ikonotv/ascribe_buttons/ikonotv_submit_button.js b/js/components/whitelabel/wallet/components/ikonotv/ascribe_buttons/ikonotv_submit_button.js index 523f9fe2..0a2b46bc 100644 --- a/js/components/whitelabel/wallet/components/ikonotv/ascribe_buttons/ikonotv_submit_button.js +++ b/js/components/whitelabel/wallet/components/ikonotv/ascribe_buttons/ikonotv_submit_button.js @@ -9,7 +9,6 @@ import { getLangText } from '../../../../../../utils/lang_utils'; let IkonotvSubmitButton = React.createClass({ propTypes: { className: React.PropTypes.string, - handleSuccess: React.PropTypes.func, piece: React.PropTypes.object.isRequired }, diff --git a/js/components/whitelabel/wallet/components/ikonotv/ascribe_detail/ikonotv_piece_container.js b/js/components/whitelabel/wallet/components/ikonotv/ascribe_detail/ikonotv_piece_container.js index 1194b14a..cc457ea0 100644 --- a/js/components/whitelabel/wallet/components/ikonotv/ascribe_detail/ikonotv_piece_container.js +++ b/js/components/whitelabel/wallet/components/ikonotv/ascribe_detail/ikonotv_piece_container.js @@ -22,7 +22,12 @@ import AppConstants from '../../../../../../constants/application_constants'; import { getLangText } from '../../../../../../utils/lang_utils'; import { mergeOptions } from '../../../../../../utils/general_utils'; + let IkonotvPieceContainer = React.createClass({ + propTypes: { + params: React.PropTypes.object + }, + getInitialState() { return mergeOptions( PieceStore.getState(), From 002bab8e79224d547e214b3205b4de2fae85c8cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Tue, 13 Oct 2015 10:13:53 +0200 Subject: [PATCH 04/10] Increase additional data file size --- .../ascribe_forms/cyland_additional_data_form.js | 10 +++++----- js/constants/application_constants.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/js/components/whitelabel/wallet/components/cyland/ascribe_forms/cyland_additional_data_form.js b/js/components/whitelabel/wallet/components/cyland/ascribe_forms/cyland_additional_data_form.js index 0fd023c2..a1cd2da1 100644 --- a/js/components/whitelabel/wallet/components/cyland/ascribe_forms/cyland_additional_data_form.js +++ b/js/components/whitelabel/wallet/components/cyland/ascribe_forms/cyland_additional_data_form.js @@ -35,17 +35,17 @@ let CylandAdditionalDataForm = React.createClass({ }; }, - handleSuccess() { - let notification = new GlobalNotificationModel('Further details successfully updated', 'success', 10000); - GlobalNotificationActions.appendGlobalNotification(notification); - }, - getInitialState() { return { isUploadReady: true }; }, + handleSuccess() { + let notification = new GlobalNotificationModel('Further details successfully updated', 'success', 10000); + GlobalNotificationActions.appendGlobalNotification(notification); + }, + getFormData() { let extradata = {}; let formRefs = this.refs.form.refs; diff --git a/js/constants/application_constants.js b/js/constants/application_constants.js index c74fdce9..ce893791 100644 --- a/js/constants/application_constants.js +++ b/js/constants/application_constants.js @@ -61,7 +61,7 @@ let constants = { 'validation': { 'additionalData': { 'itemLimit': 100, - 'sizeLimit': '50000000' + 'sizeLimit': '25000000000' }, 'registerWork': { 'itemLimit': 1, From 8ac69bab5defa279ec8ddbe7a29d60c0c35804cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Tue, 13 Oct 2015 10:20:23 +0200 Subject: [PATCH 05/10] Change additional files label --- js/components/ascribe_detail/further_details_fileuploader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/ascribe_detail/further_details_fileuploader.js b/js/components/ascribe_detail/further_details_fileuploader.js index 9bf0bd5b..f8e34fda 100644 --- a/js/components/ascribe_detail/further_details_fileuploader.js +++ b/js/components/ascribe_detail/further_details_fileuploader.js @@ -43,7 +43,7 @@ let FurtherDetailsFileuploader = React.createClass({ return ( + label="Additional files"> Date: Tue, 13 Oct 2015 11:23:21 +0200 Subject: [PATCH 06/10] Rename whitelabel component director to cyland specific prefix --- .../cyland_accordion_list_item.js | 2 +- .../cyland_submit_button.js | 1 + .../cyland_piece_container.js | 4 ++-- .../cyland_additional_data_form.js | 0 .../whitelabel/wallet/components/cyland/cyland_hero.js | 4 ++-- .../whitelabel/wallet/components/cyland/cyland_landing.js | 1 - .../whitelabel/wallet/components/cyland/cyland_piece_list.js | 2 +- .../wallet/components/cyland/cyland_register_piece.js | 2 +- js/components/whitelabel/wallet/wallet_routes.js | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) rename js/components/whitelabel/wallet/components/cyland/{ascribe_accordion_list => cyland_accordion_list}/cyland_accordion_list_item.js (98%) rename js/components/whitelabel/wallet/components/cyland/{ascribe_buttons => cyland_buttons}/cyland_submit_button.js (99%) rename js/components/whitelabel/wallet/components/cyland/{ascribe_detail => cyland_detail}/cyland_piece_container.js (94%) rename js/components/whitelabel/wallet/components/cyland/{ascribe_forms => cyland_forms}/cyland_additional_data_form.js (100%) diff --git a/js/components/whitelabel/wallet/components/cyland/ascribe_accordion_list/cyland_accordion_list_item.js b/js/components/whitelabel/wallet/components/cyland/cyland_accordion_list/cyland_accordion_list_item.js similarity index 98% rename from js/components/whitelabel/wallet/components/cyland/ascribe_accordion_list/cyland_accordion_list_item.js rename to js/components/whitelabel/wallet/components/cyland/cyland_accordion_list/cyland_accordion_list_item.js index 3e3676bc..ae96db98 100644 --- a/js/components/whitelabel/wallet/components/cyland/ascribe_accordion_list/cyland_accordion_list_item.js +++ b/js/components/whitelabel/wallet/components/cyland/cyland_accordion_list/cyland_accordion_list_item.js @@ -12,7 +12,7 @@ import UserStore from '../../../../../../stores/user_store'; import GlobalNotificationModel from '../../../../../../models/global_notification_model'; import GlobalNotificationActions from '../../../../../../actions/global_notification_actions'; -import CylandSubmitButton from '../ascribe_buttons/cyland_submit_button'; +import CylandSubmitButton from '../cyland_buttons/cyland_submit_button'; import AclProxy from '../../../../../acl_proxy'; import { getLangText } from '../../../../../../utils/lang_utils'; diff --git a/js/components/whitelabel/wallet/components/cyland/ascribe_buttons/cyland_submit_button.js b/js/components/whitelabel/wallet/components/cyland/cyland_buttons/cyland_submit_button.js similarity index 99% rename from js/components/whitelabel/wallet/components/cyland/ascribe_buttons/cyland_submit_button.js rename to js/components/whitelabel/wallet/components/cyland/cyland_buttons/cyland_submit_button.js index 72ff595b..d8a039a3 100644 --- a/js/components/whitelabel/wallet/components/cyland/ascribe_buttons/cyland_submit_button.js +++ b/js/components/whitelabel/wallet/components/cyland/cyland_buttons/cyland_submit_button.js @@ -10,6 +10,7 @@ import WhitelabelStore from '../../../../../../stores/whitelabel_store'; import { getLangText } from '../../../../../../utils/lang_utils'; + let CylandSubmitButton = React.createClass({ propTypes: { className: React.PropTypes.string, diff --git a/js/components/whitelabel/wallet/components/cyland/ascribe_detail/cyland_piece_container.js b/js/components/whitelabel/wallet/components/cyland/cyland_detail/cyland_piece_container.js similarity index 94% rename from js/components/whitelabel/wallet/components/cyland/ascribe_detail/cyland_piece_container.js rename to js/components/whitelabel/wallet/components/cyland/cyland_detail/cyland_piece_container.js index 047e8cb1..17d06d19 100644 --- a/js/components/whitelabel/wallet/components/cyland/ascribe_detail/cyland_piece_container.js +++ b/js/components/whitelabel/wallet/components/cyland/cyland_detail/cyland_piece_container.js @@ -7,11 +7,11 @@ import PieceStore from '../../../../../../stores/piece_store'; import UserStore from '../../../../../../stores/user_store'; -import CylandSubmitButton from '../ascribe_buttons/cyland_submit_button'; +import CylandSubmitButton from '../cyland_buttons/cyland_submit_button'; import CollapsibleParagraph from '../../../../../../components/ascribe_collapsible/collapsible_paragraph'; -import CylandAdditionalDataForm from '../ascribe_forms/cyland_additional_data_form'; +import CylandAdditionalDataForm from '../cyland_forms/cyland_additional_data_form'; import WalletPieceContainer from '../../ascribe_detail/wallet_piece_container'; diff --git a/js/components/whitelabel/wallet/components/cyland/ascribe_forms/cyland_additional_data_form.js b/js/components/whitelabel/wallet/components/cyland/cyland_forms/cyland_additional_data_form.js similarity index 100% rename from js/components/whitelabel/wallet/components/cyland/ascribe_forms/cyland_additional_data_form.js rename to js/components/whitelabel/wallet/components/cyland/cyland_forms/cyland_additional_data_form.js diff --git a/js/components/whitelabel/wallet/components/cyland/cyland_hero.js b/js/components/whitelabel/wallet/components/cyland/cyland_hero.js index b98f407e..a0e617c8 100644 --- a/js/components/whitelabel/wallet/components/cyland/cyland_hero.js +++ b/js/components/whitelabel/wallet/components/cyland/cyland_hero.js @@ -1,7 +1,7 @@ 'use strict'; import React from 'react'; -import constants from '../../../../constants/application_constants'; +import AppConstants from '../../../../constants/application_constants'; let Hero = React.createClass({ @@ -9,7 +9,7 @@ let Hero = React.createClass({ return (
Sluice Art Prize
diff --git a/js/components/whitelabel/wallet/components/cyland/cyland_landing.js b/js/components/whitelabel/wallet/components/cyland/cyland_landing.js index 9924f550..29d966cc 100644 --- a/js/components/whitelabel/wallet/components/cyland/cyland_landing.js +++ b/js/components/whitelabel/wallet/components/cyland/cyland_landing.js @@ -3,7 +3,6 @@ import React from 'react'; import Router from 'react-router'; - import WhitelabelActions from '../../../../../actions/whitelabel_actions'; import WhitelabelStore from '../../../../../stores/whitelabel_store'; 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 3b1c70c0..f5270bcf 100644 --- a/js/components/whitelabel/wallet/components/cyland/cyland_piece_list.js +++ b/js/components/whitelabel/wallet/components/cyland/cyland_piece_list.js @@ -6,7 +6,7 @@ import PieceList from '../../../../piece_list'; import UserActions from '../../../../../actions/user_actions'; import UserStore from '../../../../../stores/user_store'; -import CylandAccordionListItem from './ascribe_accordion_list/cyland_accordion_list_item'; +import CylandAccordionListItem from './cyland_accordion_list/cyland_accordion_list_item'; import { getLangText } from '../../../../../utils/lang_utils'; 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 84713bd9..710bef3e 100644 --- a/js/components/whitelabel/wallet/components/cyland/cyland_register_piece.js +++ b/js/components/whitelabel/wallet/components/cyland/cyland_register_piece.js @@ -25,7 +25,7 @@ import PieceActions from '../../../../../actions/piece_actions'; import GlobalNotificationModel from '../../../../../models/global_notification_model'; import GlobalNotificationActions from '../../../../../actions/global_notification_actions'; -import CylandAdditionalDataForm from './ascribe_forms/cyland_additional_data_form'; +import CylandAdditionalDataForm from './cyland_forms/cyland_additional_data_form'; import LoanForm from '../../../../ascribe_forms/form_loan'; diff --git a/js/components/whitelabel/wallet/wallet_routes.js b/js/components/whitelabel/wallet/wallet_routes.js index 7097a88b..053a7cdf 100644 --- a/js/components/whitelabel/wallet/wallet_routes.js +++ b/js/components/whitelabel/wallet/wallet_routes.js @@ -17,7 +17,7 @@ import ContractSettings from '../../../components/ascribe_settings/contract_sett import ErrorNotFoundPage from '../../../components/error_not_found_page'; import CylandLanding from './components/cyland/cyland_landing'; -import CylandPieceContainer from './components/cyland/ascribe_detail/cyland_piece_container'; +import CylandPieceContainer from './components/cyland/cyland_detail/cyland_piece_container'; import CylandRegisterPiece from './components/cyland/cyland_register_piece'; import CylandPieceList from './components/cyland/cyland_piece_list'; From 2121c6af3df0371205cc64595c4155ce23883d2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Tue, 13 Oct 2015 11:39:33 +0200 Subject: [PATCH 07/10] Rename whitelabel component director to ikonotv specific prefix --- .../ikonotv_accordion_list_item.js | 2 +- .../ikonotv_submit_button.js | 0 .../ikonotv_piece_container.js | 7 +++---- .../ikonotv_artist_details_form.js | 0 .../ikonotv_artwork_details_form.js | 0 .../wallet/components/ikonotv/ikonotv_piece_list.js | 2 +- .../wallet/components/ikonotv/ikonotv_register_piece.js | 4 ++-- js/components/whitelabel/wallet/wallet_routes.js | 2 +- 8 files changed, 8 insertions(+), 9 deletions(-) rename js/components/whitelabel/wallet/components/ikonotv/{ascribe_accordion_list => ikonotv_accordion_list}/ikonotv_accordion_list_item.js (98%) rename js/components/whitelabel/wallet/components/ikonotv/{ascribe_buttons => ikonotv_buttons}/ikonotv_submit_button.js (100%) rename js/components/whitelabel/wallet/components/ikonotv/{ascribe_detail => ikonotv_detail}/ikonotv_piece_container.js (95%) rename js/components/whitelabel/wallet/components/ikonotv/{ascribe_forms => ikonotv_forms}/ikonotv_artist_details_form.js (100%) rename js/components/whitelabel/wallet/components/ikonotv/{ascribe_forms => ikonotv_forms}/ikonotv_artwork_details_form.js (100%) diff --git a/js/components/whitelabel/wallet/components/ikonotv/ascribe_accordion_list/ikonotv_accordion_list_item.js b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_accordion_list/ikonotv_accordion_list_item.js similarity index 98% rename from js/components/whitelabel/wallet/components/ikonotv/ascribe_accordion_list/ikonotv_accordion_list_item.js rename to js/components/whitelabel/wallet/components/ikonotv/ikonotv_accordion_list/ikonotv_accordion_list_item.js index 8561cfae..00e7f318 100644 --- a/js/components/whitelabel/wallet/components/ikonotv/ascribe_accordion_list/ikonotv_accordion_list_item.js +++ b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_accordion_list/ikonotv_accordion_list_item.js @@ -12,7 +12,7 @@ import UserStore from '../../../../../../stores/user_store'; import GlobalNotificationModel from '../../../../../../models/global_notification_model'; import GlobalNotificationActions from '../../../../../../actions/global_notification_actions'; -import IkonotvSubmitButton from '../ascribe_buttons/ikonotv_submit_button'; +import IkonotvSubmitButton from '../ikonotv_buttons/ikonotv_submit_button'; import AclProxy from '../../../../../acl_proxy'; diff --git a/js/components/whitelabel/wallet/components/ikonotv/ascribe_buttons/ikonotv_submit_button.js b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_buttons/ikonotv_submit_button.js similarity index 100% rename from js/components/whitelabel/wallet/components/ikonotv/ascribe_buttons/ikonotv_submit_button.js rename to js/components/whitelabel/wallet/components/ikonotv/ikonotv_buttons/ikonotv_submit_button.js diff --git a/js/components/whitelabel/wallet/components/ikonotv/ascribe_detail/ikonotv_piece_container.js b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_detail/ikonotv_piece_container.js similarity index 95% rename from js/components/whitelabel/wallet/components/ikonotv/ascribe_detail/ikonotv_piece_container.js rename to js/components/whitelabel/wallet/components/ikonotv/ikonotv_detail/ikonotv_piece_container.js index cc457ea0..51714e2d 100644 --- a/js/components/whitelabel/wallet/components/ikonotv/ascribe_detail/ikonotv_piece_container.js +++ b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_detail/ikonotv_piece_container.js @@ -7,13 +7,12 @@ import PieceStore from '../../../../../../stores/piece_store'; import UserStore from '../../../../../../stores/user_store'; - -import IkonotvSubmitButton from '../ascribe_buttons/ikonotv_submit_button'; +import IkonotvSubmitButton from '../ikonotv_buttons/ikonotv_submit_button'; import CollapsibleParagraph from '../../../../../../components/ascribe_collapsible/collapsible_paragraph'; -import IkonotvArtistDetailsForm from '../ascribe_forms/ikonotv_artist_details_form'; -import IkonotvArtworkDetailsForm from '../ascribe_forms/ikonotv_artwork_details_form'; +import IkonotvArtistDetailsForm from '../ikonotv_forms/ikonotv_artist_details_form'; +import IkonotvArtworkDetailsForm from '../ikonotv_forms/ikonotv_artwork_details_form'; import WalletPieceContainer from '../../ascribe_detail/wallet_piece_container'; diff --git a/js/components/whitelabel/wallet/components/ikonotv/ascribe_forms/ikonotv_artist_details_form.js b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_forms/ikonotv_artist_details_form.js similarity index 100% rename from js/components/whitelabel/wallet/components/ikonotv/ascribe_forms/ikonotv_artist_details_form.js rename to js/components/whitelabel/wallet/components/ikonotv/ikonotv_forms/ikonotv_artist_details_form.js diff --git a/js/components/whitelabel/wallet/components/ikonotv/ascribe_forms/ikonotv_artwork_details_form.js b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_forms/ikonotv_artwork_details_form.js similarity index 100% rename from js/components/whitelabel/wallet/components/ikonotv/ascribe_forms/ikonotv_artwork_details_form.js rename to js/components/whitelabel/wallet/components/ikonotv/ikonotv_forms/ikonotv_artwork_details_form.js 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 053d21b3..36869fef 100644 --- a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_piece_list.js +++ b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_piece_list.js @@ -6,7 +6,7 @@ import PieceList from '../../../../piece_list'; import UserActions from '../../../../../actions/user_actions'; import UserStore from '../../../../../stores/user_store'; -import IkonotvAccordionListItem from './ascribe_accordion_list/ikonotv_accordion_list_item'; +import IkonotvAccordionListItem from './ikonotv_accordion_list/ikonotv_accordion_list_item'; import { getLangText } from '../../../../../utils/lang_utils'; 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 38078747..4cf1ccfb 100644 --- a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js +++ b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js @@ -22,8 +22,8 @@ import GlobalNotificationActions from '../../../../../actions/global_notificatio import RegisterPieceForm from '../../../../ascribe_forms/form_register_piece'; import LoanForm from '../../../../ascribe_forms/form_loan'; -import IkonotvArtistDetailsForm from './ascribe_forms/ikonotv_artist_details_form'; -import IkonotvArtworkDetailsForm from './ascribe_forms/ikonotv_artwork_details_form'; +import IkonotvArtistDetailsForm from './ikonotv_forms/ikonotv_artist_details_form'; +import IkonotvArtworkDetailsForm from './ikonotv_forms/ikonotv_artwork_details_form'; import SlidesContainer from '../../../../ascribe_slides_container/slides_container'; diff --git a/js/components/whitelabel/wallet/wallet_routes.js b/js/components/whitelabel/wallet/wallet_routes.js index 053a7cdf..44bad476 100644 --- a/js/components/whitelabel/wallet/wallet_routes.js +++ b/js/components/whitelabel/wallet/wallet_routes.js @@ -25,7 +25,7 @@ import IkonotvLanding from './components/ikonotv/ikonotv_landing'; import IkonotvPieceList from './components/ikonotv/ikonotv_piece_list'; import IkonotvRequestLoan from './components/ikonotv/ikonotv_request_loan'; import IkonotvRegisterPiece from './components/ikonotv/ikonotv_register_piece'; -import IkonotvPieceContainer from './components/ikonotv/ascribe_detail/ikonotv_piece_container'; +import IkonotvPieceContainer from './components/ikonotv/ikonotv_detail/ikonotv_piece_container'; import IkonotvContractNotifications from './components/ikonotv/ikonotv_contract_notifications'; import CCRegisterPiece from './components/cc/cc_register_piece'; From 4627381c163ed0649252fda596f908a8a96b5668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Tue, 13 Oct 2015 16:41:35 +0200 Subject: [PATCH 08/10] add getLangText --- .../cyland/ascribe_forms/cyland_additional_data_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/whitelabel/wallet/components/cyland/ascribe_forms/cyland_additional_data_form.js b/js/components/whitelabel/wallet/components/cyland/ascribe_forms/cyland_additional_data_form.js index a1cd2da1..eeeb6546 100644 --- a/js/components/whitelabel/wallet/components/cyland/ascribe_forms/cyland_additional_data_form.js +++ b/js/components/whitelabel/wallet/components/cyland/ascribe_forms/cyland_additional_data_form.js @@ -42,7 +42,7 @@ let CylandAdditionalDataForm = React.createClass({ }, handleSuccess() { - let notification = new GlobalNotificationModel('Further details successfully updated', 'success', 10000); + let notification = new GlobalNotificationModel(getLangText('Further details successfully updated'), 'success', 10000); GlobalNotificationActions.appendGlobalNotification(notification); }, From 01cea9ad3d2f082ff155fd381a3a57157e020e18 Mon Sep 17 00:00:00 2001 From: vrde Date: Wed, 14 Oct 2015 15:30:10 +0200 Subject: [PATCH 09/10] Property component now propagate its name to its input child --- js/components/ascribe_forms/input_checkbox.js | 8 ++++++-- js/components/ascribe_forms/property.js | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/js/components/ascribe_forms/input_checkbox.js b/js/components/ascribe_forms/input_checkbox.js index 38885441..620c310f 100644 --- a/js/components/ascribe_forms/input_checkbox.js +++ b/js/components/ascribe_forms/input_checkbox.js @@ -17,11 +17,13 @@ let InputCheckbox = React.createClass({ // // Since this component even has checkbox in its name, it felt wrong to expose defaultValue // as the default-setting prop to other developers, which is why we choose defaultChecked. + defaultValue: React.PropTypes.string, defaultChecked: React.PropTypes.bool, children: React.PropTypes.oneOfType([ React.PropTypes.arrayOf(React.PropTypes.element), React.PropTypes.element ]), + name: React.PropTypes.string, // provided by Property disabled: React.PropTypes.bool, @@ -102,8 +104,10 @@ let InputCheckbox = React.createClass({ return ( + onClick={this.onChange} + name={this.props.name}> Date: Wed, 14 Oct 2015 15:49:04 +0200 Subject: [PATCH 10/10] Disable eslint check on specific proptype --- js/components/ascribe_forms/input_checkbox.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/components/ascribe_forms/input_checkbox.js b/js/components/ascribe_forms/input_checkbox.js index 620c310f..a0ee1a70 100644 --- a/js/components/ascribe_forms/input_checkbox.js +++ b/js/components/ascribe_forms/input_checkbox.js @@ -17,7 +17,6 @@ let InputCheckbox = React.createClass({ // // Since this component even has checkbox in its name, it felt wrong to expose defaultValue // as the default-setting prop to other developers, which is why we choose defaultChecked. - defaultValue: React.PropTypes.string, defaultChecked: React.PropTypes.bool, children: React.PropTypes.oneOfType([ React.PropTypes.arrayOf(React.PropTypes.element), @@ -52,7 +51,7 @@ let InputCheckbox = React.createClass({ // Developer's are used to define defaultValues for inputs via defaultValue, but since this is a // input of type checkbox we warn the dev to not do that. - if(this.props.defaultValue) { + if(this.props.defaultValue) { //eslint-disable-line react/prop-types console.warn('InputCheckbox is of type checkbox. Therefore its value is represented by checked and defaultChecked. defaultValue will do nothing!'); }