summaryrefslogtreecommitdiffstats
path: root/web/react
diff options
context:
space:
mode:
Diffstat (limited to 'web/react')
-rw-r--r--web/react/components/file_upload_overlay.jsx16
-rw-r--r--web/react/components/post_list.jsx18
-rw-r--r--web/react/pages/channel.jsx6
3 files changed, 27 insertions, 13 deletions
diff --git a/web/react/components/file_upload_overlay.jsx b/web/react/components/file_upload_overlay.jsx
new file mode 100644
index 000000000..5f8ef0b0c
--- /dev/null
+++ b/web/react/components/file_upload_overlay.jsx
@@ -0,0 +1,16 @@
+// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+module.exports = React.createClass({
+ displayName: 'FileUploadOverlay',
+ render: function() {
+ return (
+ <div className='center-file-overlay invisible'>
+ <div>
+ <i className='fa fa-upload'></i>
+ <span>Drop a file to upload it.</span>
+ </div>
+ </div>
+ );
+ }
+});
diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx
index f45650279..83f806b79 100644
--- a/web/react/components/post_list.jsx
+++ b/web/react/components/post_list.jsx
@@ -463,19 +463,11 @@ module.exports = React.createClass({
}
return (
- <div>
- <div className='file-overlay center-file-overlay invisible'>
- <div>
- <i className="fa fa-upload"></i>
- <span>Drop a file to upload it.</span>
- </div>
- </div>
- <div ref="postlist" className="post-list-holder-by-time">
- <div className="post-list__table">
- <div className="post-list__content">
- { more_messages }
- { postCtls }
- </div>
+ <div ref="postlist" className="post-list-holder-by-time">
+ <div className="post-list__table">
+ <div className="post-list__content">
+ { more_messages }
+ { postCtls }
</div>
</div>
</div>
diff --git a/web/react/pages/channel.jsx b/web/react/pages/channel.jsx
index 90d90b29f..922e61d1a 100644
--- a/web/react/pages/channel.jsx
+++ b/web/react/pages/channel.jsx
@@ -35,6 +35,7 @@ var ChannelInfoModal = require('../components/channel_info_modal.jsx');
var AccessHistoryModal = require('../components/access_history_modal.jsx');
var ActivityLogModal = require('../components/activity_log_modal.jsx');
var RemovedFromChannelModal = require('../components/removed_from_channel_modal.jsx')
+var FileUploadOverlay = require('../components/file_upload_overlay.jsx');
var Constants = require('../utils/constants.jsx');
@@ -223,4 +224,9 @@ global.window.setup_channel_page = function(team_name, team_type, team_id, chann
document.getElementById('removed_from_channel_modal')
);
+ React.render(
+ <FileUploadOverlay />,
+ document.getElementById('file_upload_overlay')
+ );
+
};