mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
Add small changes for previous merges that were missed
This commit is contained in:
parent
3929712e9d
commit
85eb45b5cd
@ -184,7 +184,7 @@ let PieceList = React.createClass({
|
|||||||
|
|
||||||
this.fetchSelectedPieceEditionList()
|
this.fetchSelectedPieceEditionList()
|
||||||
.forEach((pieceId) => {
|
.forEach((pieceId) => {
|
||||||
EditionListActions.refreshEditionList({pieceId, filterBy: {}});
|
EditionListActions.refreshEditionList({pieceId});
|
||||||
});
|
});
|
||||||
EditionListActions.clearAllEditionSelections();
|
EditionListActions.clearAllEditionSelections();
|
||||||
},
|
},
|
||||||
|
@ -6,6 +6,7 @@ import LumenusSubmitButton from './lumenus_submit_button';
|
|||||||
|
|
||||||
import DeleteButton from '../../../../../ascribe_buttons/delete_button';
|
import DeleteButton from '../../../../../ascribe_buttons/delete_button';
|
||||||
import ShareButton from '../../../../../ascribe_buttons/acls/share_button';
|
import ShareButton from '../../../../../ascribe_buttons/acls/share_button';
|
||||||
|
import TransferButton from '../../../../../ascribe_buttons/acls/transfer_button';
|
||||||
|
|
||||||
import UserActions from '../../../../../../actions/user_actions';
|
import UserActions from '../../../../../../actions/user_actions';
|
||||||
import UserStore from '../../../../../../stores/user_store';
|
import UserStore from '../../../../../../stores/user_store';
|
||||||
@ -46,13 +47,18 @@ let LumenusAclButtonList = React.createClass({
|
|||||||
<LumenusSubmitButton
|
<LumenusSubmitButton
|
||||||
availableAcls={availableAcls}
|
availableAcls={availableAcls}
|
||||||
currentUser={this.state.currentUser}
|
currentUser={this.state.currentUser}
|
||||||
pieceOrEditions={pieceOrEditions}
|
editions={pieceOrEditions}
|
||||||
handleSuccess={handleSuccess} />
|
handleSuccess={handleSuccess} />
|
||||||
<ShareButton
|
<ShareButton
|
||||||
availableAcls={availableAcls}
|
availableAcls={availableAcls}
|
||||||
currentUser={this.state.currentUser}
|
currentUser={this.state.currentUser}
|
||||||
pieceOrEditions={pieceOrEditions}
|
pieceOrEditions={pieceOrEditions}
|
||||||
handleSuccess={handleSuccess} />
|
handleSuccess={handleSuccess} />
|
||||||
|
<TransferButton
|
||||||
|
availableAcls={availableAcls}
|
||||||
|
currentUser={this.state.currentUser}
|
||||||
|
pieceOrEditions={pieceOrEditions}
|
||||||
|
handleSuccess={handleSuccess} />
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -28,8 +28,7 @@ let LumenusAdditionalDataForm = React.createClass({
|
|||||||
extra_data: React.PropTypes.object,
|
extra_data: React.PropTypes.object,
|
||||||
other_data: React.PropTypes.arrayOf(React.PropTypes.object)
|
other_data: React.PropTypes.arrayOf(React.PropTypes.object)
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
isInline: React.PropTypes.bool,
|
isInline: React.PropTypes.bool
|
||||||
location: React.PropTypes.object
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getDefaultProps() {
|
getDefaultProps() {
|
||||||
@ -125,8 +124,7 @@ let LumenusAdditionalDataForm = React.createClass({
|
|||||||
setIsUploadReady={this.setIsUploadReady}
|
setIsUploadReady={this.setIsUploadReady}
|
||||||
isReadyForFormSubmission={formSubmissionValidation.atLeastOneUploadedFile}
|
isReadyForFormSubmission={formSubmissionValidation.atLeastOneUploadedFile}
|
||||||
pieceId={piece.id}
|
pieceId={piece.id}
|
||||||
otherData={piece.other_data}
|
otherData={piece.other_data} />
|
||||||
location={this.props.location}/>
|
|
||||||
<Property
|
<Property
|
||||||
name='artist_bio'
|
name='artist_bio'
|
||||||
label={getLangText('Artist Bio')}>
|
label={getLangText('Artist Bio')}>
|
||||||
|
@ -22,10 +22,10 @@ let LumenusPieceList = React.createClass({
|
|||||||
redirectTo="/register_piece?slide_num=0"
|
redirectTo="/register_piece?slide_num=0"
|
||||||
bulkModalButtonListType={LumenusAclButtonList}
|
bulkModalButtonListType={LumenusAclButtonList}
|
||||||
filterParams={[{
|
filterParams={[{
|
||||||
label: getLangText('Show works I have'),
|
label: getLangText('Show works I can'),
|
||||||
items: [{
|
items: [{
|
||||||
key: 'acl_consigned',
|
key: 'acl_consign',
|
||||||
label: getLangText('consigned to Lumenus')
|
label: getLangText('consign to Lumenus')
|
||||||
}]
|
}]
|
||||||
}]}
|
}]}
|
||||||
location={this.props.location}/>
|
location={this.props.location}/>
|
||||||
|
@ -60,7 +60,7 @@ class EditionListStore {
|
|||||||
* We often just have to refresh the edition list for a certain pieceId,
|
* We often just have to refresh the edition list for a certain pieceId,
|
||||||
* this method provides exactly that functionality without any side effects
|
* this method provides exactly that functionality without any side effects
|
||||||
*/
|
*/
|
||||||
onRefreshEditionList({pieceId, filterBy}) {
|
onRefreshEditionList({pieceId, filterBy = {}}) {
|
||||||
// It may happen that the user enters the site logged in already
|
// It may happen that the user enters the site logged in already
|
||||||
// through /editions
|
// through /editions
|
||||||
// If he then tries to delete a piece/edition and this method is called,
|
// If he then tries to delete a piece/edition and this method is called,
|
||||||
|
@ -99,8 +99,7 @@ class Requests {
|
|||||||
return newUrl;
|
return newUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
request(verb, url, options) {
|
request(verb, url, options = {}) {
|
||||||
options = options || {};
|
|
||||||
let merged = Object.assign({}, this.httpOptions, options);
|
let merged = Object.assign({}, this.httpOptions, options);
|
||||||
let csrftoken = getCookie(AppConstants.csrftoken);
|
let csrftoken = getCookie(AppConstants.csrftoken);
|
||||||
if (csrftoken) {
|
if (csrftoken) {
|
||||||
@ -128,13 +127,10 @@ class Requests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_putOrPost(url, paramsAndBody, method) {
|
_putOrPost(url, paramsAndBody, method) {
|
||||||
let paramsCopy = Object.assign({}, paramsAndBody);
|
|
||||||
let params = omitFromObject(paramsAndBody, ['body']);
|
let params = omitFromObject(paramsAndBody, ['body']);
|
||||||
let newUrl = this.prepareUrl(url, params);
|
let newUrl = this.prepareUrl(url, params);
|
||||||
let body = null;
|
let body = paramsAndBody && paramsAndBody.body ? JSON.stringify(paramsAndBody.body)
|
||||||
if (paramsCopy && paramsCopy.body) {
|
: null;
|
||||||
body = JSON.stringify(paramsCopy.body);
|
|
||||||
}
|
|
||||||
return this.request(method, newUrl, { body });
|
return this.request(method, newUrl, { body });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user