diff --git a/js/components/ascribe_accordion_list/accordion_list_item.js b/js/components/ascribe_accordion_list/accordion_list_item.js
index 69d4bae5..1694b171 100644
--- a/js/components/ascribe_accordion_list/accordion_list_item.js
+++ b/js/components/ascribe_accordion_list/accordion_list_item.js
@@ -63,7 +63,7 @@ let AccordionListItem = React.createClass({
{this.props.content.date_created.split('-')[0]}
+ piece={this.props.content}/>
{/*
{getLangText('%s license', this.props.content.license_type.code)}
*/}
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 92a8a1c4..08a676b3 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
@@ -53,9 +53,16 @@ let AccordionListItemEditionWidget = React.createClass({
let isEditionListOpen = this.state.isEditionListOpenForPieceId[pieceId] ? this.state.isEditionListOpenForPieceId[pieceId].show : false;
if(isEditionListOpen) {
- return (
-
- );
+ if(typeof this.state.editionList[pieceId] === 'undefined') {
+ return (
+
+ );
+ } else {
+ return (
+
+ );
+ }
+
} else {
return (
diff --git a/js/components/ascribe_accordion_list/accordion_list_item_table_editions.js b/js/components/ascribe_accordion_list/accordion_list_item_table_editions.js
index 3f588293..0ebdb2ab 100644
--- a/js/components/ascribe_accordion_list/accordion_list_item_table_editions.js
+++ b/js/components/ascribe_accordion_list/accordion_list_item_table_editions.js
@@ -92,6 +92,7 @@ let AccordionListItemTableEditions = React.createClass({
let showExpandOption = false;
let editionsForPiece = this.state.editionList[this.props.parentId];
+ let loadingSpinner =
;
// here we need to check if all editions of a specific
// piece are already defined. Otherwise .length will throw an error and we'll not
@@ -177,8 +178,6 @@ let AccordionListItemTableEditions = React.createClass({
)
];
- let loadingSpinner =
;
-
if(show && editionsForPiece && editionsForPiece.length > 0) {
return (
@@ -194,7 +193,7 @@ let AccordionListItemTableEditions = React.createClass({
Show me more {this.state.showMoreLoading ? loadingSpinner : null} : ''} />
+ message={show && showExpandOption ? {this.state.showMoreLoading ? loadingSpinner : } Show me more : null} />
);
} else {
diff --git a/js/components/piece_list.js b/js/components/piece_list.js
index 04f776e3..dc329444 100644
--- a/js/components/piece_list.js
+++ b/js/components/piece_list.js
@@ -47,7 +47,10 @@ let PieceList = React.createClass({
},
paginationGoToPage(page) {
+ // if the users clicks a pager of the pagination,
+ // the site should go to the top
document.body.scrollTop = document.documentElement.scrollTop = 0;
+
return () => PieceListActions.fetchPieceList(page, this.state.pageSize,
this.state.search, this.state.orderBy,
this.state.orderAsc);
@@ -67,6 +70,7 @@ let PieceList = React.createClass({
let currentPage = parseInt(this.props.query.page, 10) || 1;
let totalPages = Math.ceil(this.state.pieceListCount / this.state.pageSize);
let loadingElement = (
);
+
return (