mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
Merge branch 'master' into piece-detail-mediaplayer
This commit is contained in:
commit
fd72c1859c
@ -27,7 +27,12 @@ let Table = React.createClass({
|
||||
if(this.props.itemList && this.props.itemList.length > 0) {
|
||||
return (
|
||||
<div className="ascribe-table">
|
||||
<TableHeader columnList={this.props.columnList} itemList={this.props.itemList} fetchList={this.props.fetchList} changeOrder={this.props.changeOrder} orderAsc={this.props.orderAsc} orderBy={this.props.orderBy} />
|
||||
<TableHeader columnList={this.props.columnList}
|
||||
itemList={this.props.itemList}
|
||||
fetchList={this.props.fetchList}
|
||||
changeOrder={this.props.changeOrder}
|
||||
orderAsc={this.props.orderAsc}
|
||||
orderBy={this.props.orderBy} />
|
||||
{this.renderChildren()}
|
||||
</div>
|
||||
);
|
||||
|
@ -111,8 +111,8 @@ let TableItemSubtable = React.createClass({
|
||||
<div className="row">
|
||||
{calcColumnElementContent()}
|
||||
<div className="col-xs-2 col-sm-2 col-md-2 col-lg-2 ascribe-table-item-column">
|
||||
<TableItemSubtableButton content="Editions" onClick={this.loadEditionList}>
|
||||
</TableItemSubtableButton>
|
||||
<TableItemSubtableButton content={this.props.columnContent['num_editions'] + ' Editions'}
|
||||
onClick={this.loadEditionList} />
|
||||
</div>
|
||||
</div>
|
||||
{renderEditionListTable()}
|
||||
@ -121,4 +121,4 @@ let TableItemSubtable = React.createClass({
|
||||
}
|
||||
});
|
||||
|
||||
export default TableItemSubtable;
|
||||
export default TableItemSubtable;
|
||||
|
@ -23,11 +23,9 @@ let PieceList = React.createClass({
|
||||
},
|
||||
|
||||
componentDidMount() {
|
||||
let page = this.props.query.page || 1;
|
||||
PieceListStore.listen(this.onChange);
|
||||
|
||||
let page = this.props.query.page || this.state.page;
|
||||
PieceListActions.fetchPieceList(page, this.state.pageSize, this.state.search, this.state.orderBy, this.state.orderAsc);
|
||||
PieceListStore.listen(this.onChange);
|
||||
},
|
||||
|
||||
componentWillUnmount() {
|
||||
@ -56,7 +54,7 @@ let PieceList = React.createClass({
|
||||
new TableColumnContentModel('title', 'Title', TableItemText, 4, true)
|
||||
];
|
||||
|
||||
let currentPage = parseInt(this.props.query.page, 10);
|
||||
let currentPage = parseInt(this.props.query.page, 10) || 1;
|
||||
let totalPages = Math.ceil(this.state.pieceListCount / this.state.pageSize)
|
||||
|
||||
if(this.state.pieceList && this.state.pieceList.length > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user