mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
acl WIP
This commit is contained in:
parent
1b3f614c80
commit
3cc95cf7d5
@ -74,6 +74,7 @@ let AclButtonList = React.createClass({
|
||||
currentUser={this.state.currentUser}
|
||||
handleSuccess={this.props.handleSuccess} />
|
||||
<DeleteButton
|
||||
handleSuccess={this.props.handleSuccess}
|
||||
editions={this.props.editions}/>
|
||||
{this.props.children}
|
||||
</div>
|
||||
|
@ -19,18 +19,25 @@ import EditionListActions from '../../actions/edition_list_actions';
|
||||
|
||||
let DeleteButton = React.createClass({
|
||||
propTypes: {
|
||||
editions: React.PropTypes.array.isRequired
|
||||
editions: React.PropTypes.array.isRequired,
|
||||
handleSuccess: React.PropTypes.func
|
||||
},
|
||||
|
||||
mixins: [Router.Navigation],
|
||||
|
||||
showNotification(response) {
|
||||
if (this.props.editions.constructor === Array){
|
||||
this.props.editions
|
||||
.forEach((edition) => {
|
||||
EditionListActions.fetchEditionList(edition.parent);
|
||||
});
|
||||
}
|
||||
else {
|
||||
EditionListActions.fetchEditionList(this.props.editions.id);
|
||||
}
|
||||
EditionListActions.clearAllEditionSelections();
|
||||
EditionListActions.closeAllEditionLists();
|
||||
this.props.handleSuccess();
|
||||
this.transitionTo('pieces');
|
||||
let notification = new GlobalNotificationModel(response.notification, 'success');
|
||||
GlobalNotificationActions.appendGlobalNotification(notification);
|
||||
|
@ -16,7 +16,7 @@ let EditionRemoveFromCollectionForm = React.createClass({
|
||||
return requests.prepareUrl(apiUrls.edition_remove_from_collection, {edition_id: this.getBitcoinIds().join()});
|
||||
}
|
||||
else {
|
||||
return requests.prepareUrl(apiUrls.piece_remove_from_collection, {piece_id: this.editions.piece_id});
|
||||
return requests.prepareUrl(apiUrls.piece_remove_from_collection, {piece_id: this.props.editions.id});
|
||||
}
|
||||
},
|
||||
httpVerb(){
|
||||
|
Loading…
Reference in New Issue
Block a user