Some image manager fixes

This commit is contained in:
Dan Brown 2015-08-13 20:28:11 +01:00
parent 59184fa6a9
commit b269b3bb3e
2 changed files with 19 additions and 6 deletions

View File

@ -18,7 +18,7 @@
this.callback = callback; this.callback = callback;
} }
hide(e) { hide() {
console.log('test'); console.log('test');
$(React.findDOMNode(this)).hide(); $(React.findDOMNode(this)).hide();
} }
@ -70,12 +70,19 @@
}); });
} }
overlayClick(e) {
if(e.target.className === 'overlay') {
this.hide();
}
}
render() { render() {
var loadMore = this.loadMore.bind(this); var loadMore = this.loadMore.bind(this);
var selectImage = this.selectImage.bind(this); var selectImage = this.selectImage.bind(this);
var overlayClick = this.overlayClick.bind(this);
var hide = this.hide.bind(this); var hide = this.hide.bind(this);
return ( return (
<div className="overlay" onClick={hide}> <div className="overlay" onClick={overlayClick}>
<div id="image-manager"> <div id="image-manager">
<div className="image-manager-content"> <div className="image-manager-content">
<div className="dropzone-container" ref="dropZone"> <div className="dropzone-container" ref="dropZone">
@ -117,7 +124,7 @@
constructor(){ constructor(){
super(); super();
this._dblClickTime = 160; this._dblClickTime = 350;
this._cClickTime = 0; this._cClickTime = 0;
} }
@ -142,7 +149,7 @@
var imageClick = this.imageClick.bind(this); var imageClick = this.imageClick.bind(this);
return ( return (
<div> <div>
<img onDoubleClick={imageClick} src={this.props.image.thumbnail}/> <img onClick={imageClick} src={this.props.image.thumbnail}/>
</div> </div>
); );
} }

View File

@ -1,5 +1,5 @@
#image-manager { #image-manager {
background-color: #EEE; background-color: rgb(37, 37, 37);
max-width: 90%; max-width: 90%;
max-height: 90%; max-height: 90%;
width: 90%; width: 90%;
@ -21,6 +21,12 @@
left: 0; left: 0;
z-index: 999; z-index: 999;
display: flex; display: flex;
p, h1, h2, h3, h4, label, input {
color: #EEE;
}
h1, h2, h3 {
font-weight: 300;
}
} }
#image-manager .dropzone-container { #image-manager .dropzone-container {
height: 100px; height: 100px;
@ -38,7 +44,7 @@
display: block; display: block;
float: left; float: left;
text-align: center; text-align: center;
background-color: #888; background-color: #404040;
margin: 1px; margin: 1px;
color: #FFF; color: #FFF;
line-height: 140px; line-height: 140px;