From fb609afd283e9c8e58e3e14d51c558ce7dd654ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Wed, 15 Jul 2015 17:32:51 +0200 Subject: [PATCH] loading feedback for edition button --- .../accordion_list_item.js | 6 ++++-- .../accordion_list_item_edition_widget.js | 16 +++++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/js/components/ascribe_accordion_list/accordion_list_item.js b/js/components/ascribe_accordion_list/accordion_list_item.js index 8a77c7bd..2820cce3 100644 --- a/js/components/ascribe_accordion_list/accordion_list_item.js +++ b/js/components/ascribe_accordion_list/accordion_list_item.js @@ -65,8 +65,10 @@ let AccordionListItem = React.createClass({ getGlyphicon(){ if (this.props.content.requestAction) { return ( - {getLangText('You have actions pending in one of your editions')}}> + {getLangText('You have actions pending in one of your editions')}}> ); } diff --git a/js/components/ascribe_accordion_list/accordion_list_item_edition_widget.js b/js/components/ascribe_accordion_list/accordion_list_item_edition_widget.js index abd6e7b2..7e108ae0 100644 --- a/js/components/ascribe_accordion_list/accordion_list_item_edition_widget.js +++ b/js/components/ascribe_accordion_list/accordion_list_item_edition_widget.js @@ -58,9 +58,19 @@ let AccordionListItemEditionWidget = React.createClass({ let isEditionListOpen = this.state.isEditionListOpenForPieceId[pieceId] ? this.state.isEditionListOpenForPieceId[pieceId].show : false; if(isEditionListOpen) { - return ( - - ); + // this is the loading feedback for the editions + // button. + // + // PLEASE FUTURE TIM, DO NOT FUCKING REMOVE IT AGAIN! + if(typeof this.state.editionList[pieceId] === 'undefined') { + return ( + + ); + } else { + return ( + + ); + } } else { return (