mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
Fix MediaContainer not being refreshed while in Edition
This commit is contained in:
parent
40041197d6
commit
ed264d8511
@ -8,23 +8,23 @@ import Row from 'react-bootstrap/lib/Row';
|
|||||||
import Col from 'react-bootstrap/lib/Col';
|
import Col from 'react-bootstrap/lib/Col';
|
||||||
import Glyphicon from 'react-bootstrap/lib/Glyphicon';
|
import Glyphicon from 'react-bootstrap/lib/Glyphicon';
|
||||||
|
|
||||||
import HistoryIterator from './history_iterator';
|
import EditionActions from '../../actions/edition_actions';
|
||||||
|
|
||||||
import MediaContainer from './media_container';
|
|
||||||
|
|
||||||
import CollapsibleParagraph from './../ascribe_collapsible/collapsible_paragraph';
|
|
||||||
|
|
||||||
import Form from './../ascribe_forms/form';
|
|
||||||
import Property from './../ascribe_forms/property';
|
|
||||||
import DetailProperty from './detail_property';
|
import DetailProperty from './detail_property';
|
||||||
import LicenseDetail from './license_detail';
|
|
||||||
import FurtherDetails from './further_details';
|
|
||||||
|
|
||||||
import EditionActionPanel from './edition_action_panel';
|
import EditionActionPanel from './edition_action_panel';
|
||||||
import AclProxy from '../acl_proxy';
|
import FurtherDetails from './further_details';
|
||||||
|
import HistoryIterator from './history_iterator';
|
||||||
|
import LicenseDetail from './license_detail';
|
||||||
|
import MediaContainer from './media_container';
|
||||||
import Note from './note';
|
import Note from './note';
|
||||||
|
|
||||||
|
import CollapsibleParagraph from '../ascribe_collapsible/collapsible_paragraph';
|
||||||
|
|
||||||
|
import Form from '../ascribe_forms/form';
|
||||||
|
import Property from '../ascribe_forms/property';
|
||||||
|
|
||||||
|
import AclProxy from '../acl_proxy';
|
||||||
|
|
||||||
import ApiUrls from '../../constants/api_urls';
|
import ApiUrls from '../../constants/api_urls';
|
||||||
import AscribeSpinner from '../ascribe_spinner';
|
import AscribeSpinner from '../ascribe_spinner';
|
||||||
|
|
||||||
@ -37,10 +37,10 @@ import { getLangText } from '../../utils/lang_utils';
|
|||||||
let Edition = React.createClass({
|
let Edition = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
actionPanelButtonListType: React.PropTypes.func,
|
actionPanelButtonListType: React.PropTypes.func,
|
||||||
furtherDetailsType: React.PropTypes.func,
|
|
||||||
edition: React.PropTypes.object,
|
|
||||||
coaError: React.PropTypes.object,
|
coaError: React.PropTypes.object,
|
||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
|
edition: React.PropTypes.object,
|
||||||
|
furtherDetailsType: React.PropTypes.func,
|
||||||
loadEdition: React.PropTypes.func
|
loadEdition: React.PropTypes.func
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -50,6 +50,10 @@ let Edition = React.createClass({
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
updateEdition() {
|
||||||
|
return EditionActions.fetchEdition(this.props.edition.bitcoin_id);
|
||||||
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
actionPanelButtonListType,
|
actionPanelButtonListType,
|
||||||
@ -64,7 +68,8 @@ let Edition = React.createClass({
|
|||||||
<Col md={6} className="ascribe-print-col-left">
|
<Col md={6} className="ascribe-print-col-left">
|
||||||
<MediaContainer
|
<MediaContainer
|
||||||
content={edition}
|
content={edition}
|
||||||
currentUser={currentUser} />
|
currentUser={currentUser}
|
||||||
|
refreshObject={this.updateEdition} />
|
||||||
</Col>
|
</Col>
|
||||||
<Col md={6} className="ascribe-edition-details ascribe-print-col-right">
|
<Col md={6} className="ascribe-edition-details ascribe-print-col-right">
|
||||||
<div className="ascribe-detail-header">
|
<div className="ascribe-detail-header">
|
||||||
|
@ -26,8 +26,7 @@ let Piece = React.createClass({
|
|||||||
])
|
])
|
||||||
},
|
},
|
||||||
|
|
||||||
|
updatePiece() {
|
||||||
updateObject() {
|
|
||||||
return PieceActions.fetchOne(this.props.piece.id);
|
return PieceActions.fetchOne(this.props.piece.id);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -40,7 +39,7 @@ let Piece = React.createClass({
|
|||||||
<MediaContainer
|
<MediaContainer
|
||||||
content={piece}
|
content={piece}
|
||||||
currentUser={currentUser}
|
currentUser={currentUser}
|
||||||
refreshObject={this.updateObject} />
|
refreshObject={this.updatePiece} />
|
||||||
</Col>
|
</Col>
|
||||||
<Col md={6} className="ascribe-edition-details ascribe-print-col-right">
|
<Col md={6} className="ascribe-edition-details ascribe-print-col-right">
|
||||||
{header}
|
{header}
|
||||||
|
Loading…
Reference in New Issue
Block a user