From 81d7599f75b11d619f8ee9440394de3f9f86f39f Mon Sep 17 00:00:00 2001
From: Reed Garmsen <rgarmsen2295@gmail.com>
Date: Sun, 9 Aug 2015 13:04:24 -0700
Subject: Working on adding overlays for file drag and drop

---
 web/react/components/post_right.jsx | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

(limited to 'web/react/components/post_right.jsx')

diff --git a/web/react/components/post_right.jsx b/web/react/components/post_right.jsx
index ad8b54012..f7f5ed509 100644
--- a/web/react/components/post_right.jsx
+++ b/web/react/components/post_right.jsx
@@ -243,6 +243,10 @@ module.exports = React.createClass({
             this.refs[id].forceUpdate();
         }
     },
+    handleDragEnter: function() {
+        console.log("HERE ENTER RIGHT");
+        this.setState({fileDrag: true});
+    },
     getInitialState: function() {
         return getStateFromStores();
     },
@@ -294,8 +298,13 @@ 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" + fileDragOverlay} onDragEnter={this.handleDragEnter}>
                 <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} />
-- 
cgit v1.2.3-1-g7c22

