diff --git a/kahuna/public/js/components/gr-image-metadata/gr-image-metadata.html b/kahuna/public/js/components/gr-image-metadata/gr-image-metadata.html index 2275de8470..4f06497075 100644 --- a/kahuna/public/js/components/gr-image-metadata/gr-image-metadata.html +++ b/kahuna/public/js/components/gr-image-metadata/gr-image-metadata.html @@ -375,7 +375,7 @@ - +
diff --git a/kahuna/public/js/components/gr-image-metadata/gr-image-metadata.js b/kahuna/public/js/components/gr-image-metadata/gr-image-metadata.js index 7da1ad5976..e79239c711 100644 --- a/kahuna/public/js/components/gr-image-metadata/gr-image-metadata.js +++ b/kahuna/public/js/components/gr-image-metadata/gr-image-metadata.js @@ -60,7 +60,6 @@ module.controller('grImageMetadataCtrl', [ inject$($scope, Rx.Observable.fromPromise(selectedUsageCategory(ctrl.usageRights)), ctrl, 'usageCategory'); ctrl.rawMetadata = rawMetadata(); ctrl.metadata = displayMetadata(); - ctrl.peopleInSelectedImages = selectedPeople(); ctrl.extraInfo = extraInfo(); if (ctrl.singleImage) { updateSingleImage(); @@ -97,7 +96,10 @@ module.controller('grImageMetadataCtrl', [ ctrl.updateMetadataField = function (field, value) { var imageArray = Array.from(ctrl.selectedImages); - + if (field === 'peopleInImage') { + ctrl.addPersonToImages(imageArray, value) + return + } return editsService.batchUpdateMetadataField( imageArray, field, @@ -297,15 +299,6 @@ module.controller('grImageMetadataCtrl', [ return imageList.getOccurrences(labels); } - function selectedPeople() { - let peopleInSelectedImages = []; - ctrl.selectedImages.map((image) => { - const currentPeopleInImage = ctrl.peopleAccessor(image); - peopleInSelectedImages = peopleInSelectedImages.concat(currentPeopleInImage); - }); - return [... new Set(peopleInSelectedImages)]; - } - function selectedUsageRights() { return ctrl.selectedImages.map(image => { return {