diff --git a/docs/feature_list.md b/docs/feature_list.md deleted file mode 100644 index 568f7146..00000000 --- a/docs/feature_list.md +++ /dev/null @@ -1,63 +0,0 @@ -# Feature list - -This list specifies all features in Onion that ought to be tested before actually pushing live: - -- sign up & email activation -- login -- log out -- form input - + reset - + save - + disabled state -- form checkbox - + reset - + save - + disabled state -- create app - + refresh token -- loan contract - + upload - + download - + delete -- register work - + with edition - + without edition - + correct encoding of video upload -- fineuploader - + upload file - + upload multiple files - + delete file - + cancel upload of file -- create editions - + in piece list - + in piece detail -- all notes in edition/piece detail -- transfer & consign & loan & share & delete - + bulk - + single - + withdraw -- piece list - + filter (also check for correct filtering of opened edition tables) - + order - + search - + pagination - + expandable edition list for piece -- download coa - -## sluice -- hero landing page -- activation email -- submission (also check extra form fields) - + of existing pieces - + newly registered pieces -- rating - + in piece list - + in piece detail -- short listing (not yet implemented) -- piece list - + order by rating - -## Cyland -- hero landing page -- activation email -- submission (check states of submission (1,2,3)) diff --git a/fonts/Mercury_Light.otf b/fonts/Mercury_Light.otf deleted file mode 100755 index e94e7dd3..00000000 Binary files a/fonts/Mercury_Light.otf and /dev/null differ diff --git a/fonts/Mercury_Medium.otf b/fonts/Mercury_Medium.otf deleted file mode 100755 index fa111de9..00000000 Binary files a/fonts/Mercury_Medium.otf and /dev/null differ diff --git a/fonts/Mercury_Regular.otf b/fonts/Mercury_Regular.otf deleted file mode 100755 index 5e9b4556..00000000 Binary files a/fonts/Mercury_Regular.otf and /dev/null differ diff --git a/fonts/ascribe-logo.eot b/fonts/ascribe-logo.eot index 609770bc..039f93f5 100644 Binary files a/fonts/ascribe-logo.eot and b/fonts/ascribe-logo.eot differ diff --git a/fonts/ascribe-logo.svg b/fonts/ascribe-logo.svg index 28ab9458..2a9bb79b 100644 --- a/fonts/ascribe-logo.svg +++ b/fonts/ascribe-logo.svg @@ -3,7 +3,7 @@ Generated by IcoMoon - \ No newline at end of file diff --git a/fonts/ascribe-logo.ttf b/fonts/ascribe-logo.ttf index 79acfe89..61cdce03 100644 Binary files a/fonts/ascribe-logo.ttf and b/fonts/ascribe-logo.ttf differ diff --git a/fonts/ascribe-logo.woff b/fonts/ascribe-logo.woff index e8c8b031..c563df56 100644 Binary files a/fonts/ascribe-logo.woff and b/fonts/ascribe-logo.woff differ diff --git a/fonts/ascribe.eot b/fonts/ascribe.eot deleted file mode 100644 index 39a72757..00000000 Binary files a/fonts/ascribe.eot and /dev/null differ diff --git a/fonts/ascribe.svg b/fonts/ascribe.svg deleted file mode 100644 index 5151a129..00000000 --- a/fonts/ascribe.svg +++ /dev/null @@ -1,51 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/fonts/ascribe.ttf b/fonts/ascribe.ttf deleted file mode 100644 index ad669075..00000000 Binary files a/fonts/ascribe.ttf and /dev/null differ diff --git a/fonts/ascribe.woff b/fonts/ascribe.woff deleted file mode 100644 index 9e1a8cee..00000000 Binary files a/fonts/ascribe.woff and /dev/null differ diff --git a/fonts/ascribe_wortmarke_logo.svg b/fonts/ascribe_wortmarke_logo.svg deleted file mode 100644 index 8e12812f..00000000 --- a/fonts/ascribe_wortmarke_logo.svg +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/fonts/ascribe_wortmarke_logo_chunked.svg b/fonts/ascribe_wortmarke_logo_chunked.svg deleted file mode 100644 index 03dccf2c..00000000 --- a/fonts/ascribe_wortmarke_logo_chunked.svg +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/img/ascribe_animated_large.gif b/img/ascribe_animated_large.gif deleted file mode 100644 index bb3c620d..00000000 Binary files a/img/ascribe_animated_large.gif and /dev/null differ diff --git a/img/ascribe_animated_medium.gif b/img/ascribe_animated_medium.gif deleted file mode 100644 index 2b3994b6..00000000 Binary files a/img/ascribe_animated_medium.gif and /dev/null differ diff --git a/img/ascribe_animated_small.gif b/img/ascribe_animated_small.gif deleted file mode 100644 index 7d249c1e..00000000 Binary files a/img/ascribe_animated_small.gif and /dev/null differ diff --git a/img/hq-favicons/android-chrome-144x144.png b/img/hq-favicons/android-chrome-144x144.png deleted file mode 100644 index a4777f6d..00000000 Binary files a/img/hq-favicons/android-chrome-144x144.png and /dev/null differ diff --git a/img/hq-favicons/android-chrome-36x36.png b/img/hq-favicons/android-chrome-36x36.png deleted file mode 100644 index 911ef14d..00000000 Binary files a/img/hq-favicons/android-chrome-36x36.png and /dev/null differ diff --git a/img/hq-favicons/android-chrome-48x48.png b/img/hq-favicons/android-chrome-48x48.png deleted file mode 100644 index cfe6f943..00000000 Binary files a/img/hq-favicons/android-chrome-48x48.png and /dev/null differ diff --git a/img/hq-favicons/android-chrome-72x72.png b/img/hq-favicons/android-chrome-72x72.png deleted file mode 100644 index 410570d2..00000000 Binary files a/img/hq-favicons/android-chrome-72x72.png and /dev/null differ diff --git a/img/hq-favicons/android-chrome-96x96.png b/img/hq-favicons/android-chrome-96x96.png deleted file mode 100644 index 9a56e62e..00000000 Binary files a/img/hq-favicons/android-chrome-96x96.png and /dev/null differ diff --git a/img/hq-favicons/apple-touch-icon-114x114.png b/img/hq-favicons/apple-touch-icon-114x114.png deleted file mode 100644 index 023f0f59..00000000 Binary files a/img/hq-favicons/apple-touch-icon-114x114.png and /dev/null differ diff --git a/img/hq-favicons/apple-touch-icon-120x120.png b/img/hq-favicons/apple-touch-icon-120x120.png deleted file mode 100644 index b486e979..00000000 Binary files a/img/hq-favicons/apple-touch-icon-120x120.png and /dev/null differ diff --git a/img/hq-favicons/apple-touch-icon-144x144.png b/img/hq-favicons/apple-touch-icon-144x144.png deleted file mode 100644 index 67f32eb8..00000000 Binary files a/img/hq-favicons/apple-touch-icon-144x144.png and /dev/null differ diff --git a/img/hq-favicons/apple-touch-icon-152x152.png b/img/hq-favicons/apple-touch-icon-152x152.png deleted file mode 100644 index b743be73..00000000 Binary files a/img/hq-favicons/apple-touch-icon-152x152.png and /dev/null differ diff --git a/img/hq-favicons/apple-touch-icon-57x57.png b/img/hq-favicons/apple-touch-icon-57x57.png deleted file mode 100644 index 0be0361a..00000000 Binary files a/img/hq-favicons/apple-touch-icon-57x57.png and /dev/null differ diff --git a/img/hq-favicons/apple-touch-icon-60x60.png b/img/hq-favicons/apple-touch-icon-60x60.png deleted file mode 100644 index 8ac3468a..00000000 Binary files a/img/hq-favicons/apple-touch-icon-60x60.png and /dev/null differ diff --git a/img/hq-favicons/apple-touch-icon-72x72.png b/img/hq-favicons/apple-touch-icon-72x72.png deleted file mode 100644 index 7b50576e..00000000 Binary files a/img/hq-favicons/apple-touch-icon-72x72.png and /dev/null differ diff --git a/img/hq-favicons/apple-touch-icon-76x76.png b/img/hq-favicons/apple-touch-icon-76x76.png deleted file mode 100644 index 4e578567..00000000 Binary files a/img/hq-favicons/apple-touch-icon-76x76.png and /dev/null differ diff --git a/img/hq-favicons/apple-touch-icon-precomposed.png b/img/hq-favicons/apple-touch-icon-precomposed.png deleted file mode 100644 index e19914f7..00000000 Binary files a/img/hq-favicons/apple-touch-icon-precomposed.png and /dev/null differ diff --git a/img/hq-favicons/apple-touch-icon.png b/img/hq-favicons/apple-touch-icon.png deleted file mode 100644 index b743be73..00000000 Binary files a/img/hq-favicons/apple-touch-icon.png and /dev/null differ diff --git a/img/hq-favicons/browserconfig.xml b/img/hq-favicons/browserconfig.xml deleted file mode 100644 index e20a379b..00000000 --- a/img/hq-favicons/browserconfig.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - #00aba9 - - - diff --git a/img/hq-favicons/favicon-16x16.png b/img/hq-favicons/favicon-16x16.png deleted file mode 100644 index 8d5ac098..00000000 Binary files a/img/hq-favicons/favicon-16x16.png and /dev/null differ diff --git a/img/hq-favicons/favicon-32x32.png b/img/hq-favicons/favicon-32x32.png deleted file mode 100644 index 1b5f8ac4..00000000 Binary files a/img/hq-favicons/favicon-32x32.png and /dev/null differ diff --git a/img/hq-favicons/favicon-96x96.png b/img/hq-favicons/favicon-96x96.png deleted file mode 100644 index ceb14185..00000000 Binary files a/img/hq-favicons/favicon-96x96.png and /dev/null differ diff --git a/img/hq-favicons/favicon.ico b/img/hq-favicons/favicon.ico deleted file mode 100644 index 0ef49205..00000000 Binary files a/img/hq-favicons/favicon.ico and /dev/null differ diff --git a/img/hq-favicons/manifest.json b/img/hq-favicons/manifest.json deleted file mode 100644 index 503e5f7b..00000000 --- a/img/hq-favicons/manifest.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "Ascribe", - "icons": [ - { - "src": "images\/hq-favicons\/android-chrome-36x36.png", - "sizes": "36x36", - "type": "image\/png", - "density": "0.75" - }, - { - "src": "images\/hq-favicons\/android-chrome-48x48.png", - "sizes": "48x48", - "type": "image\/png", - "density": "1.0" - }, - { - "src": "images\/hq-favicons\/android-chrome-72x72.png", - "sizes": "72x72", - "type": "image\/png", - "density": "1.5" - }, - { - "src": "images\/hq-favicons\/android-chrome-96x96.png", - "sizes": "96x96", - "type": "image\/png", - "density": "2.0" - }, - { - "src": "images\/hq-favicons\/android-chrome-144x144.png", - "sizes": "144x144", - "type": "image\/png", - "density": "3.0" - } - ] -} diff --git a/img/hq-favicons/mstile-144x144.png b/img/hq-favicons/mstile-144x144.png deleted file mode 100644 index 0a70e96b..00000000 Binary files a/img/hq-favicons/mstile-144x144.png and /dev/null differ diff --git a/img/hq-favicons/mstile-150x150.png b/img/hq-favicons/mstile-150x150.png deleted file mode 100644 index f3522797..00000000 Binary files a/img/hq-favicons/mstile-150x150.png and /dev/null differ diff --git a/img/hq-favicons/mstile-310x150.png b/img/hq-favicons/mstile-310x150.png deleted file mode 100644 index 9ac302ef..00000000 Binary files a/img/hq-favicons/mstile-310x150.png and /dev/null differ diff --git a/img/hq-favicons/mstile-310x310.png b/img/hq-favicons/mstile-310x310.png deleted file mode 100644 index 0490fe6b..00000000 Binary files a/img/hq-favicons/mstile-310x310.png and /dev/null differ diff --git a/img/hq-favicons/mstile-70x70.png b/img/hq-favicons/mstile-70x70.png deleted file mode 100644 index 1ebd9d1d..00000000 Binary files a/img/hq-favicons/mstile-70x70.png and /dev/null differ diff --git a/js/actions/contract_agreement_list_actions.js b/js/actions/contract_agreement_list_actions.js index 4993b129..1eedf5b0 100644 --- a/js/actions/contract_agreement_list_actions.js +++ b/js/actions/contract_agreement_list_actions.js @@ -22,8 +22,7 @@ class ContractAgreementListActions { if (contractAgreementList.count > 0) { this.actions.updateContractAgreementList(contractAgreementList.results); resolve(contractAgreementList.results); - } - else{ + } else { resolve(null); } }) @@ -35,13 +34,13 @@ class ContractAgreementListActions { ); } - fetchAvailableContractAgreementList(issuer, createContractAgreement) { + fetchAvailableContractAgreementList(issuer, createPublicContractAgreement) { return Q.Promise((resolve, reject) => { OwnershipFetcher.fetchContractAgreementList(issuer, true, null) .then((acceptedContractAgreementList) => { // if there is at least an accepted contract agreement, we're going to // use it - if(acceptedContractAgreementList.count > 0) { + if (acceptedContractAgreementList.count > 0) { this.actions.updateContractAgreementList(acceptedContractAgreementList.results); } else { // otherwise, we're looking for contract agreements that are still pending @@ -50,15 +49,13 @@ class ContractAgreementListActions { // overcomplicate the method OwnershipFetcher.fetchContractAgreementList(issuer, null, true) .then((pendingContractAgreementList) => { - if(pendingContractAgreementList.count > 0) { + if (pendingContractAgreementList.count > 0) { this.actions.updateContractAgreementList(pendingContractAgreementList.results); - } else { + } else if (createPublicContractAgreement) { // if there was neither a pending nor an active contractAgreement - // found and createContractAgreement is set to true, we create a - // new contract agreement - if(createContractAgreement) { - this.actions.createContractAgreementFromPublicContract(issuer); - } + // found and createPublicContractAgreement is set to true, we create a + // new public contract agreement + this.actions.createContractAgreementFromPublicContract(issuer); } }) .catch((err) => { @@ -81,8 +78,7 @@ class ContractAgreementListActions { // create an agreement with the public contract if there is one if (publicContract && publicContract.length > 0) { return this.actions.createContractAgreement(null, publicContract[0]); - } - else { + } else { /* contractAgreementList in the store is already set to null; */ @@ -91,21 +87,17 @@ class ContractAgreementListActions { if (publicContracAgreement) { this.actions.updateContractAgreementList([publicContracAgreement]); } - }).catch((err) => { - console.logGlobal(err); - }); + }).catch(console.logGlobal); } createContractAgreement(issuer, contract){ return Q.Promise((resolve, reject) => { - OwnershipFetcher.createContractAgreement(issuer, contract).then( - (contractAgreement) => { - resolve(contractAgreement); - } - ).catch((err) => { - console.logGlobal(err); - reject(err); - }); + OwnershipFetcher + .createContractAgreement(issuer, contract).then(resolve) + .catch((err) => { + console.logGlobal(err); + reject(err); + }); }); } } diff --git a/js/actions/edition_actions.js b/js/actions/edition_actions.js index 4bdf093a..3f659524 100644 --- a/js/actions/edition_actions.js +++ b/js/actions/edition_actions.js @@ -7,7 +7,8 @@ import EditionFetcher from '../fetchers/edition_fetcher'; class EditionActions { constructor() { this.generateActions( - 'updateEdition' + 'updateEdition', + 'editionFailed' ); } @@ -18,6 +19,7 @@ class EditionActions { }) .catch((err) => { console.logGlobal(err); + this.actions.editionFailed(err.json); }); } } diff --git a/js/actions/global_notification_actions.js b/js/actions/global_notification_actions.js index 2bb8d6e6..73aa9815 100644 --- a/js/actions/global_notification_actions.js +++ b/js/actions/global_notification_actions.js @@ -2,13 +2,15 @@ import { alt } from '../alt'; - class GlobalNotificationActions { constructor() { this.generateActions( 'appendGlobalNotification', + 'showNextGlobalNotification', 'shiftGlobalNotification', - 'emulateEmptyStore' + 'cooldownGlobalNotifications', + 'pauseGlobalNotifications', + 'resumeGlobalNotifications' ); } } diff --git a/js/actions/piece_actions.js b/js/actions/piece_actions.js index 7aed13fc..9002e8c5 100644 --- a/js/actions/piece_actions.js +++ b/js/actions/piece_actions.js @@ -8,7 +8,8 @@ class PieceActions { constructor() { this.generateActions( 'updatePiece', - 'updateProperty' + 'updateProperty', + 'pieceFailed' ); } @@ -19,6 +20,7 @@ class PieceActions { }) .catch((err) => { console.logGlobal(err); + this.actions.pieceFailed(err.json); }); } } diff --git a/js/components/ascribe_accordion_list/accordion_list_item_edition_widget.js b/js/components/ascribe_accordion_list/accordion_list_item_edition_widget.js index 5d3e033f..8033f239 100644 --- a/js/components/ascribe_accordion_list/accordion_list_item_edition_widget.js +++ b/js/components/ascribe_accordion_list/accordion_list_item_edition_widget.js @@ -78,7 +78,6 @@ let AccordionListItemEditionWidget = React.createClass({ return ( ); } else { @@ -137,4 +136,4 @@ let AccordionListItemEditionWidget = React.createClass({ } }); -export default AccordionListItemEditionWidget; \ No newline at end of file +export default AccordionListItemEditionWidget; diff --git a/js/components/ascribe_accordion_list/accordion_list_item_piece.js b/js/components/ascribe_accordion_list/accordion_list_item_piece.js index 4547ce3b..006479c5 100644 --- a/js/components/ascribe_accordion_list/accordion_list_item_piece.js +++ b/js/components/ascribe_accordion_list/accordion_list_item_piece.js @@ -4,6 +4,7 @@ import React from 'react'; import { Link } from 'react-router'; import AccordionListItem from './accordion_list_item'; +import AccordionListItemThumbnailPlacholder from './accordion_list_item_thumbnail_placeholder'; import { getLangText } from '../../utils/lang_utils'; @@ -19,7 +20,14 @@ let AccordionListItemPiece = React.createClass({ ]), subsubheading: React.PropTypes.object, buttons: React.PropTypes.object, - badge: React.PropTypes.object + badge: React.PropTypes.object, + thumbnailPlaceholder: React.PropTypes.func + }, + + getDefaultProps() { + return { + thumbnailPlaceholder: AccordionListItemThumbnailPlacholder + }; }, getLinkData() { @@ -34,19 +42,23 @@ let AccordionListItemPiece = React.createClass({ }, render() { - const { className, piece, artistName, buttons, badge, children, subsubheading } = this.props; + const { + artistName, + badge, + buttons, + children, + className, + piece, + subsubheading, + thumbnailPlaceholder: ThumbnailPlaceholder } = this.props; const { url, url_safe } = piece.thumbnail; let thumbnail; // Since we're going to refactor the thumbnail generation anyway at one point, // for not use the annoying ascribe_spiral.png, we're matching the url against // this name and replace it with a CSS version of the new logo. - if(url.match(/https:\/\/.*\/media\/thumbnails\/ascribe_spiral.png/)) { - thumbnail = ( - - A - - ); + if (url.match(/https:\/\/.*\/media\/thumbnails\/ascribe_spiral.png/)) { + thumbnail = (); } else { thumbnail = (
diff --git a/js/components/ascribe_accordion_list/accordion_list_item_thumbnail_placeholder.js b/js/components/ascribe_accordion_list/accordion_list_item_thumbnail_placeholder.js new file mode 100644 index 00000000..37c98371 --- /dev/null +++ b/js/components/ascribe_accordion_list/accordion_list_item_thumbnail_placeholder.js @@ -0,0 +1,15 @@ +'use strict' + +import React from 'react'; + +let AccordionListItemThumbnailPlaceholder = React.createClass({ + render() { + return ( + + A + + ); + } +}); + +export default AccordionListItemThumbnailPlaceholder; diff --git a/js/components/ascribe_accordion_list/accordion_list_item_wallet.js b/js/components/ascribe_accordion_list/accordion_list_item_wallet.js index da45d1e8..a8cab166 100644 --- a/js/components/ascribe_accordion_list/accordion_list_item_wallet.js +++ b/js/components/ascribe_accordion_list/accordion_list_item_wallet.js @@ -31,6 +31,7 @@ let AccordionListItemWallet = React.createClass({ propTypes: { className: React.PropTypes.string, content: React.PropTypes.object, + thumbnailPlaceholder: React.PropTypes.func, children: React.PropTypes.oneOfType([ React.PropTypes.arrayOf(React.PropTypes.element), React.PropTypes.element @@ -123,32 +124,36 @@ let AccordionListItemWallet = React.createClass({ }, render() { + const { children, className, content, thumbnailPlaceholder } = this.props; return ( - {Moment(this.props.content.date_created, 'YYYY-MM-DD').year()} + {Moment(content.date_created, 'YYYY-MM-DD').year()} {this.getLicences()} -
} + + } buttons={
-
} - badge={this.getGlyphicon()}> + + } + badge={this.getGlyphicon()} + thumbnailPlaceholder={thumbnailPlaceholder}> {this.getCreateEditionsDialog()} {/* this.props.children is AccordionListItemTableEditions */} - {this.props.children} + {children} ); } diff --git a/js/components/ascribe_buttons/acls/acl_button.js b/js/components/ascribe_buttons/acls/acl_button.js index 6a3df7b2..97f2e173 100644 --- a/js/components/ascribe_buttons/acls/acl_button.js +++ b/js/components/ascribe_buttons/acls/acl_button.js @@ -26,7 +26,7 @@ export default function ({ action, displayName, title, tooltip }) { availableAcls: React.PropTypes.object.isRequired, buttonAcceptName: React.PropTypes.string, buttonAcceptClassName: React.PropTypes.string, - currentUser: React.PropTypes.object.isRequired, + currentUser: React.PropTypes.object, email: React.PropTypes.string, pieceOrEditions: React.PropTypes.oneOfType([ React.PropTypes.object, diff --git a/js/components/ascribe_buttons/form_submit_button.js b/js/components/ascribe_buttons/form_submit_button.js new file mode 100644 index 00000000..087061d9 --- /dev/null +++ b/js/components/ascribe_buttons/form_submit_button.js @@ -0,0 +1,58 @@ +'use strict'; + +import React from 'react/addons'; + +const { string, object } = React.PropTypes; + +/** + * Originally, this button was introduced for `RegisterPieceForm`. + * The underlying problem that lead to the implementation was that multiple `InputFineuploader`s + * where displayed in one form. + * For the form's submit button always to represent an applicable state we had to save + * the ready states of the multiple uploaders in `RegisterPieceForm`. + * However, on each invocation of `this.setState`, we were re-rendering the form again, + * which caused (if the user had the file-selector open) a detachment between user input and + * displayed page. + * + * This button helps to outsource the state of the form's readiness to another component, + * to solve the problem. + */ +const FormSubmitButton = React.createClass({ + propTypes: { + defaultReadyStates: object.isRequired, + label: string.isRequired + }, + + getInitialState() { + return { + readyStates: this.props.defaultReadyStates + }; + }, + + setReadyStateForKey(key, state) { + const readyStates = React.addons.update(this.state.readyStates, { [key]: { $set: state } }); + this.setState({ readyStates }); + }, + + render() { + const { label } = this.props; + const { readyStates } = this.state; + + // Reduce all readyStates to a single boolean + const ready = Object.keys(readyStates) + .reduce((defaultState, stateKey) => { + return defaultState && readyStates[stateKey]; + }, true); + + return ( + + ); + } +}); + +export default FormSubmitButton; \ No newline at end of file diff --git a/js/components/ascribe_collapsible/collapsible_paragraph.js b/js/components/ascribe_collapsible/collapsible_paragraph.js index e146b42b..7ad8d0af 100644 --- a/js/components/ascribe_collapsible/collapsible_paragraph.js +++ b/js/components/ascribe_collapsible/collapsible_paragraph.js @@ -12,7 +12,9 @@ const CollapsibleParagraph = React.createClass({ React.PropTypes.object, React.PropTypes.array ]), - iconName: React.PropTypes.string + iconName: React.PropTypes.string, + show: React.PropTypes.bool, + defaultExpanded: React.PropTypes.bool }, getDefaultProps() { diff --git a/js/components/ascribe_detail/detail_property.js b/js/components/ascribe_detail/detail_property.js index 9ea37285..8b0f50b5 100644 --- a/js/components/ascribe_detail/detail_property.js +++ b/js/components/ascribe_detail/detail_property.js @@ -7,6 +7,7 @@ let DetailProperty = React.createClass({ propTypes: { label: React.PropTypes.string, value: React.PropTypes.oneOfType([ + React.PropTypes.number, React.PropTypes.string, React.PropTypes.element ]), diff --git a/js/components/ascribe_detail/edition.js b/js/components/ascribe_detail/edition.js index 254746a6..bc2f0cfa 100644 --- a/js/components/ascribe_detail/edition.js +++ b/js/components/ascribe_detail/edition.js @@ -41,12 +41,20 @@ import { getLangText } from '../../utils/lang_utils'; */ let Edition = React.createClass({ propTypes: { + actionPanelButtonListType: React.PropTypes.func, + furtherDetailsType: React.PropTypes.func, edition: React.PropTypes.object, loadEdition: React.PropTypes.func }, mixins: [History], + getDefaultProps() { + return { + furtherDetailsType: FurtherDetails + }; + }, + getInitialState() { return UserStore.getState(); }, @@ -74,6 +82,8 @@ let Edition = React.createClass({ }, render() { + let FurtherDetailsType = this.props.furtherDetailsType; + return ( @@ -89,6 +99,7 @@ let Edition = React.createClass({
@@ -136,7 +147,7 @@ let Edition = React.createClass({ currentUser={this.state.currentUser}/> {return {'bitcoin_id': this.props.edition.bitcoin_id}; }} - label={getLangText('Edition note (public)')} + label={getLangText('Personal note (public)')} defaultValue={this.props.edition.public_note ? this.props.edition.public_note : null} placeholder={getLangText('Enter your comments ...')} editable={!!this.props.edition.acl.acl_edit} @@ -150,7 +161,7 @@ let Edition = React.createClass({ show={this.props.edition.acl.acl_edit || Object.keys(this.props.edition.extra_data).length > 0 || this.props.edition.other_data.length > 0}> - 0){ - let statusStr = this.props.edition.status.join().replace(/_/, ' '); + let statusStr = this.props.edition.status.join(', ').replace(/_/g, ' '); status = ; if (this.props.edition.pending_new_owner && this.props.edition.acl.acl_withdraw_transfer){ status = ( @@ -195,7 +207,7 @@ let EditionSummary = React.createClass({ }, render() { - let { edition, currentUser } = this.props; + let { actionPanelButtonListType, edition, currentUser } = this.props; return (
{this.getStatus()} - + {/* + `acl_view` is always available in `edition.acl`, therefore if it has + no more than 1 key, we're hiding the `DetailProperty` actions as otherwise + `AclInformation` would show up + */} + 1}> diff --git a/js/components/ascribe_detail/edition_action_panel.js b/js/components/ascribe_detail/edition_action_panel.js index 2ef753fa..36a79e7c 100644 --- a/js/components/ascribe_detail/edition_action_panel.js +++ b/js/components/ascribe_detail/edition_action_panel.js @@ -36,6 +36,7 @@ import { getLangText } from '../../utils/lang_utils'; */ let EditionActionPanel = React.createClass({ propTypes: { + actionPanelButtonListType: React.PropTypes.func, edition: React.PropTypes.object, currentUser: React.PropTypes.object, handleSuccess: React.PropTypes.func @@ -43,6 +44,12 @@ let EditionActionPanel = React.createClass({ mixins: [History], + getDefaultProps() { + return { + actionPanelButtonListType: AclButtonList + }; + }, + getInitialState() { return PieceListStore.getState(); }, @@ -87,7 +94,10 @@ let EditionActionPanel = React.createClass({ }, render(){ - let {edition, currentUser} = this.props; + const { + actionPanelButtonListType: ActionPanelButtonListType, + edition, + currentUser } = this.props; if (edition && edition.notifications && @@ -104,7 +114,7 @@ let EditionActionPanel = React.createClass({ return ( -
}> + label={labels.email || getLangText('Email')} + editable={!defaultEmail} + onChange={this.handleEmailOnChange} + overrideForm={!!defaultEmail}> + label={labels.message || getLangText('Personal Message')} + editable + overrideForm> + + + diff --git a/js/components/ascribe_forms/form_create_contract.js b/js/components/ascribe_forms/form_create_contract.js index aac4c5ea..fcd874da 100644 --- a/js/components/ascribe_forms/form_create_contract.js +++ b/js/components/ascribe_forms/form_create_contract.js @@ -51,9 +51,9 @@ let CreateContractForm = React.createClass({ this.refs.form.reset(); }, - submitFileName(fileName) { + submitFile({ originalName }) { this.setState({ - contractName: fileName + contractName: originalName }); this.refs.form.submit(); @@ -69,7 +69,7 @@ let CreateContractForm = React.createClass({ name="blob" label={getLangText('Contract file (*.pdf only, max. 50MB per contract)')}>