Working on adding overlays for file drag and drop

Этот коммит содержится в:
Reed Garmsen
2015-08-09 13:04:24 -07:00
родитель 1fa436b4f9
Коммит 81d7599f75
5 изменённых файлов: 36 добавлений и 15 удалений

Просмотреть файл

@@ -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} />