mirror of
https://github.com/ascribe/onion.git
synced 2025-01-03 18:35:09 +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) {
|
if(this.props.itemList && this.props.itemList.length > 0) {
|
||||||
return (
|
return (
|
||||||
<div className="ascribe-table">
|
<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()}
|
{this.renderChildren()}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -111,8 +111,8 @@ let TableItemSubtable = React.createClass({
|
|||||||
<div className="row">
|
<div className="row">
|
||||||
{calcColumnElementContent()}
|
{calcColumnElementContent()}
|
||||||
<div className="col-xs-2 col-sm-2 col-md-2 col-lg-2 ascribe-table-item-column">
|
<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 content={this.props.columnContent['num_editions'] + ' Editions'}
|
||||||
</TableItemSubtableButton>
|
onClick={this.loadEditionList} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{renderEditionListTable()}
|
{renderEditionListTable()}
|
||||||
|
@ -23,11 +23,9 @@ let PieceList = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
let page = this.props.query.page || 1;
|
||||||
PieceListStore.listen(this.onChange);
|
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);
|
PieceListActions.fetchPieceList(page, this.state.pageSize, this.state.search, this.state.orderBy, this.state.orderAsc);
|
||||||
PieceListStore.listen(this.onChange);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
@ -56,7 +54,7 @@ let PieceList = React.createClass({
|
|||||||
new TableColumnContentModel('title', 'Title', TableItemText, 4, true)
|
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)
|
let totalPages = Math.ceil(this.state.pieceListCount / this.state.pageSize)
|
||||||
|
|
||||||
if(this.state.pieceList && this.state.pieceList.length > 0) {
|
if(this.state.pieceList && this.state.pieceList.length > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user