From e2997891df7d8e90705eea68e863682ca8d9ab75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Tue, 16 Jun 2015 09:57:14 +0200 Subject: [PATCH] loading icon for piece list --- .eslintignore | 4 +++- img/ascribe_animated_medium.gif | Bin 0 -> 5855 bytes .../ascribe_accordion_list/accordion_list.js | 8 +++++--- .../ascribe_buttons/button_submit_close.js | 2 +- js/components/piece_list.js | 8 ++++++-- sass/ascribe_accordion_list.scss | 10 ++++++++++ server.js | 1 + 7 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 img/ascribe_animated_medium.gif diff --git a/.eslintignore b/.eslintignore index c6d53e29..25c2038b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,4 +2,6 @@ gulpfile.js node_modules -js/**/__tests__ \ No newline at end of file +js/**/__tests__ + +server.js \ No newline at end of file diff --git a/img/ascribe_animated_medium.gif b/img/ascribe_animated_medium.gif new file mode 100644 index 0000000000000000000000000000000000000000..2b3994b64d546b8370def0846b7c966c101660f1 GIT binary patch literal 5855 zcmeI0X;jl^8pT5rAu#~~DT@#mtFj3qG9_VgLm&wRog+v{)KV0}<_eO9q!vX31W=I> z0z?pmu&AJbCPJ+gWC>73QI?>9A_)O0n=DabbgGq^Gmbs&OpiVK;r;Y~zx;pa-uvA5 zamBbGQQw#YtNoXu;%sec1yXqRY2~W}czqcF z?2A94(0Jucb_UZ&sWnG$k2sL9B0>YY7DwT>C?y`0U2jjh5w1M?cz8UQu%Y*)rwx#O z_HL5x&?ek@gymGtwq4EMq3Y$|R(@?URrDp@35a#De}ov z;{lXu+pFl)<+f-^0Hus#;!L%HdJFS}9rsMRl0MTk8`5M0p3^aKN;~M;wmQUk9V~Nx~=3n5PLoGjxkFdL@_LkcnL&tpu)T&F=0jL z+60Kf-s=nI9O>z2&XuMWU(`Pae8U3x?#H9hosGX>dPM>_lY9dB?-0Nn>Q43Cjn0e3 z8X)igtm_(_8al-*0xPfU8Nu7=GcoP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gY z7$mpD*gq9BAU#mlFN8!Gn~`oy%Z_8~CZuwS56OhJJ|sADG&v;2?rs6K1N$N$?b8YI zg|<}`ZZ{ieB`>hZGGoAXf@68SmwWVJ^!*kdxScp7oPPm3d1~#H?D}QL)cV5AogVAD zH#5)Eo>P=3_#urKDC=gQeq%CXeF>bqCn;8p&7QuX@1k@BhP;k`gUXUBWdd>%jl vGJZZcoZsDWKAJb}U!X{TTCD!a^K8B$KW_p4s#}1Mc+K=)D}KUDO8b8RuA!E; literal 0 HcmV?d00001 diff --git a/js/components/ascribe_accordion_list/accordion_list.js b/js/components/ascribe_accordion_list/accordion_list.js index a17aed36..854e08bf 100644 --- a/js/components/ascribe_accordion_list/accordion_list.js +++ b/js/components/ascribe_accordion_list/accordion_list.js @@ -2,11 +2,11 @@ import React from 'react'; - let AccordionList = React.createClass({ propTypes: { className: React.PropTypes.string, - children: React.PropTypes.arrayOf(React.PropTypes.element).isRequired + children: React.PropTypes.arrayOf(React.PropTypes.element).isRequired, + loadingElement: React.PropTypes.element }, render() { @@ -18,7 +18,9 @@ let AccordionList = React.createClass({ ); } else { return ( -

Loading

+
+ {this.props.loadingElement} +
); } } diff --git a/js/components/ascribe_buttons/button_submit_close.js b/js/components/ascribe_buttons/button_submit_close.js index d5a94f91..9f7f56f8 100644 --- a/js/components/ascribe_buttons/button_submit_close.js +++ b/js/components/ascribe_buttons/button_submit_close.js @@ -13,7 +13,7 @@ let ButtonSubmitOrClose = React.createClass({ if (this.props.submitted){ return (
- +
); } diff --git a/js/components/piece_list.js b/js/components/piece_list.js index 7ca31cc2..ce3a732f 100644 --- a/js/components/piece_list.js +++ b/js/components/piece_list.js @@ -15,6 +15,8 @@ import Pagination from './ascribe_pagination/pagination'; import PieceListBulkModal from './ascribe_piece_list_bulk_modal/piece_list_bulk_modal'; import PieceListToolbar from './ascribe_piece_list_toolbar/piece_list_toolbar'; +import AppConstants from '../constants/application_constants'; + let PieceList = React.createClass({ propTypes: { @@ -62,10 +64,11 @@ let PieceList = React.createClass({ render() { let currentPage = parseInt(this.props.query.page, 10) || 1; let totalPages = Math.ceil(this.state.pieceListCount / this.state.pageSize); + let loadingElement = (); return (
- @@ -77,7 +80,8 @@ let PieceList = React.createClass({ orderAsc={this.state.orderAsc} search={this.state.search} page={this.state.page} - pageSize={this.state.pageSize}> + pageSize={this.state.pageSize} + loadingElement={loadingElement}> {this.state.pieceList.map((item, i) => { return (