Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Trost authored and Nathan Trost committed May 31, 2016
1 parent 569bbd1 commit 846af9f
Showing 1 changed file with 29 additions and 8 deletions.
37 changes: 29 additions & 8 deletions src/app/components/griddle-popup-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Griddle from 'griddle-react';

import { Panel, Modal, Button } from 'react-bootstrap';


class GriddlePopupLink extends React.Component{
constructor(props){
super(props);
Expand All @@ -22,14 +23,13 @@ class GriddlePopupLink extends React.Component{
}


render(){

const displayName = this.props.metadata.displayName;
const linkText = this.props.rowData[this.props.metadata.columnName];
const abbreviatedText = linkText.substring(0,80);
abbreviatedBlock(linkText){

return(
<div className="griddle__inner-cell" data-table-cat={displayName}>
if(linkText) {
const abbreviatedText = linkText.substring(0,80);

return (
<div className="griddle__data">
<div>
{abbreviatedText}
Expand All @@ -39,9 +39,14 @@ class GriddlePopupLink extends React.Component{
</a>
</div>
</div>
);
}
}


<Modal show={this.state.show} onHide={this.handleToggle} >
modalBlock(linkText){
if(linkText) {
return (
<Modal show={this.state.show} onHide={this.handleToggle}>
<Modal.Body>
{linkText}
</Modal.Body>
Expand All @@ -51,6 +56,22 @@ class GriddlePopupLink extends React.Component{
</Button>
</Modal.Footer>
</Modal>
);
}
}

render(){

const displayName = this.props.metadata.displayName;
const linkText = this.props.rowData[this.props.metadata.columnName];

const abbreviatedBlock = this.abbreviatedBlock(linkText);
const modalBlock = this.modalBlock(linkText);

return(
<div className="griddle__inner-cell" data-table-cat={displayName}>
{abbreviatedBlock}
{modalBlock}
</div>
);
}
Expand Down

0 comments on commit 846af9f

Please sign in to comment.