1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-23 01:39:36 +01:00

add icons

This commit is contained in:
Tim Daubenschütz 2015-07-06 17:07:41 +02:00
parent 7863431727
commit 5ec54f4324
3 changed files with 33 additions and 32 deletions

View File

@ -22,25 +22,22 @@ let AccordionListItemTable = React.createClass({
render() {
if(this.props.show && this.props.itemList) {
return (
<div className={this.props.className}>
<Table
responsive
className="ascribe-table"
columnList={this.props.columnList}
itemList={this.props.itemList}
changeOrder={this.props.changeOrder}
orderBy={this.props.orderBy}
orderAsc={this.props.orderAsc}>
{this.props.itemList.map((item, i) => {
return (
<TableItem
className="ascribe-table-item-selectable"
key={i} />
);
})}
</Table>
{this.props.children}
</div>
<Table
responsive
className="ascribe-table"
columnList={this.props.columnList}
itemList={this.props.itemList}
changeOrder={this.props.changeOrder}
orderBy={this.props.orderBy}
orderAsc={this.props.orderAsc}>
{this.props.itemList.map((item, i) => {
return (
<TableItem
className="ascribe-table-item-selectable"
key={i} />
);
})}
</Table>
);
} else {
return (

View File

@ -170,9 +170,12 @@ let AccordionListItemTableEditions = React.createClass({
];
return (
<div>
<div className={this.props.className}>
<AccordionListItemTableToggle
className="ascribe-accordion-list-table-toggle"
onClick={this.toggleTable}
message={show ? <span><span className="glyphicon glyphicon-menu-up" aria-hidden="true" style={{top: 2}}></span> Hide all editions</span> : <span><span className="glyphicon glyphicon-menu-down" aria-hidden="true" style={{top: 2}}></span> Show all editions </span>} />
<AccordionListItemTable
className={this.props.className}
parentId={this.props.parentId}
itemList={editionsForPiece}
columnList={columnList}
@ -180,16 +183,11 @@ let AccordionListItemTableEditions = React.createClass({
orderBy={orderBy}
orderAsc={orderAsc}
changeOrder={this.changeEditionListOrder}>
<AccordionListItemTableToggle
className="ascribe-accordion-list-table-toggle"
onClick={this.loadFurtherEditions}
message={show && showExpandOption ? <p>Show me more</p> : ''} />
<AccordionListItemTableToggle
className="ascribe-accordion-list-table-toggle"
onClick={this.toggleTable}
message={show ? 'Hide all editions' : 'Show all editions'} />
</AccordionListItemTable>
<AccordionListItemTableToggle
className="ascribe-accordion-list-table-toggle"
onClick={this.loadFurtherEditions}
message={show && showExpandOption ? <span><span className="glyphicon glyphicon-option-horizontal" aria-hidden="true" style={{top: 3}}></span> Show me more</span> : ''} />
</div>
);
}

View File

@ -14,7 +14,13 @@ class EditionListStore {
onUpdateEditionList({pieceId, editionListOfPiece, page, pageSize, orderBy, orderAsc, count}) {
/*
Basically there are two modes an edition list can be updated.
1. The elements that have been requested from the server are not yet defined in the store => just assign them
2. The elements are already defined => merge current objects with the new ones from the server
*/
for(let i = 0; i < editionListOfPiece.length; i++) {
// if editionList for a specific piece does not exist yet,
@ -38,10 +44,10 @@ class EditionListStore {
}
/**
* orderBy and orderAsc are specific to a single list of editions
* page, pageSize, orderBy, orderAsc and count are specific to a single list of editions
* therefore they need to be saved in relation to their parent-piece.
*
* Default values for both are set in the editon_list-actions.
* Default values for both are set in the editon_list_actions.
*/
this.editionList[pieceId].page = page;
this.editionList[pieceId].pageSize = pageSize;