diff --git a/js/components/ascribe_piece_list_toolbar/piece_list_toolbar.js b/js/components/ascribe_piece_list_toolbar/piece_list_toolbar.js index 2fd612fc..233f4089 100644 --- a/js/components/ascribe_piece_list_toolbar/piece_list_toolbar.js +++ b/js/components/ascribe_piece_list_toolbar/piece_list_toolbar.js @@ -31,6 +31,29 @@ let PieceListToolbar = React.createClass({ this.props.searchFor(searchTerm); }, + getFilterWidget(){ + if (this.props.filterParams){ + return ( + + ); + } + return null; + }, + getOrderWidget(){ + if (this.props.orderParams){ + return ( + + ); + } + return null; + }, + render() { let searchIcon = ; @@ -51,16 +74,8 @@ let PieceListToolbar = React.createClass({ addonAfter={searchIcon} /> - - - - + {this.getOrderWidget()} + {this.getFilterWidget()} diff --git a/js/components/whitelabel/prize/components/piece_list.js b/js/components/whitelabel/prize/components/piece_list.js index 2e570aed..2c838b6d 100644 --- a/js/components/whitelabel/prize/components/piece_list.js +++ b/js/components/whitelabel/prize/components/piece_list.js @@ -3,23 +3,34 @@ import React from 'react'; import PieceList from '../../../piece_list'; +import UserActions from '../../../../actions/user_actions'; +import UserStore from '../../../../stores/user_store'; + import PrizeActions from '../actions/prize_actions'; import PrizeStore from '../stores/prize_store'; import ButtonLink from 'react-router-bootstrap/lib/ButtonLink'; import AccordionListItemPrize from './ascribe_accordion_list/accordion_list_item_prize'; +import { mergeOptions } from '../../../../utils/general_utils'; + let PrizePieceList = React.createClass({ getInitialState() { - return PrizeStore.getState(); + return mergeOptions( + PrizeStore.getState(), + UserStore.getState() + ); }, componentDidMount() { + UserStore.listen(this.onChange); + UserActions.fetchCurrentUser(); PrizeStore.listen(this.onChange); PrizeActions.fetchPrize(); }, componentWillUnmount() { + UserStore.unlisten(this.onChange); PrizeStore.unlisten(this.onChange); }, @@ -43,7 +54,8 @@ let PrizePieceList = React.createClass({ ); diff --git a/sass/ascribe_piece_list_toolbar.scss b/sass/ascribe_piece_list_toolbar.scss index 44ded8a6..8756adf4 100644 --- a/sass/ascribe_piece_list_toolbar.scss +++ b/sass/ascribe_piece_list_toolbar.scss @@ -14,11 +14,13 @@ .ascribe-input-glyph > .form-group > .input-group { margin-left: 6px; input { + box-shadow: none; + background-color: transparent; border: 1px solid #02b6a3; border-right: 0; } > .input-group-addon { - background-color: white; + background-color: transparent; > .filter-glyph { color: #02b6a3; } diff --git a/sass/main.scss b/sass/main.scss index a657b002..de166b0c 100644 --- a/sass/main.scss +++ b/sass/main.scss @@ -80,6 +80,25 @@ hr { font-size: 0.8em; } +.navbar-default .navbar-nav > .active { + a { + background-color: transparent!important; + > span {color: #02b6a3;} + color: #02b6a3; + border-bottom: 1px solid #02b6a3; + + &:hover, &:focus{ + > span {color: #02b6a3;} + color: #02b6a3; + background-color: transparent; + border-bottom: 1px solid #02b6a3; + } + } +} +.navbar-default .navbar-nav > li > a { + border: 1px solid rgba(0,0,0,0); +} + .img-brand { padding: 0; height: 45px;