Skip to content

Commit

Permalink
Merge pull request #449 from getguesstimate/space-header-bugs
Browse files Browse the repository at this point in the history
Space header bugs
  • Loading branch information
mmcdermott committed Jun 1, 2016
2 parents 5d9592d + ac0bc5e commit 0330ffe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/components/spaces/show/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const SpaceHeader = ({
</a>
}

{space.editableByMe &&
<PrivacyToggle
headerText={'Privacy Options'}
openLink={<a className='space-header-action'>{privacy_header}</a>}
Expand All @@ -72,6 +73,7 @@ const SpaceHeader = ({
onPublicSelect={onPublicSelect}
onPrivateSelect={onPrivateSelect}
/>
}
</div>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/components/spaces/show/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
background: rgba(255,255,255,0.2);
margin-top: 4px;
margin-left: 8px;
margin-bottom: 5px;
margin-right: 0;
font-size: 0.92em;
float: right;
Expand Down Expand Up @@ -219,7 +220,7 @@
background: rgba(255,255,255,0.1);
padding: 0.3em 0.7em;
border-radius: 3px;
margin: 4px 0 0 8px;
margin: 4px 0 6px 8px;
}

.header .dropDown-relative .space-header-action:hover {
Expand Down
6 changes: 5 additions & 1 deletion src/components/utility/drop-down/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,14 @@ export default class DropDown extends Component {

handleDocumentClick(event) {
if (!ReactDOM.findDOMNode(this).contains(event.target)) {
this.setState({isOpen:false});
this._close()
}
}

componentWillUnmount() {
document.removeEventListener('click', this.handleDocumentClick, false);
}

_open() {
this.setState({isOpen: true})
document.addEventListener('click', this.handleDocumentClick, false);
Expand Down

0 comments on commit 0330ffe

Please sign in to comment.