1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 09:35:10 +01:00

Remove misleading editions prop to pieceOrEditions

This commit is contained in:
Brett Sun 2015-11-02 15:19:52 +01:00
parent 67fbfbd470
commit 6c8016e094
5 changed files with 14 additions and 14 deletions

View File

@ -17,7 +17,7 @@ import { mergeOptions } from '../../utils/general_utils';
let AclButtonList = React.createClass({
propTypes: {
className: React.PropTypes.string,
editions: React.PropTypes.oneOfType([
pieceOrEditions: React.PropTypes.oneOfType([
React.PropTypes.object,
React.PropTypes.array
]).isRequired,
@ -82,7 +82,7 @@ let AclButtonList = React.createClass({
const { className,
buttonsStyle,
availableAcls,
editions,
pieceOrEditions,
handleSuccess } = this.props;
const { currentUser } = this.state;
@ -92,27 +92,27 @@ let AclButtonList = React.createClass({
<span ref="buttonList" style={buttonsStyle}>
<ShareButton
availableAcls={availableAcls}
pieceOrEditions={editions}
pieceOrEditions={pieceOrEditions}
currentUser={currentUser}
handleSuccess={handleSuccess} />
<TransferButton
availableAcls={availableAcls}
pieceOrEditions={editions}
pieceOrEditions={pieceOrEditions}
currentUser={currentUser}
handleSuccess={handleSuccess}/>
<ConsignButton
availableAcls={availableAcls}
pieceOrEditions={editions}
pieceOrEditions={pieceOrEditions}
currentUser={currentUser}
handleSuccess={handleSuccess} />
<UnconsignButton
availableAcls={availableAcls}
pieceOrEditions={editions}
pieceOrEditions={pieceOrEditions}
currentUser={currentUser}
handleSuccess={handleSuccess} />
<LoanButton
availableAcls={availableAcls}
pieceOrEditions={editions}
pieceOrEditions={pieceOrEditions}
currentUser={currentUser}
handleSuccess={handleSuccess} />
{this.renderChildren()}

View File

@ -107,7 +107,7 @@ let EditionActionPanel = React.createClass({
<AclButtonList
className="ascribe-button-list"
availableAcls={edition.acl}
editions={[edition]}
pieceOrEditions={[edition]}
handleSuccess={this.handleSuccess}>
<AclProxy
aclObject={edition.acl}
@ -172,4 +172,4 @@ let EditionActionPanel = React.createClass({
}
});
export default EditionActionPanel;
export default EditionActionPanel;

View File

@ -199,7 +199,7 @@ let PieceContainer = React.createClass({
<AclButtonList
className="ascribe-button-list"
availableAcls={piece.acl}
editions={piece}
pieceOrEditions={piece}
handleSuccess={this.loadPiece}>
<CreateEditionsButton
label={getLangText('CREATE EDITIONS')}

View File

@ -117,7 +117,7 @@ let PieceListBulkModal = React.createClass({
<div className="row-fluid">
<AclButtonList
availableAcls={availableAcls}
editions={selectedEditions}
pieceOrEditions={selectedEditions}
handleSuccess={this.handleSuccess}
className="text-center ascribe-button-list collapse-group">
<DeleteButton
@ -136,4 +136,4 @@ let PieceListBulkModal = React.createClass({
}
});
export default PieceListBulkModal;
export default PieceListBulkModal;

View File

@ -47,7 +47,7 @@ let WalletActionPanel = React.createClass({
<AclButtonList
className="text-center ascribe-button-list"
availableAcls={availableAcls}
editions={this.props.piece}
pieceOrEditions={this.props.piece}
handleSuccess={this.props.loadPiece}>
<AclProxy
aclObject={this.props.currentUser.acl}
@ -69,4 +69,4 @@ let WalletActionPanel = React.createClass({
}
});
export default WalletActionPanel;
export default WalletActionPanel;