Fixed editing tags while searching

This commit is contained in:
Tobias Reich 2015-03-12 00:11:37 +01:00
parent e8cc2e9192
commit f36b84ecdf

View File

@ -529,8 +529,9 @@ photo.editTags = function(photoIDs) {
// Get tags // Get tags
if (visible.photo()) oldTags = photo.json.tags; if (visible.photo()) oldTags = photo.json.tags;
if (visible.album()&&photoIDs.length===1) oldTags = album.json.content[photoIDs].tags; if (visible.album()&&photoIDs.length===1) oldTags = album.json.content[photoIDs].tags;
if (visible.search()&&photoIDs.length===1) oldTags = album.json.content[photoIDs].tags;
if (visible.album()&&photoIDs.length>1) { if (visible.album()&&photoIDs.length>1) {
var same = true; let same = true;
photoIDs.forEach(function(id, index, array) { photoIDs.forEach(function(id, index, array) {
if(album.json.content[id].tags===album.json.content[photoIDs[0]].tags&&same===true) same = true; if(album.json.content[id].tags===album.json.content[photoIDs[0]].tags&&same===true) same = true;
else same = false; else same = false;