summaryrefslogtreecommitdiffstats
path: root/web/react/components/post_list.jsx
diff options
context:
space:
mode:
authorReed Garmsen <rgarmsen2295@gmail.com>2015-08-09 13:04:24 -0700
committerReed Garmsen <rgarmsen2295@gmail.com>2015-08-12 12:29:57 -0700
commit81d7599f75b11d619f8ee9440394de3f9f86f39f (patch)
tree45d190ed4b523e3e7d5133cfe4b9e1f92f674de7 /web/react/components/post_list.jsx
parent1fa436b4f99d482bc2adb926b93d0c0b832d9288 (diff)
downloadchat-81d7599f75b11d619f8ee9440394de3f9f86f39f.tar.gz
chat-81d7599f75b11d619f8ee9440394de3f9f86f39f.tar.bz2
chat-81d7599f75b11d619f8ee9440394de3f9f86f39f.zip
Working on adding overlays for file drag and drop
Diffstat (limited to 'web/react/components/post_list.jsx')
-rw-r--r--web/react/components/post_list.jsx11
1 files changed, 10 insertions, 1 deletions
diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx
index 4df78817a..cf0c4c663 100644
--- a/web/react/components/post_list.jsx
+++ b/web/react/components/post_list.jsx
@@ -280,6 +280,10 @@ module.exports = React.createClass({
}
);
},
+ handleDragEnter: function() {
+ console.log("HERE ENTER");
+ this.setState({fileDrag: true});
+ },
getInitialState: function() {
return getStateFromStores();
},
@@ -461,9 +465,14 @@ 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">
+ <div className={"post-list__table " + fileDragOverlay} onDragEnter={this.handleDragEnter}>
<div className="post-list__content">
{ more_messages }
{ postCtls }