From 846af9f110a5ce7becfdce2adeca4d056d40720f Mon Sep 17 00:00:00 2001 From: Nathan Trost Date: Tue, 31 May 2016 15:56:10 -0500 Subject: [PATCH] no message --- src/app/components/griddle-popup-text.js | 37 +++++++++++++++++++----- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/src/app/components/griddle-popup-text.js b/src/app/components/griddle-popup-text.js index 47b63a6..38f6b19 100644 --- a/src/app/components/griddle-popup-text.js +++ b/src/app/components/griddle-popup-text.js @@ -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); @@ -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( -
+ if(linkText) { + const abbreviatedText = linkText.substring(0,80); + + return (
{abbreviatedText} @@ -39,9 +39,14 @@ class GriddlePopupLink extends React.Component{
+ ); + } + } - - + modalBlock(linkText){ + if(linkText) { + return ( + {linkText} @@ -51,6 +56,22 @@ class GriddlePopupLink extends React.Component{ + ); + } + } + + 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( +
+ {abbreviatedBlock} + {modalBlock}
); }