From c4fc6ab97fa2a12f151351c55fe56b4aee07310f Mon Sep 17 00:00:00 2001 From: diminator Date: Tue, 29 Sep 2015 13:22:24 +0200 Subject: [PATCH 1/6] debug console log --- js/components/piece_list.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/components/piece_list.js b/js/components/piece_list.js index 35dcaba0..3050d590 100644 --- a/js/components/piece_list.js +++ b/js/components/piece_list.js @@ -144,6 +144,7 @@ let PieceList = React.createClass({ }, applyOrderBy(orderBy) { + console.log(orderBy); PieceListActions.fetchPieceList(this.state.page, this.state.pageSize, this.state.search, orderBy, this.state.orderAsc, this.state.filterBy); }, From 33ba4ce07f2f028514dec9e0ea97020d1ffae9a7 Mon Sep 17 00:00:00 2001 From: diminator Date: Tue, 29 Sep 2015 14:13:15 +0200 Subject: [PATCH 2/6] li instead of menuitem --- .../piece_list_toolbar_order_widget.js | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/js/components/ascribe_piece_list_toolbar/piece_list_toolbar_order_widget.js b/js/components/ascribe_piece_list_toolbar/piece_list_toolbar_order_widget.js index 38b92b6d..a44b8ca2 100644 --- a/js/components/ascribe_piece_list_toolbar/piece_list_toolbar_order_widget.js +++ b/js/components/ascribe_piece_list_toolbar/piece_list_toolbar_order_widget.js @@ -3,7 +3,6 @@ import React from 'react'; import DropdownButton from 'react-bootstrap/lib/DropdownButton'; -import MenuItem from 'react-bootstrap/lib/MenuItem'; import { getLangText } from '../../utils/lang_utils.js'; @@ -62,20 +61,22 @@ let PieceListToolbarOrderWidget = React.createClass({ {this.props.orderParams.map((param) => { return ( - -
- - {getLangText(param.replace('_', ' '))} - - -1} /> -
-
+
+
  • +
    + + {getLangText(param.replace('_', ' '))} + + -1} /> +
    +
  • +
    ); })} From ec0a458189127361a62cc4fcf0cce82278dc81ba Mon Sep 17 00:00:00 2001 From: diminator Date: Tue, 29 Sep 2015 14:14:59 +0200 Subject: [PATCH 3/6] removed console log --- js/components/piece_list.js | 1 - 1 file changed, 1 deletion(-) diff --git a/js/components/piece_list.js b/js/components/piece_list.js index 3050d590..35dcaba0 100644 --- a/js/components/piece_list.js +++ b/js/components/piece_list.js @@ -144,7 +144,6 @@ let PieceList = React.createClass({ }, applyOrderBy(orderBy) { - console.log(orderBy); PieceListActions.fetchPieceList(this.state.page, this.state.pageSize, this.state.search, orderBy, this.state.orderAsc, this.state.filterBy); }, From f64fb73aa6fd1487cce35e52743e93c5d7c428e5 Mon Sep 17 00:00:00 2001 From: diminator Date: Tue, 29 Sep 2015 15:58:24 +0200 Subject: [PATCH 4/6] cc fixes in licenses, collection and details --- js/components/ascribe_detail/edition.js | 3 +- .../ascribe_detail/license_detail.js | 31 +++++++++++++++++++ .../ascribe_detail/piece_container.js | 2 ++ .../wallet/components/cc/cc_register_piece.js | 21 ++++++++----- 4 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 js/components/ascribe_detail/license_detail.js diff --git a/js/components/ascribe_detail/edition.js b/js/components/ascribe_detail/edition.js index 115805ec..51884751 100644 --- a/js/components/ascribe_detail/edition.js +++ b/js/components/ascribe_detail/edition.js @@ -25,7 +25,7 @@ import CollapsibleParagraph from './../ascribe_collapsible/collapsible_paragraph import Form from './../ascribe_forms/form'; import Property from './../ascribe_forms/property'; import EditionDetailProperty from './detail_property'; - +import LicenseDetail from './license_detail'; import EditionFurtherDetails from './further_details'; import ListRequestActions from './../ascribe_forms/list_form_request_actions'; @@ -317,6 +317,7 @@ let EditionSummary = React.createClass({ + {this.getStatus()} {this.getActions()}
    diff --git a/js/components/ascribe_detail/license_detail.js b/js/components/ascribe_detail/license_detail.js new file mode 100644 index 00000000..c3cc9f62 --- /dev/null +++ b/js/components/ascribe_detail/license_detail.js @@ -0,0 +1,31 @@ +'use strict'; + +import React from 'react'; + +import DetailProperty from './detail_property'; + +/** + * This is the component that implements display-specific functionality + */ +let LicenseDetail = React.createClass({ + propTypes: { + license: React.PropTypes.object + }, + render () { + if (this.props.license.code === 'default') { + return null; + } + return ( + + { this.props.license.code.toUpperCase() + ': ' + this.props.license.name} + + } + /> + ); + } +}); + +export default LicenseDetail; diff --git a/js/components/ascribe_detail/piece_container.js b/js/components/ascribe_detail/piece_container.js index f14cf743..c2eb1759 100644 --- a/js/components/ascribe_detail/piece_container.js +++ b/js/components/ascribe_detail/piece_container.js @@ -19,6 +19,7 @@ import CollapsibleParagraph from './../ascribe_collapsible/collapsible_paragraph import FurtherDetails from './further_details'; import DetailProperty from './detail_property'; +import LicenseDetail from './license_detail'; import HistoryIterator from './history_iterator'; import AclButtonList from './../ascribe_buttons/acl_button_list'; @@ -224,6 +225,7 @@ let PieceContainer = React.createClass({
    +
    } buttons={this.getActions()}> diff --git a/js/components/whitelabel/wallet/components/cc/cc_register_piece.js b/js/components/whitelabel/wallet/components/cc/cc_register_piece.js index 129c1b0a..c9690477 100644 --- a/js/components/whitelabel/wallet/components/cc/cc_register_piece.js +++ b/js/components/whitelabel/wallet/components/cc/cc_register_piece.js @@ -46,12 +46,19 @@ let CCRegisterPiece = React.createClass({ label={getLangText('Copyright license%s', '...')} onChange={this.onLicenseChange} footer={ - - {getLangText('Learn more')} - + + + {getLangText('Learn more about ') + this.state.licenses[this.state.selectedLicense].code} + +  ( + + {getLangText('ascribe faq')} + ) + }>