Changed the thumbnail for non-image file attachments to open the ViewImageModal on click like it does for image attachments
Этот коммит содержится в:
@@ -83,18 +83,9 @@ module.exports = React.createClass({
|
|||||||
|
|
||||||
var thumbnail;
|
var thumbnail;
|
||||||
if (type === "image") {
|
if (type === "image") {
|
||||||
thumbnail = (
|
thumbnail = <div ref={filename} className="post__load" style={{backgroundImage: 'url(/static/images/load.gif)'}}/>;
|
||||||
<a className="post-image__thumbnail" href="#" onClick={this.props.handleImageClick}
|
|
||||||
data-img-id={this.props.index} data-toggle="modal" data-target={"#" + this.props.modalId }>
|
|
||||||
<div ref={filename} className="post__load" style={{backgroundImage: 'url(/static/images/load.gif)'}}/>
|
|
||||||
</a>
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
thumbnail = (
|
thumbnail = <div className={"file-icon "+utils.getIconClassName(type)}/>;
|
||||||
<a href={fileInfo.path + (fileInfo.ext ? "." + fileInfo.ext : "")} download={fileInfo.name + (fileInfo.ext ? "." + fileInfo.ext : "")}>
|
|
||||||
<div className={"file-icon "+utils.getIconClassName(type)}/>
|
|
||||||
</a>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.state.fileSize) {
|
if (!this.state.fileSize) {
|
||||||
@@ -108,7 +99,10 @@ module.exports = React.createClass({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="post-image__column" key={filename}>
|
<div className="post-image__column" key={filename}>
|
||||||
{thumbnail}
|
<a className="post-image__thumbnail" href="#" onClick={this.props.handleImageClick}
|
||||||
|
data-img-id={this.props.index} data-toggle="modal" data-target={"#" + this.props.modalId }>
|
||||||
|
{thumbnail}
|
||||||
|
</a>
|
||||||
<div className="post-image__details">
|
<div className="post-image__details">
|
||||||
<div className="post-image__name">{fileInfo.name}</div>
|
<div className="post-image__name">{fileInfo.name}</div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user