summaryrefslogtreecommitdiffstats
path: root/webapp/components/file_attachment.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-05-12 07:50:53 -0400
committerJoram Wilander <jwawilander@gmail.com>2016-05-12 07:50:53 -0400
commit4b260b761a78ea1a0dd6b02df7d25e93b496b6ff (patch)
treef82ff05a4692a52807260df326b9b12698ebf7f2 /webapp/components/file_attachment.jsx
parenta3cfdf04836bb5cef2c34626c07ce04349178792 (diff)
downloadchat-4b260b761a78ea1a0dd6b02df7d25e93b496b6ff.tar.gz
chat-4b260b761a78ea1a0dd6b02df7d25e93b496b6ff.tar.bz2
chat-4b260b761a78ea1a0dd6b02df7d25e93b496b6ff.zip
Updating client dependancies and ESLint (#2954)
* Updating client dependancies * Fixing eslint errors with updates * Updating eslint
Diffstat (limited to 'webapp/components/file_attachment.jsx')
-rw-r--r--webapp/components/file_attachment.jsx13
1 files changed, 8 insertions, 5 deletions
diff --git a/webapp/components/file_attachment.jsx b/webapp/components/file_attachment.jsx
index 4a040a35b..c909b9afb 100644
--- a/webapp/components/file_attachment.jsx
+++ b/webapp/components/file_attachment.jsx
@@ -149,12 +149,12 @@ class FileAttachment extends React.Component {
if (this.state.fileSize < 0) {
Client.getFileInfo(
filename,
- function success(data) {
+ (data) => {
if (this.canSetState) {
this.setState({fileSize: parseInt(data.size, 10)});
}
- }.bind(this),
- function error() {
+ },
+ () => {
// Do nothing
}
);
@@ -175,7 +175,8 @@ class FileAttachment extends React.Component {
className='post-image__column'
key={filename}
>
- <a className='post-image__thumbnail'
+ <a
+ className='post-image__thumbnail'
href='#'
onClick={() => this.props.handleImageClick(this.props.index)}
>
@@ -186,9 +187,10 @@ class FileAttachment extends React.Component {
href={fileUrl}
download={filenameString}
data-toggle='tooltip'
- title={this.props.intl.formatMessage(holders.download) + ' \"' + filenameString + '\"'}
+ title={this.props.intl.formatMessage(holders.download) + ' "' + filenameString + '"'}
className='post-image__name'
target='_blank'
+ rel='noopener noreferrer'
>
{trimmedFilename}
</a>
@@ -198,6 +200,7 @@ class FileAttachment extends React.Component {
download={filenameString}
className='post-image__download'
target='_blank'
+ rel='noopener noreferrer'
>
<span
className='fa fa-download'