mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
fix loading feedback for piece list
This commit is contained in:
parent
bc53b4b54c
commit
ad833a53dc
@ -28,7 +28,8 @@ class PieceListActions {
|
|||||||
'pieceListCount': res.count
|
'pieceListCount': res.count
|
||||||
});
|
});
|
||||||
resolve();
|
resolve();
|
||||||
});
|
})
|
||||||
|
.catch((err) => reject(err));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
fetchPieceRequestActions() {
|
fetchPieceRequestActions() {
|
||||||
|
@ -6,7 +6,8 @@ let AccordionList = React.createClass({
|
|||||||
propTypes: {
|
propTypes: {
|
||||||
className: React.PropTypes.string,
|
className: React.PropTypes.string,
|
||||||
children: React.PropTypes.arrayOf(React.PropTypes.element).isRequired,
|
children: React.PropTypes.arrayOf(React.PropTypes.element).isRequired,
|
||||||
loadingElement: React.PropTypes.element
|
loadingElement: React.PropTypes.element,
|
||||||
|
count: React.PropTypes.number
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
@ -16,10 +17,10 @@ let AccordionList = React.createClass({
|
|||||||
{this.props.children}
|
{this.props.children}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
} else if(this.props.itemList.length === 0) {
|
} else if(this.props.count === 0) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<p className="text-center">You don't have any works yet...</p>
|
<p className="text-center">We could not find any works related to you...</p>
|
||||||
<p className="text-center">To register one, click <a href="register_piece">here</a>!</p>
|
<p className="text-center">To register one, click <a href="register_piece">here</a>!</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -76,6 +76,7 @@ let PieceList = React.createClass({
|
|||||||
className="ascribe-accordion-list"
|
className="ascribe-accordion-list"
|
||||||
changeOrder={this.accordionChangeOrder}
|
changeOrder={this.accordionChangeOrder}
|
||||||
itemList={this.state.pieceList}
|
itemList={this.state.pieceList}
|
||||||
|
count={this.state.pieceListCount}
|
||||||
orderBy={this.state.orderBy}
|
orderBy={this.state.orderBy}
|
||||||
orderAsc={this.state.orderAsc}
|
orderAsc={this.state.orderAsc}
|
||||||
search={this.state.search}
|
search={this.state.search}
|
||||||
|
@ -19,7 +19,7 @@ class PieceListStore {
|
|||||||
* the number of items the resource actually - without pagination - provides.
|
* the number of items the resource actually - without pagination - provides.
|
||||||
*/
|
*/
|
||||||
this.pieceList = [];
|
this.pieceList = [];
|
||||||
this.pieceListCount = 0;
|
this.pieceListCount = -1;
|
||||||
this.page = 1;
|
this.page = 1;
|
||||||
this.pageSize = 10;
|
this.pageSize = 10;
|
||||||
this.search = '';
|
this.search = '';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user