Removed unused imgCount property from ViewImageModal

Этот коммит содержится в:
hmhealey
2015-07-24 11:16:22 -04:00
родитель 92c9ec71a0
Коммит 6d65071ecd
2 изменённых файлов: 12 добавлений и 21 удалений

Просмотреть файл

@@ -35,7 +35,6 @@ module.exports = React.createClass({
userId={this.props.userId}
modalId={modalId}
startId={this.state.startImgId}
imgCount={0}
filenames={filenames} />
</div>
);

Просмотреть файл

@@ -31,18 +31,13 @@ module.exports = React.createClass({
return;
};
var src = "";
if (this.props.imgCount > 0) {
src = this.props.filenames[id];
} else {
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';
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;
var src = fileInfo['path'] + '_preview.jpg';
var self = this;
var img = new Image();
@@ -141,16 +136,13 @@ module.exports = React.createClass({
for (var id in this.state.images) {
var info = utils.splitFileLocation(this.props.filenames[id]);
var preview_filename = "";
if (this.props.imgCount > 0) {
preview_filename = this.props.filenames[this.state.imgId];
} else {
// This is a temporary patch to fix issue with old files using absolute paths
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';
// This is a temporary patch to fix issue with old files using absolute paths
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';
var imgClass = "hidden";
if (this.state.loaded[id] && this.state.imgId == id) imgClass = "";