Removed unused imgCount property from ViewImageModal
Этот коммит содержится в:
@@ -35,7 +35,6 @@ module.exports = React.createClass({
|
|||||||
userId={this.props.userId}
|
userId={this.props.userId}
|
||||||
modalId={modalId}
|
modalId={modalId}
|
||||||
startId={this.state.startImgId}
|
startId={this.state.startImgId}
|
||||||
imgCount={0}
|
|
||||||
filenames={filenames} />
|
filenames={filenames} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -31,18 +31,13 @@ module.exports = React.createClass({
|
|||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
var src = "";
|
var fileInfo = utils.splitFileLocation(this.props.filenames[id]);
|
||||||
if (this.props.imgCount > 0) {
|
// This is a temporary patch to fix issue with old files using absolute paths
|
||||||
src = this.props.filenames[id];
|
if (fileInfo.path.indexOf("/api/v1/files/get") !== -1) {
|
||||||
} else {
|
fileInfo.path = fileInfo.path.split("/api/v1/files/get")[1];
|
||||||
var fileInfo = utils.splitFileLocation(this.props.filenames[id]);
|
|
||||||
// This is a temporary patch to fix issue with old files using absolute paths
|
|
||||||
if (fileInfo.path.indexOf("/api/v1/files/get") !== -1) {
|
|
||||||
fileInfo.path = fileInfo.path.split("/api/v1/files/get")[1];
|
|
||||||
}
|
|
||||||
fileInfo.path = utils.getWindowLocationOrigin() + "/api/v1/files/get" + fileInfo.path;
|
|
||||||
src = fileInfo['path'] + '_preview.jpg';
|
|
||||||
}
|
}
|
||||||
|
fileInfo.path = utils.getWindowLocationOrigin() + "/api/v1/files/get" + fileInfo.path;
|
||||||
|
var src = fileInfo['path'] + '_preview.jpg';
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
var img = new Image();
|
var img = new Image();
|
||||||
@@ -141,16 +136,13 @@ module.exports = React.createClass({
|
|||||||
for (var id in this.state.images) {
|
for (var id in this.state.images) {
|
||||||
var info = utils.splitFileLocation(this.props.filenames[id]);
|
var info = utils.splitFileLocation(this.props.filenames[id]);
|
||||||
var preview_filename = "";
|
var preview_filename = "";
|
||||||
if (this.props.imgCount > 0) {
|
|
||||||
preview_filename = this.props.filenames[this.state.imgId];
|
// This is a temporary patch to fix issue with old files using absolute paths
|
||||||
} else {
|
if (info.path.indexOf("/api/v1/files/get") !== -1) {
|
||||||
// This is a temporary patch to fix issue with old files using absolute paths
|
info.path = info.path.split("/api/v1/files/get")[1];
|
||||||
if (info.path.indexOf("/api/v1/files/get") !== -1) {
|
|
||||||
info.path = info.path.split("/api/v1/files/get")[1];
|
|
||||||
}
|
|
||||||
info.path = utils.getWindowLocationOrigin() + "/api/v1/files/get" + info.path;
|
|
||||||
preview_filename = info['path'] + '_preview.jpg';
|
|
||||||
}
|
}
|
||||||
|
info.path = utils.getWindowLocationOrigin() + "/api/v1/files/get" + info.path;
|
||||||
|
preview_filename = info['path'] + '_preview.jpg';
|
||||||
|
|
||||||
var imgClass = "hidden";
|
var imgClass = "hidden";
|
||||||
if (this.state.loaded[id] && this.state.imgId == id) imgClass = "";
|
if (this.state.loaded[id] && this.state.imgId == id) imgClass = "";
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user