diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/react/components/file_upload.jsx | 8 | ||||
-rw-r--r-- | web/react/components/post_list.jsx | 6 | ||||
-rw-r--r-- | web/react/components/post_right.jsx | 7 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_files.scss | 4 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_post.scss | 5 |
5 files changed, 8 insertions, 22 deletions
diff --git a/web/react/components/file_upload.jsx b/web/react/components/file_upload.jsx index f382b848a..05c883ffc 100644 --- a/web/react/components/file_upload.jsx +++ b/web/react/components/file_upload.jsx @@ -84,13 +84,17 @@ module.exports = React.createClass({ this.props.onUploadError(null); var files = e.originalEvent.dataTransfer.files; - if (files.length) { + if (!files.length) { + files = e.originalEvent.dataTransfer.getData('URL'); + } + var channelId = this.props.channelId || ChannelStore.getCurrentId(); + + if (typeof files !== 'string' && files.length) { var numFiles = files.length; var numToUpload = this.props.setUploads(numFiles); for (var i = 0; i < numFiles && i < numToUpload; i++) { var file = files[i]; - var channelId = this.props.channelId || ChannelStore.getCurrentId(); var formData = new FormData(); formData.append('channel_id', channelId); diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx index 826d34a7d..83f806b79 100644 --- a/web/react/components/post_list.jsx +++ b/web/react/components/post_list.jsx @@ -124,6 +124,7 @@ module.exports = React.createClass({ $(this).parent('div').next('.date-separator, .new-separator').removeClass('hovered--comment'); } }); + }, componentDidUpdate: function() { this.resize(); @@ -461,11 +462,6 @@ module.exports = React.createClass({ postCtls.push(<LoadingScreen position="absolute" />); } - var fileDragOverlay = ''; - if (this.state.fileDrag) { - fileDragOverlay = 'post-list-file-overlay'; - } - return ( <div ref="postlist" className="post-list-holder-by-time"> <div className="post-list__table"> diff --git a/web/react/components/post_right.jsx b/web/react/components/post_right.jsx index ad993aee1..ad8b54012 100644 --- a/web/react/components/post_right.jsx +++ b/web/react/components/post_right.jsx @@ -294,13 +294,8 @@ module.exports = React.createClass({ var currentId = UserStore.getCurrentId(); var searchForm = currentId == null ? null : <SearchBox />; - var fileDragOverlay = ''; - if (this.state.fileDrag) { - fileDragOverlay = 'post-right-file-overlay'; - } - return ( - <div className="post-right__container "> + <div className="post-right__container"> <div className="search-bar__container sidebar--right__search-header">{searchForm}</div> <div className="sidebar-right__body"> <RhsHeaderPost fromSearch={this.props.fromSearch} isMentionSearch={this.props.isMentionSearch} /> diff --git a/web/sass-files/sass/partials/_files.scss b/web/sass-files/sass/partials/_files.scss index 83c87132b..3736f9303 100644 --- a/web/sass-files/sass/partials/_files.scss +++ b/web/sass-files/sass/partials/_files.scss @@ -204,13 +204,9 @@ } .center-file-overlay { - width: 100%; - height: 100%; background:rgba(255,255,255,0.5); } .right-file-overlay { - width: 100%; - height: 100%; background:rgba(255,255,255,0.5); } diff --git a/web/sass-files/sass/partials/_post.scss b/web/sass-files/sass/partials/_post.scss index 093e10ee0..98b17120d 100644 --- a/web/sass-files/sass/partials/_post.scss +++ b/web/sass-files/sass/partials/_post.scss @@ -107,11 +107,6 @@ body.ios { } #post-list { - .post-list-file-overlay { - width: 100%; - height: 100%; - background:rgba(255,255,255,0.5); - } .post-list-holder-by-time { background: #fff; overflow-y: scroll; |