Implements better markup for css changes to be made, including an overlay of the dropzones and help pic/text
Этот коммит содержится в:
@@ -144,26 +144,32 @@ module.exports = React.createClass({
|
||||
if (this.props.postType === 'post') {
|
||||
$('.app__content').dragster({
|
||||
enter: function(dragsterEvent, e) {
|
||||
$('.app__content').addClass('center-file-overlay');
|
||||
$('.center-file-overlay').removeClass('invisible');
|
||||
$('.center-file-overlay').addClass('visible');
|
||||
},
|
||||
leave: function(dragsterEvent, e) {
|
||||
$('.app__content').removeClass('center-file-overlay');
|
||||
$('.center-file-overlay').removeClass('visible');
|
||||
$('.center-file-overlay').addClass('invisible');
|
||||
},
|
||||
drop: function(dragsterEvent, e) {
|
||||
$('.app__content').removeClass('center-file-overlay');
|
||||
$('.center-file-overlay').removeClass('visible');
|
||||
$('.center-file-overlay').addClass('invisible');
|
||||
self.handleDrop(e);
|
||||
}
|
||||
});
|
||||
} else if (this.props.postType === 'comment') {
|
||||
$('.post-right__container').dragster({
|
||||
enter: function(dragsterEvent, e) {
|
||||
$('.post-right__container').addClass('right-file-overlay');
|
||||
$('.right-file-overlay').removeClass('invisible');
|
||||
$('.right-file-overlay').addClass('visible');
|
||||
},
|
||||
leave: function(dragsterEvent, e) {
|
||||
$('.post-right__container').removeClass('right-file-overlay');
|
||||
$('.right-file-overlay').removeClass('visible');
|
||||
$('.right-file-overlay').addClass('invisible');
|
||||
},
|
||||
drop: function(dragsterEvent, e) {
|
||||
$('.post-right__container').removeClass('right-file-overlay');
|
||||
$('.right-file-overlay').removeClass('visible');
|
||||
$('.right-file-overlay').addClass('invisible');
|
||||
self.handleDrop(e);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -463,11 +463,17 @@ module.exports = React.createClass({
|
||||
}
|
||||
|
||||
return (
|
||||
<div ref="postlist" className="post-list-holder-by-time">
|
||||
<div className="post-list__table">
|
||||
<div className="post-list__content">
|
||||
{ more_messages }
|
||||
{ postCtls }
|
||||
<div>
|
||||
<div className='center-file-overlay invisible'>
|
||||
<span className='center-file-help-text'>Drop a file to upload it.</span>
|
||||
<img className='center-file-help-picture' />
|
||||
</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>
|
||||
</div>
|
||||
|
||||
@@ -296,6 +296,10 @@ module.exports = React.createClass({
|
||||
|
||||
return (
|
||||
<div className="post-right__container">
|
||||
<div className='right-file-overlay invisible'>
|
||||
<span className='right-file-help-text'>Drop a file to upload it.</span>
|
||||
<img className='right-file-help-picture' />
|
||||
</div>
|
||||
<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} />
|
||||
|
||||
@@ -203,10 +203,3 @@
|
||||
}
|
||||
}
|
||||
|
||||
.center-file-overlay {
|
||||
background:rgba(255,255,255,0.5);
|
||||
}
|
||||
|
||||
.right-file-overlay {
|
||||
background:rgba(255,255,255,0.5);
|
||||
}
|
||||
|
||||
@@ -107,6 +107,29 @@ body.ios {
|
||||
}
|
||||
|
||||
#post-list {
|
||||
.center-file-overlay {
|
||||
top: 0px;
|
||||
height: 100%;
|
||||
width: 59.7%;
|
||||
position: fixed;
|
||||
z-index: 2147483646;
|
||||
-moz-box-shadow: 0px 0px 3px #8a8a8a;
|
||||
-webkit-box-shadow: 0px 0px 3px #8a8a8a;
|
||||
box-shadow: 0px 0px 3px #8a8a8a;
|
||||
|
||||
.invisible {
|
||||
visibility: hidden;
|
||||
}
|
||||
.visible {
|
||||
visibility: visible;
|
||||
}
|
||||
.center-file-help-text {
|
||||
|
||||
}
|
||||
.center-file-help-picture {
|
||||
|
||||
}
|
||||
}
|
||||
.post-list-holder-by-time {
|
||||
background: #fff;
|
||||
overflow-y: scroll;
|
||||
|
||||
@@ -1,5 +1,28 @@
|
||||
.post-right__container {
|
||||
|
||||
.right-file-overlay {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
z-index: 2147483646;
|
||||
-moz-box-shadow: 0px 0px 3px #8a8a8a;
|
||||
-webkit-box-shadow: 0px 0px 3px #8a8a8a;
|
||||
box-shadow: 0px 0px 3px #8a8a8a;
|
||||
|
||||
.invisible {
|
||||
visibility: hidden;
|
||||
}
|
||||
.visible {
|
||||
visibility: visible;
|
||||
}
|
||||
.right-file-help-text {
|
||||
|
||||
}
|
||||
.right-file-help-picture {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.post-right-root-message {
|
||||
padding: 1em 1em 0;
|
||||
}
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
{
|
||||
"name": "jquery-dragster",
|
||||
"version": "1.0.3",
|
||||
"homepage": "https://github.com/catmanjan/jquery-dragster",
|
||||
"authors": [
|
||||
"catmanjan"
|
||||
],
|
||||
"description": "Unified drag and drop listener",
|
||||
"main": "jquery.dragster.js",
|
||||
"keywords": [
|
||||
"jquery",
|
||||
"dragster",
|
||||
"dragenter",
|
||||
"dragleave",
|
||||
"drop"
|
||||
],
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
]
|
||||
}
|
||||
Ссылка в новой задаче
Block a user