diff --git a/static/js/infoView.js b/static/js/infoView.js index cca5983..c61a370 100644 --- a/static/js/infoView.js +++ b/static/js/infoView.js @@ -728,29 +728,33 @@ oml.ui.infoView = function(externalData, isMixed) { function editMetadata(key, value) { if (value != data[key]) { - var edit = {id: !isMultiple ? data.id : oml.ui.listSelection}; + var edit = {id: !isMultiple ? data.id : ui.listSelection}; edit[key] = key == 'author' ? splitValue(value || [], 'author') : Ox.contains(arrayKeys, key) ? (value || '').split(separator) : value; oml.api.edit(edit, function(result) { - Ox.Request.clearCache(); - if (Ox.contains(['title', 'author', 'description'], key)) { - oml.$ui.info.updateElement(); + if (!isMultiple || ui.updateResults) { + Ox.Request.clearCache(); + if (Ox.contains(['title', 'author', 'description'], key)) { + oml.$ui.info.updateElement(); + } + oml.$ui.filters.forEach(function($filter) { + $filter.reloadList(); + }); + oml.$ui.list.value( + result.data.id, key, result.data[key] + ); + oml.$ui.browser.value( + result.data.id, key, result.data[key] + ); } - oml.$ui.filters.forEach(function($filter) { - $filter.reloadList(); - }); - oml.$ui.list.value( - result.data.id, key, result.data[key] - ); - oml.$ui.browser.value( - result.data.id, key, result.data[key] - ); + // FIXME: what is this? if (Ox.contains(['title', 'author'], key)) { that.updateElement(result.data, [$data]); } + that.triggerEvent('change', Ox.extend({}, key, value)); }); } }