diff --git a/css/main.css b/css/main.css index cbd7f7ec..153b4533 100644 --- a/css/main.css +++ b/css/main.css @@ -2,6 +2,10 @@ padding-top: 70px; } +.hidden { + display: none; +} + /* Taken from http://stackoverflow.com/a/20548578 */ .vcenter { display: inline-block; diff --git a/js/components/acl_button.js b/js/components/acl_button.js index 9d52a09a..6d4f1756 100644 --- a/js/components/acl_button.js +++ b/js/components/acl_button.js @@ -5,24 +5,21 @@ import AppConstants from '../constants/application_constants'; let AclButton = React.createClass({ propTypes: { action: React.PropTypes.oneOf(AppConstants.aclList).isRequired, - availableAcls: React.PropTypes.array.isRequired + availableAcls: React.PropTypes.array.isRequired, + actionFunction: React.PropTypes.func.isRequired + }, + + actionFunction() { + this.props.actionFunction(this.props.action); }, render() { let shouldDisplay = this.props.availableAcls.indexOf(this.props.action) > -1; - let styles = {}; - - if(shouldDisplay) { - styles.display = 'inline-block'; - } else { - styles.display = 'none'; - } - return ( ); 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 1ce4d744..4840b27a 100644 --- a/js/components/ascribe_piece_list_toolbar/piece_list_toolbar.js +++ b/js/components/ascribe_piece_list_toolbar/piece_list_toolbar.js @@ -3,6 +3,7 @@ import React from 'react'; import EditionListStore from '../../stores/edition_list_store'; import AclButton from '../acl_button'; +import PieceListToolbarSelectedEditionsWidget from './piece_list_toolbar_selected_editions_widget'; let PieceListToolbar = React.createClass({ getInitialState() { @@ -42,6 +43,10 @@ let PieceListToolbar = React.createClass({ return a.filter((val) => b.indexOf(val) > -1); }, + bulk(action) { + console.log(action); + }, + getAvailableAcls() { let availableAcls = []; let selectedEditionList = this.fetchSelectedEditionList(); @@ -67,11 +72,15 @@ let PieceListToolbar = React.createClass({ return (