mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
Merge branch 'master' of bitbucket.org:ascribe/onion
This commit is contained in:
commit
a31fe76926
@ -65,8 +65,10 @@ let AccordionListItem = React.createClass({
|
|||||||
getGlyphicon(){
|
getGlyphicon(){
|
||||||
if (this.props.content.requestAction) {
|
if (this.props.content.requestAction) {
|
||||||
return (
|
return (
|
||||||
<OverlayTrigger delay={500} placement="left"
|
<OverlayTrigger
|
||||||
overlay={<Tooltip>{getLangText('You have actions pending in one of your editions')}</Tooltip>}>
|
delay={500}
|
||||||
|
placement="left"
|
||||||
|
overlay={<Tooltip>{getLangText('You have actions pending in one of your editions')}</Tooltip>}>
|
||||||
<Glyphicon glyph='bell'/>
|
<Glyphicon glyph='bell'/>
|
||||||
</OverlayTrigger>);
|
</OverlayTrigger>);
|
||||||
}
|
}
|
||||||
|
@ -58,9 +58,19 @@ let AccordionListItemEditionWidget = React.createClass({
|
|||||||
let isEditionListOpen = this.state.isEditionListOpenForPieceId[pieceId] ? this.state.isEditionListOpenForPieceId[pieceId].show : false;
|
let isEditionListOpen = this.state.isEditionListOpenForPieceId[pieceId] ? this.state.isEditionListOpenForPieceId[pieceId].show : false;
|
||||||
|
|
||||||
if(isEditionListOpen) {
|
if(isEditionListOpen) {
|
||||||
return (
|
// this is the loading feedback for the editions
|
||||||
<span className="glyphicon glyphicon-menu-up" aria-hidden="true" style={{top: 2}}></span>
|
// button.
|
||||||
);
|
//
|
||||||
|
// PLEASE FUTURE TIM, DO NOT FUCKING REMOVE IT AGAIN!
|
||||||
|
if(typeof this.state.editionList[pieceId] === 'undefined') {
|
||||||
|
return (
|
||||||
|
<span className="glyph-ascribe-spool-chunked ascribe-color spin"/>
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return (
|
||||||
|
<span className="glyphicon glyphicon-menu-up" aria-hidden="true" style={{top: 2}}></span>
|
||||||
|
);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<span className="glyphicon glyphicon-menu-down" aria-hidden="true" style={{top: 2}}></span>
|
<span className="glyphicon glyphicon-menu-down" aria-hidden="true" style={{top: 2}}></span>
|
||||||
|
@ -5,7 +5,6 @@ import React from 'react';
|
|||||||
import EditionListActions from '../../actions/edition_list_actions';
|
import EditionListActions from '../../actions/edition_list_actions';
|
||||||
import EditionListStore from '../../stores/edition_list_store';
|
import EditionListStore from '../../stores/edition_list_store';
|
||||||
|
|
||||||
import { getAvailableAcls } from '../../utils/acl_utils';
|
|
||||||
import { getLangText } from '../../utils/lang_utils';
|
import { getLangText } from '../../utils/lang_utils';
|
||||||
|
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
@ -65,8 +64,6 @@ let CreateEditionsButton = React.createClass({
|
|||||||
render: function () {
|
render: function () {
|
||||||
let piece = this.props.piece;
|
let piece = this.props.piece;
|
||||||
|
|
||||||
let availableAcls = getAvailableAcls(piece);
|
|
||||||
|
|
||||||
if (!piece.acl.acl_editions || piece.num_editions > 0){
|
if (!piece.acl.acl_editions || piece.num_editions > 0){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -79,6 +79,7 @@ let Piece = React.createClass({
|
|||||||
|
|
||||||
handleEditionCreationSuccess() {
|
handleEditionCreationSuccess() {
|
||||||
PieceActions.updateProperty({key: 'num_editions', value: 0});
|
PieceActions.updateProperty({key: 'num_editions', value: 0});
|
||||||
|
PieceListStore.fetchPieceList(this.state.page, this.state.pageSize, this.state.search, this.state.orderBy, this.state.orderAsc);
|
||||||
this.toggleCreateEditionsDialog();
|
this.toggleCreateEditionsDialog();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user