diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/react/components/file_attachment.jsx | 10 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_files.scss | 9 |
2 files changed, 13 insertions, 6 deletions
diff --git a/web/react/components/file_attachment.jsx b/web/react/components/file_attachment.jsx index b7ea5734f..de9e2a04b 100644 --- a/web/react/components/file_attachment.jsx +++ b/web/react/components/file_attachment.jsx @@ -113,6 +113,14 @@ module.exports = React.createClass({ fileSizeString = utils.fileSizeToString(this.state.fileSize); } + var filenameString = decodeURIComponent(utils.getFileName(filename)); + if(filenameString.length > 35){ + trimmedFilename = filenameString.substring(0, Math.min(35,filenameString.length)) + "..."; + } + else { + trimmedFilename = decodeURIComponent(utils.getFileName(filename));; + } + return ( <div className="post-image__column" key={filename}> <a className="post-image__thumbnail" href="#" onClick={this.props.handleImageClick} @@ -120,7 +128,7 @@ module.exports = React.createClass({ {thumbnail} </a> <div className="post-image__details"> - <div className="post-image__name">{decodeURIComponent(utils.getFileName(filename))}</div> + <div data-toggle="tooltip" title={decodeURIComponent(utils.getFileName(filename))} className="post-image__name">{trimmedFilename}</div> <div> <span className="post-image__type">{fileInfo.ext.toUpperCase()}</span> <span className="post-image__size">{fileSizeString}</span> diff --git a/web/sass-files/sass/partials/_files.scss b/web/sass-files/sass/partials/_files.scss index 65775f01e..ca06d7def 100644 --- a/web/sass-files/sass/partials/_files.scss +++ b/web/sass-files/sass/partials/_files.scss @@ -115,7 +115,6 @@ height: 100px; float: left; margin: 5px 10px 5px 0; - display: table; border: 1px solid lightgrey; .post__load { height: 100%; @@ -137,16 +136,16 @@ } } .post-image__thumbnail { - display: table-cell; - vertical-align: top; + float: left; width: 50%; height: 100%; cursor: zoom-in; cursor: -webkit-zoom-in; } .post-image__details { - display: table-cell; - vertical-align: top; + float: left; + @include clearfix; + word-break: break-word; width: 50%; height: 100%; background: white; |